-
Notifications
You must be signed in to change notification settings - Fork 990
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
file descriptor leak #3729
Comments
This image shows file descriptors being left open in To reproduce, I'd try running a node on a closed network and keep an eye on the number of socket descriptors in Would focus on trying to reproduce in the |
I got down to doing a task on my own server and decided to follow the note
But when I make: I up grin server in usernet |
I have this reproduced after running a node fresh for a couple of weeks, we can see the file handles being left oper: The last message in the logs before this starts happening as to do with header sync being enabled, seen this on mainnet and on a testnet node that's starting to leak threads In any case, the debugging the process reveals plenty of stuck threads that correspond to the open file handles: With backtrace as follows: |
Threads seem to be stuck trying to obtain a read lock of the header pmmr: Chain::process_block_header, thread
chain::Chain::get_header_by_height, thread 'compactor', also appears to be awaiting a read lock on header_pmmr Chain::get_locator_hashes, thread NetToChainAdapter, thread |
In normal operations, when a node falls 5 blocks behind, header sync kicks off followed by a message that syncronization was successful. 20220824 12:49:20.586 INFO grin_servers::grin::sync::syncer - sync: total_difficulty 1965578938893570, peer_difficulty 1965580349437861, threshold 872616680 (last 5 blocks), enabling sync On nodes where the issue occurs, we see sync being enabled, followed by a 'no outbound peers, considering inbound' message, and then nothing until we start seeing too many open files errors. This would likely indicate the issue is the header_pmmr being write locked in the sync thread yet is unable to complete header syncing. |
same issue, more log data:
|
@droid192 I believe the fix for it was the last commit in #3695 which is 3524b70. Are you using the latest version https://github.com/mimblewimble/grin/releases/tag/v5.2.0-alpha.2 ? |
updated 5.1 to 5.2.0-a2. So far so good. |
The text was updated successfully, but these errors were encountered: