Bug 77142 - server hangs on shutdown, if run with compression
Summary: server hangs on shutdown, if run with compression
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cvs
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-01 18:58 UTC by Frank Ch. Eigler
Modified: 2007-04-18 16:48 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-10-29 18:30:13 UTC
Embargoed:


Attachments (Terms of Use)
Fix for the hang on shutdown when compression is enabled (304 bytes, patch)
2003-01-29 21:21 UTC, Jim Richardson
no flags Details | Diff

Description Frank Ch. Eigler 2002-11-01 18:58:06 UTC
Description of Problem:
cvs 8.11.2 hangs on shutdown if invoked in server mode with compression.


How Reproducible:
consistent


Steps to Reproduce:
1. Set up a cvs repository on some host that allows incoming rsh or ssh.
2. From another host, set CVS_RSH=ssh or rsh, CVSROOT=:ext:SERVER:path.
3. From that host, "cvs -z9 co .".  Note that shutdown hangs.  Use "-t"
   for extra information at the client.
4. Note that a gdb backtrace of the hung "cvs server" process running on SERVER
   indicates relevance to code new in 8.11.2:

(gdb) bt
#0  0x420cdb44 in read () from /lib/i686/libc.so.6
#1  0x4212a2d0 in __DTOR_END__ () from /lib/i686/libc.so.6
#2  0x4206cd43 in _IO_new_file_underflow () from /lib/i686/libc.so.6
#3  0x4206fd8d in _IO_default_uflow_internal () from /lib/i686/libc.so.6
#4  0x4206f293 in __uflow () from /lib/i686/libc.so.6
#5  0x420699ca in getc () from /lib/i686/libc.so.6
#6  0x0804fc04 in stdio_buffer_shutdown ()
#7  0x0804f81b in buf_shutdown ()
#8  0x0809e4e0 in compress_buffer_shutdown_input ()
#9  0x0804f81b in buf_shutdown ()
#10 0x08091f5c in server_cleanup ()
#11 0x0809226d in server ()
#12 0x08074e6c in main ()
#13 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

Comment 1 Jim Richardson 2003-01-29 18:19:28 UTC
Disabling compression in my client .cvsrc file is my current workaroung. My 
server is redhat 8.0 with cvs-1.11.2-8.i386.rpm installed.

Comment 2 Jim Richardson 2003-01-29 21:21:52 UTC
Created attachment 89689 [details]
Fix for the hang on shutdown when compression is enabled

This is the patch that I applied and tested using cvs-1.11.2-10 from the
rawhide area. I first tried the latest rawhide version to make sure the problem
still existed. The patch is from version 1.20 of buffer.c from the official cvs
source. see below for their description:
---------------------------------------------------------------------------
Revision 1.20 / (download) - [selected], Thu Oct 24 19:54:58 2002 UTC (3 months
ago) by dprice
Branch: MAIN
Changes since 1.19: +1 -2 lines
Diff to previous 1.19
* buffer.c (stdio_buffer_shutdown): Remove the getc() call used to
detect spurious output from clients since getc() would sometimes
block and hang indefinately if the client kept the conection open but
sent no data.  Bug reports state that this hapened frequently with
older clients connecting to 1.11.2 servers, especially when
compression is enabled.
(Original report from Mark D. Baushke <mdb>.
 Original patch from Peter Wemm <peter>.)Revision 1.20 / (download)
- [selected], Thu Oct 24 19:54:58 2002 UTC (3 months ago) by dprice
Branch: MAIN
Changes since 1.19: +1 -2 lines
Diff to previous 1.19
* buffer.c (stdio_buffer_shutdown): Remove the getc() call used to
detect spurious output from clients since getc() would sometimes
block and hang indefinately if the client kept the conection open but
sent no data.  Bug reports state that this hapened frequently with
older clients connecting to 1.11.2 servers, especially when
compression is enabled.
(Original report from Mark D. Baushke <mdb>.
 Original patch from Peter Wemm <peter>.)

Comment 3 Eido Inoue 2004-10-29 18:30:13 UTC
upstream patch in currentrelease


Note You need to log in before you can comment on or make changes to this bug.