-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
rhel 8 install - panic: unable to mmap memory: cannot allocate memory #2820
Comments
This seems to be related to wasilibs/go-re2#78. |
ok, "adding more memory" is an easy enough problem to solve. Is there any guidance on sizing? That was run on a 4gb instance just for testing, bare system, does it really need that much memory out of the bat (not even --version works) |
I would recommend starting with 16gb and evaluate your memory usage from there. It really depends on what you are scanning. |
Hi @fabioasdias - on the 4GB machine, just wondering, are you able to build while forcing the version of go-re2 to the latest main version and see if the issue still happens? The issue stems from how much virtual memory is available to the application, most systems don't have an issue even with 4GB but if memory overcommit is disabled, then the virtual memory space can be limited. A fix for unix is included in main but I haven't been able to release it yet since I haven't been able to make a low virtual memory reproduction environment. If you're able to verify it, I think I can release it. Thanks and sorry for the trouble. |
I did not build it, I used the curl | sh installation instructions which pull over the binaries, if I'm not mistaken. The laziest way I could possibly do it. There's nothing special to it, it's just a VM. I'd recon free virtualbox and an ubuntu base image might be the easiest way to make that happen, also lets one compile with more memory, then cut it off to test. I have near nil experience with go, and "forcing the version of go-re2" means nothing to me, so, sorry about that. |
Got it @fabioasdias, yeah I thought that might be the case. I was able to set up a VM and verify the fix with |
Running 3.76.3 worked with more memory. overcommit is set to 0 on this system. |
Thanks for confirming the overcommit setting @fabioasdias It looks like that version probably barely missed getting the patch, it does seem to be in main now https://github.com/trufflesecurity/trufflehog/blob/v3.76.3/go.mod#L82 So next release hoping the overcommit issue will be resolved. |
TruffleHog Version
Can't do it, --version doesn't run. From installer, 3.75.1
Trace Output
Can't run trace, all I got was:
Environment
Additional Context
Fresh OS install, ran the installer helper from the documentation (that downloads the install.sh | sh) and it refuses to start.
The text was updated successfully, but these errors were encountered: