-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading JSON file kills cloc when counting repo #830
Comments
I'm unable to duplicate this issue on Ubuntu 24.04 LTS. I cloned the repo then dotgov-data » cloc . 23 text files. 21 unique files. 3 files ignored. github.com/AlDanial/cloc v 2.01 T=0.76 s (27.6 files/s, 444008.6 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- CSV 10 0 0 305072 Text 1 0 0 32222 Markdown 5 39 0 56 YAML 3 2 1 56 Bourne Shell 1 0 0 6 JSON 1 0 0 1 ------------------------------------------------------------------------------- SUM: 21 41 1 337413 ------------------------------------------------------------------------------- dotgov-data » wc dotgov-websites/pulse-subdomains-snapshot-06-08-2020-https.json 0 75980 13071784 dotgov-websites/pulse-subdomains-snapshot-06-08-2020-https.json dotgov-data » cloc dotgov-websites/pulse-subdomains-snapshot-06-08-2020-https.json 1 text file. 1 unique file. 0 files ignored. github.com/AlDanial/cloc v 2.01 T=0.55 s (1.8 files/s, 1.8 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- JSON 1 0 0 1 ------------------------------------------------------------------------------- Possibly a memory issue? My machine has 64 GB. |
@AlDanial I'm sorry for wasting your time this weekend, it is exactly as you describe, this was an ephemeral instance of Ubuntu from our internal pentest VM cluster that only had 1GB RAM. Confirmed via:
If there is any opportunity to improve the UX with better messaging around OOM Killed processes that'd be great, otherwise closing this out as a non-issue. |
Perl's built-in exception handling is kind of lame so even if I knew where the memory fault happened, it isn't clear I'd be able to do much about it. If you rerun on the VM with |
Describe the bug
When I cloc this repo cloc dies with "Killed".
https://github.com/cisagov/dotgov-data/
It dies when reading this file:
https://github.com/cisagov/dotgov-data/blob/main/dotgov-websites/pulse-subdomains-snapshot-06-08-2020-https.json
cloc; OS; OS version
To Reproduce
Expected result
Cloc continuing to count and not dying entirely when one file causes issues during counting.
Additional context
I tried adjusting the timeout from 1sec to 10sec, didn't fix the issue.
#372
The text was updated successfully, but these errors were encountered: