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

Two errors: 1) Exception: boost::wrapexcept<boost::bad_weak_ptr> ; 2) Exception: std::system_error And #4

Open
younicoin opened this issue Dec 23, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@younicoin
Copy link

Hello! There are errors in work of nervad. Boost is generating so much errors every time

grep 2023-12-22 nerva.log | grep 'boost::wrapexceptboost::bad_weak_ptr' | wc -l
3201

And here it is one a block of boost exception messages:

  2023-12-23 21:05:40.781 INFO    Exception: boost::wrapexcept<boost::bad_weak_ptr>
  2023-12-23 21:05:40.782 INFO    Unwound call stack:
  2023-12-23 21:05:40.782 INFO        [1]  0xaf) [0x55cae942b40e]:__cxa_throw+0xaf) [0x55cae942b40e]
  2023-12-23 21:05:40.782 INFO        [2] /nerva/builder/output/linux/release/bin/nervad(+0x702b5) [0x55cae94072b5]
  2023-12-23 21:05:40.782 INFO        [3] /nerva/builder/output/linux/release/bin/nervad(+0x3c9bb2) [0x55cae9760bb2]
  2023-12-23 21:05:40.782 INFO        [4] /nerva/builder/output/linux/release/bin/nervad(+0x3de568) [0x55cae9775568]
  2023-12-23 21:05:40.782 INFO        [5] /nerva/builder/output/linux/release/bin/nervad(+0x38eb49) [0x55cae9725b49]
  2023-12-23 21:05:40.782 INFO        [6] /nerva/builder/output/linux/release/bin/nervad(+0x4381e6) [0x55cae97cf1e6]
  2023-12-23 21:05:40.782 INFO        [7] /nerva/builder/output/linux/release/bin/nervad(+0x4387b8) [0x55cae97cf7b8]
  2023-12-23 21:05:40.782 INFO        [8] /nerva/builder/output/linux/release/bin/nervad(+0x43e5de) [0x55cae97d55de]
  2023-12-23 21:05:40.782 INFO        [9] /nerva/builder/output/linux/release/bin/nervad(+0x39e547) [0x55cae9735547]
  2023-12-23 21:05:40.782 INFO        [10] /nerva/builder/output/linux/release/bin/nervad(+0x3df65b) [0x55cae977665b]
  2023-12-23 21:05:40.782 INFO        [11] /nerva/builder/output/linux/release/bin/nervad(+0x3df3ec) [0x55cae97763ec]
  2023-12-23 21:05:40.782 INFO        [12] /nerva/builder/output/linux/release/bin/nervad(+0x3860a4) [0x55cae971d0a4]
  2023-12-23 21:05:40.782 INFO        [13] /nerva/builder/output/linux/release/bin/nervad(+0x3c4bd2) [0x55cae975bbd2]
  2023-12-23 21:05:40.782 INFO        [14]  0xbb17) [0x7fb232ba3b17]:_64-linux-gnu/libboost_thread.so.1.74.0(+0xbb17) [0x7fb232ba3b17]
  2023-12-23 21:05:40.782 INFO        [15]  0x89044) [0x7fb2326a8044]:_64-linux-gnu/libc.so.6(+0x89044) [0x7fb2326a8044]
  2023-12-23 21:05:40.782 INFO        [16]  0x10961c) [0x7fb23272861c]:_64-linux-gnu/libc.so.6(+0x10961c) [0x7fb23272861c]

And also when I stop daemon I get next error

  2023-12-23 21:06:00.534 INFO    Exception: std::system_error
  2023-12-23 21:06:00.534 INFO    Unwound call stack:
  2023-12-23 21:06:00.535 INFO        [1]  0xaf) [0x55cae942b40e]:__cxa_throw+0xaf) [0x55cae942b40e]
  2023-12-23 21:06:00.535 INFO        [2] /nerva/builder/output/linux/release/bin/nervad(+0xce266) [0x55cae9465266]
  2023-12-23 21:06:00.535 INFO        [3] /nerva/builder/output/linux/release/bin/nervad(+0x56da09) [0x55cae9904a09]
  2023-12-23 21:06:00.535 INFO        [4]  0xbb17) [0x7fb232ba3b17]:_64-linux-gnu/libboost_thread.so.1.74.0(+0xbb17) [0x7fb232ba3b17]
  2023-12-23 21:06:00.535 INFO        [5]  0x89044) [0x7fb2326a8044]:_64-linux-gnu/libc.so.6(+0x89044) [0x7fb2326a8044]
  2023-12-23 21:06:00.535 INFO        [6]  0x10961c) [0x7fb23272861c]:_64-linux-gnu/libc.so.6(+0x10961c) [0x7fb23272861c]
  2023-12-23 21:06:00.535 INFO
  2023-12-23 21:06:00.611 INFO    Stop signal sent
  2023-12-23 21:06:39.378 INFO    New log categories: *:ERROR,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,user:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO
  2023-12-23 21:06:39.378 INFO    New log categories: *:ERROR,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,user:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO
@younicoin
Copy link
Author

what for bad_weak_ptr, monero still has same issues, and people discussed this:

##monero-project/monero#6473
##monero-project/monero#8132
##monero-project/monero#8341
##monero-project/monero#9068

Pull 7345 in monero solved this, but still is not confirmed:
monero-project/monero#7345

People say, bad_weak_ptr exceptions appears when some node closed connection, but boost still points to that connection. And I see this in log level 4, so Exceptions appears when connection was closed

  2023-12-23 22:32:19.178 TRACE   BlockchainLMDB::block_rtxn_start
  2023-12-23 22:32:19.178 TRACE   mdb_txn_safe: destructor
  2023-12-23 22:32:19.178 TRACE   Closed connection from host 81.183.94.172: 1
  2023-12-23 22:32:19.178 TRACE   [81.183.94.172:17565 OUT] [levin_protocol] -->> start_outer_call
  2023-12-23 22:32:19.178 TRACE   [81.183.94.172:17565 OUT] [levin_protocol] <<-- finish_outer_call
  2023-12-23 22:32:19.178 TRACE   [81.183.94.172:17565 OUT] [sock 29] release
  2023-12-23 22:32:19.178 ERROR   [81.183.94.172:17565 OUT] [levin_protocol] -->> start_outer_call failed
  2023-12-23 22:32:19.178 INFO    Failed to invoke command 1001 return code -3
  2023-12-23 22:32:19.178 WARNING [81.183.94.172:17565 OUT] COMMAND_HANDSHAKE Failed
  2023-12-23 22:32:19.178 TRACE   [sock 29] Socket destroyed
  2023-12-23 22:32:19.178 INFO    Exception: boost::wrapexcept<boost::bad_weak_ptr>
  2023-12-23 22:32:19.178 INFO    Unwound call stack:
  2023-12-23 22:32:19.178 INFO        [1]  0xaf) [0x5647df6a540e]:__cxa_throw+0xaf) [0x5647df6a540e]
  2023-12-23 22:32:19.178 INFO        [2] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x702b5) [0x5647df6812b5]
  2023-12-23 22:32:19.178 INFO        [3] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3c9bb2) [0x5647df9dabb2]
  2023-12-23 22:32:19.178 INFO        [4] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3de568) [0x5647df9ef568]
  2023-12-23 22:32:19.178 INFO        [5] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x38eb49) [0x5647df99fb49]
  2023-12-23 22:32:19.178 INFO        [6] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x4381e6) [0x5647dfa491e6]
  2023-12-23 22:32:19.178 INFO        [7] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x4387b8) [0x5647dfa497b8]
  2023-12-23 22:32:19.178 INFO        [8] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x43bfe7) [0x5647dfa4cfe7]
  2023-12-23 22:32:19.178 INFO        [9] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x43dd89) [0x5647dfa4ed89]
  2023-12-23 22:32:19.178 INFO        [10] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x43ebb8) [0x5647dfa4fbb8]
  2023-12-23 22:32:19.178 INFO        [11] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x39e547) [0x5647df9af547]
  2023-12-23 22:32:19.178 INFO        [12] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3df65b) [0x5647df9f065b]
  2023-12-23 22:32:19.178 INFO        [13] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3df3ec) [0x5647df9f03ec]
  2023-12-23 22:32:19.178 INFO        [14] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3860a4) [0x5647df9970a4]
  2023-12-23 22:32:19.178 INFO        [15] /xnv/nerva/builder/output/linux/release/bin/nervad(+0x3c4bd2) [0x5647df9d5bd2]
  2023-12-23 22:32:19.178 INFO        [16]  0xbb17) [0x7f0e4e3bbb17]:_64-linux-gnu/libboost_thread.so.1.74.0(+0xbb17) [0x7f0e4e3bbb17]
  2023-12-23 22:32:19.178 INFO        [17]  0x89044) [0x7f0e4dca8044]:_64-linux-gnu/libc.so.6(+0x89044) [0x7f0e4dca8044]
  2023-12-23 22:32:19.178 INFO        [18]  0x10961c) [0x7f0e4dd2861c]:_64-linux-gnu/libc.so.6(+0x10961c) [0x7f0e4dd2861c]
  2023-12-23 22:32:19.178 INFO
  2023-12-23 22:32:19.178 INFO    [81.183.94.172:17565 OUT] Failed to HANDSHAKE with peer 81.183.94.172:17565
  2023-12-23 22:32:19.178 DEBUG   Handshake failed
  2023-12-23 22:32:19.178 TRACE   Blockchain::get_current_blockchain_height

How to close connection without boost pointer problems? I still dig, and that commit in monero pull request 7345 not fit for Nerva, because Nerva has another version of epee

@Sn1F3rt
Copy link
Member

Sn1F3rt commented Oct 6, 2024

monero-project/monero#8702 (comment)

Looking into it.

@Sn1F3rt Sn1F3rt self-assigned this Oct 6, 2024
@Sn1F3rt Sn1F3rt added the help wanted Extra attention is needed label Oct 6, 2024
Sn1F3rt added a commit that referenced this issue Oct 15, 2024
* docs: update readme and misc instructions

* docs(readme): add missing file extension

* docs(readme): add latest release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants