Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP)#13159
Merged
Merged
Conversation
2f64058 to
37efe5b
Compare
luke-jr
pushed a commit
to bitcoinknots/bitcoin
that referenced
this pull request
Jul 7, 2018
…pen (on SIGHUP) Github-Pull: bitcoin#13159 Rebased-From: c4671629c5ee430238222d43f140ca8565c028b1
Contributor
| The last travis run for this pull request was 80 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened. |
This was referenced Jul 26, 2018
This was referenced Aug 3, 2018
Contributor
|
Tested ACK 37efe5b7ea059e56d8f5170c91e3160db286cad4 To test: Current behaviour of master is that the "Dumped mempool" message (along with any other subsequent log messages) aren't logged to a file, and further that fixing permissions on debug.log and HUP'ing the process isn't sufficient to re-enable logging to file. With the patch, logging continues in debug.log.old, and after fixing the permissions HUP'ing the process causes logging to move to the new file. |
Member
|
utACK 37efe5b7ea059e56d8f5170c91e3160db286cad4 |
37efe5b to
75ea00f
Compare
Contributor
Author
|
Rebased! @luke-jr @ajtowns @MarcoFalke Please re-review :-) |
Member
|
re-utACK 75ea00f |
Contributor
|
re-ACK 75ea00f |
Member
|
utACK 75ea00f, good to get rid of the need of |
laanwj
added a commit
that referenced
this pull request
Aug 31, 2018
…trying to re-open (on SIGHUP) 75ea00f Remove unused fsbridge::freopen (practicalswift) cceedbc Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) Pull request description: Don't close old debug log file handle prematurely when trying to re-open (on `SIGHUP`). Context: #13148 (comment) Thanks @ajtowns! Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1
jasonbcox
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Sep 13, 2019
…trying to re-open (on SIGHUP) Summary: 75ea00f391b742e435c650aae3e827aad913d552 Remove unused fsbridge::freopen (practicalswift) cceedbc4bf1056db17e0adf76d0db45b94777671 Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) Pull request description: Don't close old debug log file handle prematurely when trying to re-open (on `SIGHUP`). Context: bitcoin/bitcoin#13148 (comment) Thanks @ajtowns! Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1 Backport of Core PR13159 bitcoin/bitcoin#13159 Depends on D3976 Test Plan: make check ./bitcoind -regtest -daemon cd <path>/.bitcoin/regtest mv debug.log{,.old} touch debug.log; chmod 400 debug.log killall -HUP bitcoind <patch>/bitcoin-abc/build/src/bitcoin-cli -regtest savemempool Verify that the new debug.log file is empty and debug.log.old continued to be written to Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D3979
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Dec 22, 2019
…trying to re-open (on SIGHUP) Summary: 75ea00f391b742e435c650aae3e827aad913d552 Remove unused fsbridge::freopen (practicalswift) cceedbc4bf1056db17e0adf76d0db45b94777671 Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) Pull request description: Don't close old debug log file handle prematurely when trying to re-open (on `SIGHUP`). Context: bitcoin/bitcoin#13148 (comment) Thanks @ajtowns! Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1 Backport of Core PR13159 bitcoin/bitcoin#13159 Depends on D3976 Test Plan: make check ./bitcoind -regtest -daemon cd <path>/.bitcoin/regtest mv debug.log{,.old} touch debug.log; chmod 400 debug.log killall -HUP bitcoind <patch>/bitcoin-abc/build/src/bitcoin-cli -regtest savemempool Verify that the new debug.log file is empty and debug.log.old continued to be written to Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D3979
proteanx
pushed a commit
to devaultcrypto/devault-legacy
that referenced
this pull request
Dec 23, 2019
…trying to re-open (on SIGHUP) Summary: 75ea00f391b742e435c650aae3e827aad913d552 Remove unused fsbridge::freopen (practicalswift) cceedbc4bf1056db17e0adf76d0db45b94777671 Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) Pull request description: Don't close old debug log file handle prematurely when trying to re-open (on `SIGHUP`). Context: bitcoin/bitcoin#13148 (comment) Thanks @ajtowns! Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1 Backport of Core PR13159 bitcoin/bitcoin#13159 Depends on D3976 Test Plan: make check ./bitcoind -regtest -daemon cd <path>/.bitcoin/regtest mv debug.log{,.old} touch debug.log; chmod 400 debug.log killall -HUP bitcoind <patch>/bitcoin-abc/build/src/bitcoin-cli -regtest savemempool Verify that the new debug.log file is empty and debug.log.old continued to be written to Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D3979
Fuzzbawls
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
Feb 14, 2021
84b4185 [Tests] raise minimum fee in feature_blockindexstats (random-zebra) 39d8a20 [Cleanup] Remove OldSetKeyFromPassphrase/OldEncrypt/OldDecrypt (random-zebra) 613e1da [BUG] Fix sizeof in paymentservertests (random-zebra) 0f3e961 [Cleanup] Remove useless call (random-zebra) b1ca5e0 Remove unused fsbridge::freopen (practicalswift) b3a1d84 Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) ecfbcfd [Cleanup] Remove unused function AddInvalidSpendsToMap (random-zebra) 15b018c [Refactor] Use InsecureRand in the unit tests (random-zebra) 81fd84c [Refactoring] Replace risky call to rand() with GetRandInt() (random-zebra) 8ba1978 [Qt] Terminate string *pszExePath after readlink and without using memset (practicalswift) b6cd719 Remove unreachable code (g_rpcSignals.PostCommand) (practicalswift) e4f9ab3 [BUG] Memory leak after new CNode / ConnectNode (random-zebra) 536122b Avoid rollingMinimumFeeRate never being able to decay below half (Alex Morcos) 13cad19 fix a bug if the min fee is 0 for FeeFilterRounder (Alex Morcos) aa832d8 [Refactoring] Dereference before/after null check (random-zebra) 4630b7d [Trivial] Pass big parameters by reference, not value (random-zebra) aa7bc7f [Refactoring] Remove unneeded CScript::IsNormalPaymentScript (random-zebra) 6cf3c8f [Trivial] Unitialized scalar fields and variables (random-zebra) Pull request description: This is a collection of small fixes for the following issues/defects (discovered with the coverity tool): - Big parameters passed by value - calls to rand() function - Dereference before/after null-pointer check - Pointer to local variable out of scope - Resource leak with call to ConnectNode - Non-floating point result - unintended integer division (bitcoin#9288) - String not-null-terminated (bitcoin#11193) - Structurally dead code (bitcoin#9575) - Unchecked boolean return value of functions (GetOp, GetTransaction, TxOutToPublicCoin) - Unitialized pointers and scalar fields - Illegal memory access (bitcoin#13159) - Useless call to pubkey.IsCompressed() - Wrong `sizeof` argument (bitcoin#11024 + revert #494) ACKs for top commit: furszy: Looking good, ACK 84b4185 Fuzzbawls: ACK 84b4185 Tree-SHA512: 4c920a1858ccde65795c090e4becc47c50c0a78db7ab11935b4d3e2bea3f7f1f8ca3b48ce633d8112673092c35ae7cd05c444ed2b16e283a305c765874e55c1c
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jul 2, 2021
…y when trying to re-open (on SIGHUP) 75ea00f Remove unused fsbridge::freopen (practicalswift) cceedbc Don't close old debug log file handle prematurely when trying to re-open (on SIGHUP) (practicalswift) Pull request description: Don't close old debug log file handle prematurely when trying to re-open (on `SIGHUP`). Context: bitcoin#13148 (comment) Thanks @ajtowns! Tree-SHA512: c436b4286f00fc428b60269b6d6321f435c72c7ccec3c15b2194aac71196529b30f32c2384b418ffe3ed67ba7ee8ec51f4c9c5748e65945697c0437eafcdacd1 # Conflicts: # src/logging.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't close old debug log file handle prematurely when trying to re-open (on
SIGHUP).Context: #13148 (comment)
Thanks @ajtowns!