I have seen random "make check" failures in gcc on Linux/x86-64 SMP machines. The log file doesn't say much except for compiler exit status 1. When I ran the failed command by hand, it was OK. I think the problem is in lib/remote.exp: expect { -i $spawn_id -timeout $timeout -re ".+" { append output $expect_out(buffer) if { [string length $output] < 512000 } { exp_continue -continue_timer } } timeout { warning "program timed out." } eof { set got_eof 1 } } ... set r2 [catch "wait -i $spawn_id" wres] if { $id > 0 } { set r2 [catch "close $id" res] } else { verbose "waitres is $wres" 2 if { $r2 == 0 } { set r2 [lindex $wres 3] if { [llength $wres] > 4 } { if { [lindex $wres 4] == "CHILDKILLED" } { set r2 1 } But the expect command will close the connection when it sees EOF. On SMP machine, close the connection may send SIGHUP to the child and cause it to exit before it can exit normally. In this case, set r2 [catch "wait -i $spawn_id" wres] will return "CHILDKILLED SIGHUP hangup". This patch will make sure that compiler will ignore SIGHUP sent by expect when it sees EOF.
Created attachment 117762 [details] A patch to fix race condition
Thank you for the report. Setting priority to high since patch is included.
Thanks for the patch, I applied it and it's in rawhide.