vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
982 stars 118 forks source link

check.rb: fails to kill timed out processes #476

Closed tueda closed 4 months ago

tueda commented 4 months ago

This was OK some years ago but doesn't work with, at least

ruby 3.0.2p107 (2021-07-07 revision 0db68f0233)
Ubuntu 22.04.3 LTS, x86_64
5.15.133.1-microsoft-standard-WSL2
jodavies commented 4 months ago

Right, I am also on 22.04 with ruby 3.0.2.

tueda commented 4 months ago

I thought the Ruby code to kill test processes was OK, but now I can't reproduce a successful termination of child processes even when I use old versions of Ruby, like ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux] (on my laptop: rbenv 1.2.0 by Homebrew, Ubuntu 20.04.6 LTS, 5.15.133.1-microsoft-standard-WSL2).

Looking at the code, it looks like it is trying to kill the shell process, not the descendant FORM process, and the latter is not killed. Because most FORM bugs simply crash or give wrong answers and purely freeze bugs are rare (usually, test cases that don't work are not committed to the main repository), maybe the test timeout was misunderstood as a successful termination of the FORM process.

I will consider how I can rewrite the routine to invoke FORM processes. Because writing routines to invoke subprocesses in Ruby 1.8 is tricky and tough, I would upgrade the Ruby version requirement to 1.9 (which is anyway an ancient version and so no one has any problem with this upgrade, I think).