-
Notifications
You must be signed in to change notification settings - Fork 136
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
With millions of files, process_lint() causes shell to segfault #236
Comments
Looks like a bash problem.
...that works ok but if I add one more call to So bash does something odd with stack allocation when calling too many functions from within another function. But only if they are discrete function calls; the following doesn't segfault:
Frustrating. Edit: no limitation found with |
Wow, this bug report resides in my top 10 of weird stuff happening... @SeeSpotRun: Told you not to use a function. 😂 (j/k) There are two possible solutions here:
I would prefer solution 1 since it's stupid but should work somewhat reliably. Any thoughts on this? |
I don't particularly like either solution but think the first is preferable to the second. Other options:
|
btw have filed this: http://savannah.gnu.org/support/?109328 Not sure if that's the right place... |
The python script is not widely used sadly. Matter of defaults I guess...
That feels even hackier than seek-back-fix to me...
This would mean to cache either all RmFiles or all shell script lines in the formatter.
Cool! 👍 You might want to also include the info there you'll get from running
|
This issue should be solved as of f546812. |
Yep. Just tried the latest development branch - the script now runs properly using bash. I guess Busybox also needs a bug report for their shell implementation. |
That's good to hear. I'll add a note for myself to open a bug report on |
Hi,
I run
rmlint
on Arch and noticed it recently got upgraded to 2.6.0.When I run
rmlint -c sh:hardlink -g /storage/backups
on a directory that has millions of files underneath it completes without error... but when I run the producedrmlint.sh
script, it segfaults since the new version.e.g.
rmlint.sh[4460]: segfault at 7ffc011d4ff0 ip 00007f25cf2c942c sp 00007ffc011d4fe0 error 6 in libc-2.25.so[7f25cf24e000+19c000]
I got the same crash with the dry-run setting. I also tried using
busybox sh
andzsh
- both got the same segfault.This is a pretty weird one because when I looked into the coredump, bash dies during a call to malloc():
I tried this on an Alpine Linux system (i.e. not using glibc's malloc) and got the same crash, so I think it is probably some kind of posix limitation on stuff in a single function. To be fair, there's a lot:
It's definitely a regression because I tried reverting back to rmlint 2.4.6 and confirmed the issue doesn't happen. Moving the commands into a function appears to be the cause.
The text was updated successfully, but these errors were encountered: