pocketnet.core: 0.22.0 compiled by clang segmentation fault, by gcc corrupted messages and not staking.

Describe the bug version 0.22.0 compiled from source is not working. behavior depends by used compiler. Follow the text for details:

To Reproduce compile manually with gcc or clang at 0.22. commit-id 78a88a94d6943a1af9868415217f41f1cf93f9b6 on Latest Debian stable.

Expected behavior

  • not doing segfault(139) when compiled by clang.
  • not showing corrupted messages like "Staker worker thread started for \x00\x00��\x07\x00\x00\x00w*q*DF**king" it seems like data been overwritten by another thread worker. Expected is also to staking be working when wallet unlocked but not.

Details

  • Using latest stable Debian, fully up to date, many other chains working 100%.
  • test repeated with deleted all source to be sure it is not caused by makerules.
  • when using export CC=clang export CXX=clang++ pkoin node Segfaults(139) probably right after exiting worker thread loadblk thread exit because dmesg: b-loadblk[2827261]: segfault at 7f2fc3542eff ip 00007f30b2971b30 sp 00007f2fbaffb658 error 4 in libc.so.6[7f30b2845000+155000] likely on CPU 0 (core 0, socket 0)
  • when using default gcc compiler, the debug log contains probably invalid, maybe by some other thread worker overwritten message "Staker worker thread started for \x00\x00��\x07\x00\x00\x00w*q*DF**king" and also it makes that staking is not able to be turn on.
  • this bug was probably there before but with gcc been doing overwrites some minor data.
  • Part of debug log from clang compiled node before segfault:
block tree size = 2711708
Best block: 1d5ea7388fd79f050d8ecdc4a48e8ab955b9f603fbd393cb175d0ba3ae56285f (2550467)
loadblk thread start
Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast
Bound to 127.0.0.1:37070
Bound to 127.0.0.1:38084
init message: Loading P2P addresses...
loadblk thread exit

echo $?
139

dmesg
b-loadblk[2841361]: segfault at 7f4b27543000 ip 00007f4c155718ca sp 00007f4b1dffb658 error 4 in libc.so.6[7f4c15445000+155000] likely on CPU 0 (core 0, socket 0)

Any ides how to workaround this?

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 34

Most upvoted comments

Thank you, Happy New Year also to you and all bastyon developers.