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
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.
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>.)
upstream patch in currentrelease