bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cvs 1.11.2 server hungs on sigpipe


From: Alexander Melkov
Subject: cvs 1.11.2 server hungs on sigpipe
Date: Fri, 29 Nov 2002 19:10:15 +0300

Hello!

I'm using cvs 1.11.2 under FreeBSD 4.7, cvs server is used with :ext: through 
ssh.

If the client exits untimely (e.g. someone types ^C), cvs server receives 
SIGPIPE and then hangs. I've
found out that it throws an exception from the exception handler, in a loop.

The exception appears to be caused by an assert statement at buffer.c:1370 
(there is no NDEBUG option
in your Makefile's).

This is how the trouble begins:

Program received signal SIGABRT, Aborted.
0x2814ab78 in kill () from /usr/lib/libc.so.4
(gdb) bt
#0  0x2814ab78 in kill () from /usr/lib/libc.so.4
#1  0x2818b742 in abort () from /usr/lib/libc.so.4
#2  0x80bcbf4 in Letext ()
#3  0x804f6f7 in stdio_buffer_shutdown (buf=0x80e3080) at buffer.c:1370
#4  0x804f3f7 in buf_shutdown (buf=0x80e3080) at buffer.c:1207
#5  0x8097d1d in server_cleanup (sig=0) at server.c:4889
#6  0x8063c23 in error_exit () at error.c:71
#7  0x8063fe8 in error (status=1, errnum=0, message=0x80ca4f9 "received %s 
signal")
    at error.c:212
#8  0x8076c52 in main_cleanup (sig=13) at main.c:389
#9  0x80b661b in SIG_handle (sig=13) at sighandle.c:158
#10 0xbfbfffac in ?? ()
#11 0x804e258 in buf_send_output (buf=0x80e3040) at buffer.c:285
#12 0x804e392 in buf_flush (buf=0x80e3040, block=1) at buffer.c:350
#13 0x8097d0c in server_cleanup (sig=0) at server.c:4882
#14 0x8098432 in server (argc=1, argv=0xbfbffce8) at server.c:5273
#15 0x8077964 in main (argc=1, argv=0xbfbffce8) at main.c:989
(gdb) s
Single stepping until exit from function kill,
which has no line number information.
^C^C^C^CKilled

This is how it continues:
...
#8  0x80b661b in SIG_handle (sig=6) at sighandle.c:158
#9  0xbfbfffac in ?? ()
#10 0x80bcbf4 in Letext ()
#11 0x804f6f7 in stdio_buffer_shutdown (buf=0x80e3080) at buffer.c:1370
#12 0x804f3f7 in buf_shutdown (buf=0x80e3080) at buffer.c:1207
#13 0x8097d1d in server_cleanup (sig=6) at server.c:4889
#14 0x80b661b in SIG_handle (sig=6) at sighandle.c:158
#15 0xbfbfffac in ?? ()
#16 0x80bcbf4 in Letext ()
#17 0x804f6f7 in stdio_buffer_shutdown (buf=0x80e3080) at buffer.c:1370
#18 0x804f3f7 in buf_shutdown (buf=0x80e3080) at buffer.c:1207
#19 0x8097d1d in server_cleanup (sig=6) at server.c:4889
#20 0x80b661b in SIG_handle (sig=6) at sighandle.c:158
#21 0xbfbfffac in ?? ()
#22 0x80bcbf4 in Letext ()
#23 0x804f6f7 in stdio_buffer_shutdown (buf=0x80e3080) at buffer.c:1370
#24 0x804f3f7 in buf_shutdown (buf=0x80e3080) at buffer.c:1207
#25 0x8097d1d in server_cleanup (sig=6) at server.c:4889
#26 0x80b661b in SIG_handle (sig=6) at sighandle.c:158
#27 0xbfbfffac in ?? ()
#28 0x80bcbf4 in Letext ()
...

The following fix works fine:

diff original/cvs-1.11.2/src/buffer.c cvs-1.11.2/src/buffer.c
1370c1370,1371
<     assert (fstat ( fileno (bc->fp), &s ) != -1);
---
>     if (fstat ( fileno (bc->fp), &s ) == -1)
>       return errno;


Best Regards,
Alexander Melkov,
Yandex






reply via email to

[Prev in Thread] Current Thread [Next in Thread]