-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http-lib: add backtrace to logs on connection without response (#6028)
Some long-running migrations stop because of a loss of connection, log more information when it happens. I couldn't find a way to get the backtrace to be printed in a nice way without adding too much code, this also makes the change backportable. I would prefer to log it at a debug level, but the function doesn't expose it, and it would complicate backpoerting as well.
- Loading branch information
Showing
6 changed files
with
118 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
== Bring server up | ||
$ trap 'kill $(jobs -p)' EXIT | ||
$ ./test_server.exe & | ||
$ sleep 0.1 | ||
|
||
== Normal | ||
$ ./test_client.exe --perf > /dev/null | ||
|
||
== Expect to log after a closed connection | ||
$ ./test_client.exe --logerr > result | ||
$ grep "ECONNRESET" result -c | ||
1 | ||
$ grep "backtrace" result -c | ||
11 | ||
$ grep "Called from" result -c | ||
8 |
This file contains 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