I've been attempting to debug an issue with a dg-based testsuite for a new gcc feature I'm working on: https://gcc.gnu.org/wiki/JIT but am somewhat stumped.
I'm getting a tcl traceback (see attached jit.log) when running gcc's "make check", but not "make check-jit": it runs OK when invoking just the latter. I can also trigger the traceback by running: make check-gcc check-jit -j64 but not just: make check-jit -j64 If I run them in separate terminals: T1: make check-gcc -j64 T2: make check-jit -j64 then "make check-jit" succeeds. As I understand it, the makefile is kicking off multiple "runtest --tool TOOL" invocations, with different values of TOOL, all sharing the same ultimate stdout/stderr, AIUI - so presumably all that's different is the load on the system, and perhaps significantly, the stdout/stderr being shared by the two invocations. By adding lines of the form 'pass "got here 001"' to try to isolate the problem, the problem seems to relate to line 116 below in dejagnu.exp's host_execute: 107 proc host_execute {args} { 108 global text 109 110 set timeoutmsg "Timed out: Never got started, " 111 set timeout 100 112 set file all 113 set timetol 0 114 set arguments "" 115 >>>116 expect_before buffer_full { perror "Buffer full" } 117 which seems to have been in dejagnu.exp since the earliest version in git (from 2001): http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=commitdiff;h=ad5950c28155a9583b19cff68d3e7546d126c5f2 Taking it out fixes the problem. Interestingly, in the log attached, the problem seems to reliably occur the *second* time this line is reached; the "pass" messages indicate that the first time host_execute is called, execution makes it all the way through to returning from host_execute and back to my jit.exp. I've been digging through the source to expect, and I note that expect.c:parse_expect_args has "full_buffer", rather than "buffer_full": 577 /* 578 * We have a pattern or keyword. 579 */ 580 581 static char *keywords[] = { >>>582 "timeout", "eof", "full_buffer", "default", "null", 583 (char *)NULL 584 }; 585 enum keywords { 586 EXP_ARG_TIMEOUT, EXP_ARG_EOF, EXP_ARG_FULL_BUFFER, 587 EXP_ARG_DEFAULT, EXP_ARG_NULL 588 }; which makes me wonder if this code has ever worked as intended, or if I'm misreading things. Any hints as to what might trigger the traceback, or how to debug further? (e.g. how to get the full error message back) (I'm a relative newcomer to tcl, expect, and dejagnu). Am attaching full "jit.log". My jit.exp can be seen at: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/jit.dg/jit.exp;h=4672063b00313d3195e88e23fdc591ad63110ee7;hb=refs/heads/dmalcolm/jit This is with: expect-5.45-10.fc20.x86_64 dejagnu-1.5.1-3.fc20.noarch tcl-8.5.14-1.fc20.x86_64 on a Fedora 20 box. Thanks Dave
Test Run By david on Thu Oct 9 14:45:40 2014 Native configuration is x86_64-unknown-linux-gnu === jit tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/jit.dg/jit.exp ... Executing on host: /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o install-hello-world.exe (timeout = 300) spawn -ignore SIGHUP /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o install-hello-world.exe PASS: /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/install-hello-world.c, initial compilation LD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: LD_RUN_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ SHLIB_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ LD_LIBRARY_PATH_32=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: LD_LIBRARY_PATH_64=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: DYLD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ PASS: got here jit.exp:001 PASS: output_file is install-hello-world.exe PASS: got here jit.exp:002 (about to call host_execute) PASS: got here dejagnu.exp:host_execute: 001 PASS: got here dejagnu.exp:host_execute: about to reach expect_before buffer_full PASS: got here dejagnu.exp:host_execute: after expect_before buffer_full PASS: got here dejagnu.exp:host_execute: 004 PASS: got here dejagnu.exp:host_execute: about to spawn PASS: got here dejagnu.exp:host_execute: about to parse child output PASS: got here dejagnu.exp:host_execute: 005 PASS: got here dejagnu.exp:host_execute: about to return PASS: got here PASS: ../jit/docs/examples/install-hello-world.c (test for excess errors) Executing on host: /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o tut01-square.exe (timeout = 300) spawn -ignore SIGHUP /home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/xgcc -B/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/ /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c -fno-diagnostics-show-caret -fdiagnostics-color=never -I/home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit -lgccjit -g -Wall -Werror -Wl,--export-dynamic -o tut01-square.exe PASS: /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/../jit/docs/examples/tut01-square.c, initial compilation LD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: LD_RUN_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ SHLIB_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ LD_LIBRARY_PATH_32=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: LD_LIBRARY_PATH_64=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib:/home/david/coding/gcc-python/gcc-build-new-cloog/dep-prefix/lib: DYLD_LIBRARY_PATH=/home/david/coding-3/gcc-build-jit/test/experiment/x86_64-unknown-linux-gnu/build/gcc/testsuite/jit/../../ PASS: got here jit.exp:001 PASS: output_file is tut01-square.exe PASS: got here jit.exp:002 (about to call host_execute) PASS: got here dejagnu.exp:host_execute: 001 PASS: got here dejagnu.exp:host_execute: about to reach expect_before buffer_full ERROR: tcl error sourcing /home/david/coding-3/gcc-build-jit/test/experiment/src/gcc/testsuite/jit.dg/jit.exp. send: spawn id exp0 not open while executing "send_user "$message\n"" ("default" arm line 2) invoked from within "switch -glob "$firstword" { "PASS:" - "XFAIL:" - "KFAIL:" - "UNRESOLVED:" - "UNSUPPORTED:" - "UNTESTED:" { if {$all_flag} { send_user "$m..." (procedure "clone_output" line 10) invoked from within "clone_output "ERROR: tcl error sourcing $test_file_name."" (procedure "runtest" line 34) invoked from within "runtest $test_name" ("foreach" body line 42) invoked from within "foreach test_name [lsort [find ${dir} *.exp]] { if { ${test_name} == "" } { continue } # Ignore this one if asked to. if { ${ignore..." ("foreach" body line 54) invoked from within "foreach dir "${test_top_dirs}" { if { ${dir} != ${srcdir} } { # Ignore this directory if is a directory to be # ignored. if {[info..." ("foreach" body line 121) invoked from within "foreach pass $multipass { # multipass_name is set for `record_test' to use (see framework.exp). if { [lindex $pass 0] != "" } { set multipass_..." ("foreach" body line 51) invoked from within "foreach current_target $target_list { verbose "target is $current_target" set current_target_name $current_target set tlist [split $curren..." (file "/usr/share/dejagnu/runtest.exp" line 1623)
_______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu