Skip to content
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

Open
wants to merge 1 commit into
base: master
from

Conversation

@LeoStehlik
Copy link

commented Jan 16, 2019

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.

add FORCE_USE_HEAP to prevent segfaults on aarch64
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.
@NanoAkron

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

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?

@moneromooo-monero

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

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.

@hyc

This comment has been minimized.

Copy link
Contributor

commented Jan 16, 2019

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.)

@LeoStehlik

This comment has been minimized.

Copy link
Author

commented Jan 17, 2019

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!

@hyc

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

That's strange. I've been running continuously on ARM64 boxes for the past 3 years and never had this problem.

@NanoAkron

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2019

Can this be closed?

@moneromooo-monero

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

I guess it can. It'd be nice to know what the problem was in te first place though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.