-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
add FORCE_USE_HEAP to prevent segfaults on aarch64 #5076
Conversation
added FORCE_USE_HEAP (line 49) to prevent segfaults on aarch64 platforms. Uncomment if compiling for aarch64 boards (rock64, OrangePI One Plus...) and allow full blockchain sync & operation as a monerod node on ARM platforms. Uncomment if you compile for ARM aarch64. Could be done better, such as a CMAKE arg, but offers a quick fix that works.
I'd prefer we didn't use 'quick fixes' which require the average person to go into source code and comment in/out particular lines for compilability Also, I've used an Odroid C2 for the past 2 years without a single segfault, so how big is this problem? |
Agreed. If aarch64 somehow has problems with large stacks (and not just your particular config), then this could be defined if the right macros are set (whatever aarch64 compilers set). I think NanoAkron is right though, it seems to be more likely to be something that's particular to your config. |
aarch64 has no problem with large stacks. It is just, like just about any other platform, that you must explicitly set a large enough stack when creating new threads. (E.g., using pthread_attr_setstacksize before creating the thread.) |
Understood & apologies. Just heads up guys on the background of this. Took a few ARM/aarch64 boards, clean set up. Originally wanted to run a node for another coin that forked from Monero. We found that slow_hash.c has a problem there. To find out where the problem was & if it was inherited, I compiled monerod from scratch, imported the blockchain and then started syncing past the checkpoints area. This is where you most likely get a get a segmentation fault - repeatedly. A quick valgrind/helgrind trace showed slow_hash problem - same as with the other coin. Opened this PR just to give you visibility / for your awareness. As soon as I have time to do more testing / gather data, happy to open an issue for you to properly investigate / fix, but looks there's definitely an issue. FYI - this #4197 and the comment from MoroccanMalinois commented on Aug 18, 2018 actually got us to the right direction, did the quick fix above (there are better option) and allowed me to sync all the way, no segfault anymore. Hope it helps! |
That's strange. I've been running continuously on ARM64 boxes for the past 3 years and never had this problem. |
Can this be closed? |
I guess it can. It'd be nice to know what the problem was in te first place though. |
There's probably another reason for this, so the patch is not right. +invalid |
added FORCE_USE_HEAP (line 49) to prevent segfaults on aarch64 platforms. Uncomment if compiling for aarch64 boards (rock64, OrangePI One Plus, RaspberryPi 3+...) and allow full blockchain sync & operation as a monerod node on ARM platforms. Uncomment if you compile for ARM aarch64. Could be done better, such as a CMAKE arg, but offers a quick fix that works. Readme instructions for building on ARM systems will need to be updated accordingly.