Hi Eric, Thank you for following up on this despite your having more important matters on your shoulders :\ Le jeu. 17 févr. 2022 21h02 +0000, Eric Wong a écrit : > > Looks like it is waiting on sysread() in > > https://public-inbox.org/public-inbox.git/tree/t/lei-sigpipe.t#n35 > > OK, that makes more sense... My tracing with print statements shows that sysread is passed and that it is $tp->join which hangs: [nixbld@localhost:/build]$ cat stderr.log > lei-sigpipe: begin > lei-sigpipe: start_script: done > lei-sigpipe: close w: done > lei-sigpipe: sysread > lei-sigpipe: sysread: done > lei-sigpipe: close r: done [nixbld@localhost:/build]$ cat start_script.log > start_script: begin > start_script: fork > start_script: pid!=0 > start_script: pid==0 > start_script: pid!=0: tail > start_script: pid==0: if sub > start_script: pid==0: exec lei ps auxwwf | grep nixbld > nixbld1 491489 0.1 0.0 5312 4036 ? Ss 02:12 0:01 \_ bash -e /nix/store/qf3mzpvsmkrw963xchbivcci06078n13-builder.sh > nixbld1 494307 0.0 0.1 16672 12616 ? S 02:12 0:00 \_ perl -MExtUtils::Command::MM -MTest::Harness -e undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch') t/lei-sigpipe.t > nixbld1 494311 0.2 0.5 49320 40068 ? S 02:12 0:02 | \_ t/lei-sigpipe.t > nixbld1 494445 0.0 0.0 0 0 ? Z 02:12 0:00 | \_ [/nix/store/176g] > nixbld1 494447 0.0 0.1 14388 10176 ? S 02:12 0:00 | \_ /nix/store/6wcdxh3h5jp9qgrccq3n71wnalca5mf5-perl-5.34.0/bin/perl -w -I/nix/store/6wcdxh3h5jp9qgrccq3n71wnalca5mf5-perl-5.34.0/lib/perl5/site_perl -I/nix/store/jibsc747pfzmyxp5lsqgzyvrs2lnkws6-perl5.34.0-Mail-IMAPClient-3.42/lib/perl5/site_perl -I/nix/st blib/script/lei q -q -t z:1.. > nixbld1 494427 0.1 0.5 50664 41892 ? S 02:12 0:00 \_ lei-daemon /build/pi-lei-sigpipe-2750-0bv8/lei-daemon/xdg_run/lei/5.seq.sock > nixbld1 494433 0.0 0.4 50260 39580 ? S 02:12 0:00 \_ lei/store /build/pi-lei-sigpipe-2750-0bv8/lei-daemon/.local/share The defunct process with truncated path "/nix/store/176g" is points to /nix/store/176gh50y24c0lx2bnnmsvf9wazb73php-coreutils-9.0 It appears only when I export TAIL=${coreutils}/bin/tail which does not workaround the hang. This deadlock appears only when the test is run by nix, it doesn't when I run it manually from a terminal by entering the sandbox: [nixbld@localhost:/]$ (cd /build/public-inbox-1.7.0; export PERL_INLINE_DIRECTORY=$PWD/inline-c; rm -rf $PERL_INLINE_DIRECTORY; mkdir $PERL_INLINE_DIRECTORY; prove -bvw t/lei-sigpipe.t ) > t/lei-sigpipe.t .. > ok 1 - lei import $TMPDIR/big.eml > ok 2 - read one byte > ok 3 - signaled > ok 4 - got SIGPIPE > ok 5 - read one byte > ok 6 - signaled -f mboxcl2 > ok 7 - got SIGPIPE -f mboxcl2 > ok 8 - read one byte > ok 9 - signaled -f text > ok 10 - got SIGPIPE -f text > ok 11 - lei daemon-pid (daemon-pid after t/lei-sigpipe.t:58) > ok 12 - daemon running after t/lei-sigpipe.t:58 > ok 13 - lei daemon-kill (daemon-kill after t/lei-sigpipe.t:58) > ok 14 - t/lei-sigpipe.t:58 daemon stopped > ok 15 - t/lei-sigpipe.t:58 daemon XDG_RUNTIME_DIR/lei/errors.log empty > 1..15 > ok > All tests successful. > Files=1, Tests=15, 8 wallclock secs ( 0.06 usr 0.08 sys + 3.55 cusr 2.81 csys = 6.50 CPU) > Result: PASS