Artifacts Associated With Ticket 20ca033dee
Ticket change [f191efa6dc] (rid 261083) by dgp on 2026-11-02 18:52:48:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Several test failures appear in `make valgrind` on the sources being prepped for a release of Tcl 9.0.5. The same tests do not fail in regular `make test` runs, so these are likely matters of timing or race conditions. I will not block the release over these, but recording them as places to further improve the test suite. We have not had this number of such valgrind-only failures before now. ==== io-78.1 writable event on pipe whose reader has exited FAILED ==== Contents of test case: fconfigure $f -blocking 0 -buffering full puts -nonewline $f [string repeat x 300000] catch {flush $f} after 100 chan event $f writable [list set [namespace which -variable w] writable] set timer [after 5000 [list set [namespace which -variable w] timeout]] vwait [namespace which -variable w] after cancel $timer list $w [catch {close $f} msg] $msg ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: error writing "file10": broken pipe while executing "puts -nonewline $f [string repeat x 300000]" ("uplevel" body line 3) invoked from within "uplevel 1 $script" ---- errorCode: POSIX EPIPE {broken pipe} ==== io-78.1 FAILED ==== iortrans-3.1 chan finalize, handler destruction has no effect on channel FAILED ==== Contents of test case: proc foo {args} { lappend ::res $args handle.initialize return } lappend res [set c [chan push [tempchan] foo]] rename foo {} lappend res [file channels file*] lappend res [file channels rt*] lappend res [catch {close $c} msg] $msg lappend res [file channels file*] lappend res [file channels rt*] ---- Result was: {initialize rt15 {read write}} file9 {file9 file10} {} 1 {invalid command name "foo"} file10 {} ---- Result should have been (glob matching): {initialize rt* {read write}} file* file* {} 1 {invalid command name "foo"} {} {} ==== iortrans-3.1 FAILED ==== process-3.1 empty subprocess list FAILED ==== Contents of test case: llength [tcl::process list] ---- Result was: 1 ---- Result should have been (exact matching): 0 ==== process-3.1 FAILED ==== process-3.2 empty subprocess status FAILED ==== Contents of test case: dict size [tcl::process status] ---- Result was: 1 ---- Result should have been (exact matching): 0 ==== process-3.2 FAILED ==== process-4.1 exec one child FAILED ==== Contents of test case: tcl::process autopurge 0 set pid [exec [interpreter] $path(exit) 0 &] set list [tcl::process list] set statuses [tcl::process status -wait] set status [lindex [tcl::process status $pid] 1] expr { [llength $list] eq 1 && [lindex $list 0] eq $pid && [dict size $statuses] eq 1 && [dict get $statuses $pid] eq $status && $status eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-4.1 FAILED ==== process-4.2 exec two children in parallel FAILED ==== Contents of test case: tcl::process autopurge 0 set pid1 [exec [interpreter] $path(exit) 0 &] set pid2 [exec [interpreter] $path(exit) 0 &] set list [tcl::process list] set statuses [tcl::process status -wait] set status1 [lindex [tcl::process status $pid1] 1] set status2 [lindex [tcl::process status $pid2] 1] expr { [llength $list] eq 2 && [lsearch $list $pid1] >= 0 && [lsearch $list $pid2] >= 0 && [dict size $statuses] eq 2 && [dict get $statuses $pid1] eq $status1 && [dict get $statuses $pid2] eq $status2 && $status1 eq 0 && $status2 eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-4.2 FAILED ==== process-4.3 exec 3-stage pipe FAILED ==== Contents of test case: tcl::process autopurge 0 set pids [exec [interpreter] $path(exit) 0 | [interpreter] $path(exit) 0 | [interpreter] $path(exit) 0 &] lassign $pids pid1 pid2 pid3 set list [tcl::process list] set statuses [tcl::process status -wait] set status1 [lindex [tcl::process status $pid1] 1] set status2 [lindex [tcl::process status $pid2] 1] set status3 [lindex [tcl::process status $pid3] 1] expr { [llength $pids] eq 3 && [llength $list] eq 3 && [lsearch $list $pid1] >= 0 && [lsearch $list $pid2] >= 0 && [lsearch $list $pid3] >= 0 && [dict size $statuses] eq 3 && [dict get $statuses $pid1] eq $status1 && [dict get $statuses $pid2] eq $status2 && [dict get $statuses $pid3] eq $status3 && $status1 eq 0 && $status2 eq 0 && $status3 eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-4.3 FAILED ==== process-5.1 exec one child FAILED ==== Contents of test case: tcl::process autopurge 0 set f [open "|\"[interpreter]\" \"$path(exit)\" 0"] set pid [pid $f] set list [tcl::process list] set statuses [tcl::process status -wait] set status [lindex [tcl::process status $pid] 1] expr { [llength $list] eq 1 && [lindex $list 0] eq $pid && [dict size $statuses] eq 1 && [dict get $statuses $pid] eq $status && $status eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-5.1 FAILED ==== process-5.2 exec two children in parallel FAILED ==== Contents of test case: tcl::process autopurge 0 set f1 [open "|\"[interpreter]\" \"$path(exit)\" 0"] set f2 [open "|\"[interpreter]\" \"$path(exit)\" 0"] set pid1 [pid $f1] set pid2 [pid $f2] set list [tcl::process list] set statuses [tcl::process status -wait] set status1 [lindex [tcl::process status $pid1] 1] set status2 [lindex [tcl::process status $pid2] 1] expr { [llength $list] eq 2 && [lsearch $list $pid1] >= 0 && [lsearch $list $pid2] >= 0 && [dict size $statuses] eq 2 && [dict get $statuses $pid1] eq $status1 && [dict get $statuses $pid2] eq $status2 && $status1 eq 0 && $status2 eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-5.2 FAILED ==== process-5.3 exec 3-stage pipe FAILED ==== Contents of test case: tcl::process autopurge 0 set f [open "| \"[interpreter]\" \"$path(exit)\" 0 | \"[interpreter]\" \"$path(exit)\" 0 | \"[interpreter]\" \"$path(exit)\" 0 "] set pids [pid $f] lassign $pids pid1 pid2 pid3 set list [tcl::process list] set statuses [tcl::process status -wait] set status1 [lindex [tcl::process status $pid1] 1] set status2 [lindex [tcl::process status $pid2] 1] set status3 [lindex [tcl::process status $pid3] 1] expr { [llength $pids] eq 3 && [llength $list] eq 3 && [lsearch $list $pid1] >= 0 && [lsearch $list $pid2] >= 0 && [lsearch $list $pid3] >= 0 && [dict size $statuses] eq 3 && [dict get $statuses $pid1] eq $status1 && [dict get $statuses $pid2] eq $status2 && [dict get $statuses $pid3] eq $status3 && $status1 eq 0 && $status2 eq 0 && $status3 eq 0 } ---- Result was: 0 ---- Result should have been (exact matching): 1 ==== process-5.3 FAILED ==== thread-9.1 transfer of a channel from its own file event handler FAILED ==== Contents of test case: exec [interpreter] << { package require Thread set handler { proc handle {chan} { thread::transfer $::other $chan thread::send $::other [list fileevent $chan writable [list handle $chan]] } } eval $handler set other [thread::create] thread::send $other [list set other [thread::id]] thread::send $other $handler handle [open [expr {$tcl_platform(platform) eq "windows" ? "NUL" : "/dev/null"}] w] after 3000 {puts ok; exit} vwait forever } ---- Test generated error; Return code was: 1 ---- Return code should have been one of: 0 2 ---- errorInfo: ok child killed: segmentation violation while executing "exec [interpreter] << { package require Thread set handler { proc handle {chan} { thread::transfer $::other $chan thread::send $::other [li..." ("uplevel" body line 2) invoked from within "uplevel 1 $script" ---- errorCode: CHILDKILLED 480903 SIGSEGV {segmentation violation} ==== thread-9.1 FAILED - foundin initialized to: "9.0.5"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "None"
- title initialized to: "Tcl 9.0.5 failing tests in valgrind"
- type initialized to: "Bug"
Ticket change [f82b6e9cbb] (rid 261087) by serhiy.storchaka on 2026-11-02 22:29:04:
- icomment:
Most of these are one cause. <b>io-78.1</b> (from [7aa8fd34c4]) starts a child that exits at once; under valgrind it has already exited when the parent writes, so <tt>puts</tt> itself fails with EPIPE. The cleanup did not close the channel, and with <tt>-singleproc 1</tt> the leaked pipe and its unreaped child break <b>iortrans-3.1</b> (stray <tt>file10</tt>) and <b>process-3.x..5.x</b> (an extra entry in <tt>tcl::process list</tt>). Forcing the early exit reproduces the same 10 failures without valgrind. Proposed fix in branch [/timeline?r=io-test-pipe-reader-alive|io-test-pipe-reader-alive]: the child waits for a signal file, and the cleanup closes the channel. <b>thread-9.1</b> is a race in the Thread package, not in Tcl: <tt>ThreadExitProc</tt> overwrites a transfer result that already succeeded with "target thread died", so the worker splices the channel back while the exiting main thread already owns it ("SpliceChannel: trying to add channel used in different list"). About 1 in 150 runs under load. Skipping completed results in <tt>ThreadExitProc</tt> fixes it; the same applies to <tt>thread::send</tt> results. - login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [fc19d2f42d] (rid 261124) by jan.nijtmans on 2026-11-04 15:26:18:
- assignee changed to: "jan.nijtmans"
- icomment:
Merged to [f88b1e95c3|trunk]. Let's see what tonight's CI build does.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Pending"
Ticket change [a5b79a0b69] (rid 261176) by jan.nijtmans on 2026-11-05 17:17:28:
- closedate changed to: "2461350.2204664582"
- closer changed to: "jan.nijtmans"
- icomment:
Now merged to [a3c26a4561|core-9-0-branch] too. Closing.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- status changed to: "Closed"