This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, 22 Mar 2013 20:18:41 +0100, Jan Kratochvil wrote: > +set server_pid [exp_pid -i [board_info target fileid]] > +remote_exec target "kill -9 $server_pid" > + > +gdb_test "step" "Remote connection closed" Getting occasionally randomly: Remote communication error. Target disconnected.: Connection reset by peer. (gdb) FAIL: gdb.server/server-kill.exp: tstatus (it was FAILing on "step" before, "tstatus" vs. "step" does not matter) I even Googled one may get ECONNRESET by writing into a closed TCP socket: http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket But I was unable to reproduce it myself (kernel-3.8.4-202.fc18.x86_64) with the attached testcase: sleeping ... done write ok ssize=0 read ok send: send.c:53: main: Unexpected error: Broken pipe. Aborted by: * nc -l 5000 * ./send (starts sleeping) * kill -9 `pidof ncat` (Fedora nc is ncat) * # send resumes sleeping I get at most EPIPE but never ECONNRESET. send vs. write and recv vs. read also make no difference there. With no answer I will check in this patch as this issue seems unrelated to the problem, GDB still works properly even with ECONNRESET. I was just curious. Jan gdb/testsuite/ 2013-04-06 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.server/server-kill.exp (tstatus): Permit also ECONNRESET response. diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp index 1b48152..75c9627 100644 --- a/gdb/testsuite/gdb.server/server-kill.exp +++ b/gdb/testsuite/gdb.server/server-kill.exp @@ -42,4 +42,4 @@ remote_exec target "kill -9 $server_pid" # Force GDB to talk with GDBserver, so that we can get the # "connection closed" error. -gdb_test "tstatus" "Remote connection closed" +gdb_test "tstatus" {Remote connection closed|Remote communication error\. Target disconnected\.: Connection reset by peer\.}
Attachment:
send.c
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |