Weirdly slow subprocess-wait?

Hi all,

Some time in the past, oh, year?, some inscrutable subset of my various machines' Racket installations have consistently started taking between 250ms and 300ms to execute a subprocess, even one as simple as /usr/bin/true, to completion.

On some configurations, running racket -e '(time (system* "/usr/bin/true"))' reports a few milliseconds realtime, as expected. On others, it is much slower. I can't figure out what the differences might be! Maybe someone here has some ideas about how to find out what is happening?

Try various combinations of these commands:

racket --version
racket -e '(time (system* "/usr/bin/true"))'
docker run -it --rm racket/racket racket --version
docker run -it --rm racket/racket racket -e '(time (system* "/usr/bin/true"))'

Here are results from a few of my available configurations, all running Linux 6.5.0 on Debian trixie/sid (except the docker configurations, which I think are on Debian 12):

Machine Racket Fast or slow?
float docker, v8.11 cs slow
float prebuilt from download.racket-lang.org, v8.10 cs fast
leap docker, v8.11 cs slow
leap from git 38a7d658439d0817d03da797122cd2ff3329df2e, v8.8.0.6 cs fast
leap from debian package, v8.10 cs fast
a fresh VM from debian package, v8.10 cs fast
a fresh VM docker, v8.11 cs slowish
zip prebuilt from download.racket-lang.org, v8.11 cs slow
zip from git b38d895640e45611142f59583e747a4f33a710de, v8.11.0.3 cs slow
zip from debian package, v8.10 cs slow

where slow is >250ms, slowish is weirdly about 150ms, and fast is less, usually much less, than 50ms.

All the time is during the subprocess-wait call in system*'s implementation. Running strace shows the time appearing on a line read(4, "!", 10) = 1, which is part of the self-pipe trick for handling (presumably) SIGCHLD.

Any ideas?

For future readers: I cross-posted this to github issues, and Matthew has figured out what the problem was and updated the codebase. Now at least one of the "slow" systems I have has switched over to "fast". Thanks Matthew!

1 Like