zlib test suite hangs
Closed / Fixed3428756fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2011-10-26 12:54:51
platform: sparc solaris 10, sun c compiler, tcl source code head from Oct 25, 2011 on the activestate ftp site. when compiling then running the make test, the makefile makes it to the zlib.test file, then hangs without producing any output or completing the tests.
dgpplain2011-10-26 20:02:58
Use -skip zlib-10.2 to confirm this is a Dup of 3392701
lvirdenplain2011-10-26 20:44:21
I am uncertain how to use the "-skip zlib-10.2" to confirm.
dkfplain2011-10-26 21:08:49
make test TESTFLAGS="-skip zlib-10.2"
lvirdenplain2011-10-26 21:36:33
when I run gmake test TESTFLAGS="-skip zlib-10.2" the test still hangs.
lvirdenplain2011-10-27 01:53:28
So, I tried to run this next: gmail test TESTFLAGS="-verbose bps -file zlib.test" to see if I could get some verbose info. I see this: LD_LIBRARY_PATH=`pwd`:/usr/sfw/lib:/usr/dt/lib:/usr/dt/lib/sdtimage:/usr/openwin/lib:/usr/lib:/usr/ucblib:/cas/lib/sun4 TCLLIBPATH="/vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/unix/pkgs" TCL_LIBRARY="/vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/library" ./tcltest /vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/tests/all.tcl -verbose bps -file zlib.test Tests running in interp: /vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/unix/tcltest Tests located in: /vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/tests Tests running in: /vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/unix Temporary files stored in /vol/tclsrcsol/tcl86/tcl-8.6b-2011-10-20/unix Test files run in separate interpreters Running tests that match: * Skipping test files that match: l.*.test Only running test files that match: zlib.test Tests began at Wed Oct 26 14:49:14 EDT 2011 zlib.test ++++ zlib-1.1 PASSED ++++ zlib-1.2 PASSED ++++ zlib-2.1 PASSED ++++ zlib-3.1 PASSED ++++ zlib-4.1 PASSED ++++ zlib-4.2 PASSED ++++ zlib-5.1 PASSED ++++ zlib-5.2 PASSED ++++ zlib-5.3 PASSED ++++ zlib-6.1 PASSED ++++ zlib-6.2 PASSED ++++ zlib-6.3 PASSED ++++ zlib-6.4 PASSED ++++ zlib-7.0 PASSED ++++ zlib-7.1 PASSED ++++ zlib-7.2 PASSED ++++ zlib-7.3 PASSED ++++ zlib-7.4 PASSED ++++ zlib-8.1 PASSED ++++ zlib-8.2 PASSED ++++ zlib-8.3 PASSED ++++ zlib-9.1 PASSED ++++ zlib-9.2 PASSED At this point, nothing else appears to occur. I then took a look at what is next, and it is zlib-9.3 - socket fcopy gb (identify). As I mentioned in a previous bug report, this version o ftcl is failing a number of the socket tests, so the hanging here could be related to that. I don't know that is the case - just a guess. The date on the ChangeLog for this tcl is Oct 20th, 2011...
lvirdenplain2011-11-11 03:26:24
I just wanted to update this ticket to indicate that I continue to see this problem. However, when I skip test 9.3, the test suite runs to completion. The code gets
into
puts "connection from $a:$p on $c"
chan configure $c -encoding binary -translation binary
set longa [string repeat a 81920]
puts "longa created"
puts -nonewline $c $longa
puts "puts complete"
close $c
and as output, I see longa created, but I do not see puts complete.
dkfplain2011-11-11 04:34:09
Bizarre! zlib-9.3 doesn't use zlib; it's just checking that the system used in the rest of the 9.* tests afterwards works. I'm guessing that it's some kind of problem related to having both sides of the socket in the same thread, but I leave that to someone else to advise. Since it's actually a generic IO problem, with no zlib specialness in this test, I'm assigning to someone who can advise.
dkf Ticket [3428756fff]: 1 change
[History diff]2011-11-11 04:34:10
ferrieuxplain2011-11-11 17:01:19
Indeed, looks like a deadlock in async fcopy. Larry, can you please use truss with all timing and follow-children flags and attach the output ?
ferrieuxplain2011-11-11 17:16:35
Uh, the [puts] in the server callback is blocking... of course that can work in a single-threaded "self-socket" setup only if the OS's buffers are large enough; looks like Solaris's ones are smaller. Fix: add "-blocking 0" to the [chan configure] line in the server. Also, "-buffering none" seems reasonable.
ferrieuxplain2011-11-11 17:34:49
Confirmed the analysis by pushing up the buffer stress (multiply the size by 10), which makes the problem reproducible cross-OS. Fixed by the proposed change (just -blocking 0). Fix committed to trunk.
ferrieuxplain2011-11-11 18:04:39
Generalized the fix to all similar situations, which were less likely to deadlock since the data were mostly deflated ;-) Also tidied up the fconfigure flags: 1. -encoding binary is implied by -translation binary 2. -buffering none, along with -blocking 0, in all writing situations, after verifying that all the tests were vwait-based 3. -buffering none removed for all reading situtations (buffering is an output notion)
dkfplain2011-11-11 18:09:26
allow_comments - 1 Thanks for spotting this.
ferrieux Ticket [3428756fff]: 1 change
[History diff]2011-11-11 20:33:02
ferrieuxplain2011-11-11 20:33:11
allow_comments - 0
Log in (anonymous is fine) to add a comment.