Subject: bug#79017: erc-join-tests runs "forever" on Solaris 10

From: "J.P." <[email-masked]>
Date: Wed, 16 Jul 2025 18:32:03 -0700

Hi Paul,

Eli Zaretskii <[email-masked]> writes:

>> Date: Mon, 14 Jul 2025 08:16:32 -0700
>> From: Paul Eggert <[email-masked]>
>> 
>> This is with current Savannah master. I haven't tested on Solaris for a 
>> while so I don't know when it started happening.
>> 
>> To reproduce the problem, build Emacs and run "make check". It loops 
>> seemingly forever. The culprit can be found via:
>> 
>> cd test
>> make check LOGFILES=lisp/erc/erc-join-tests.log
>> 
>> This ran for about 12 hours before I killed it. Emacs is CPU bound. 
>> "truss" reports a seemingly infinite sequence of syscalls containing the 
>> following pattern, repeated indefinitely:
>
> Thanks, I've added the maintainer of ERC in the hope that he could
> have some ideas.
>

Thanks for the detailed info. The tests in that file have remained
unchanged since they were created four years ago. Unfortunately, they
were never updated to use the newer fixtures and helpers ERC now uses
for mocking connections more responsibly. FWIW, I couldn't yet manage to
reproduce the error (https://0x0.st/8dzt.png), though it's quite
possible I didn't build Emacs correctly. In any case, I'll at least try
to ensure those tests fail fast in the future instead of running
forever. For now, I've just arranged to skip the failing one.

J.P.

>> ...
>> lwp_sigmask(SIG_SETMASK, 0x00000002, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> pollsys(0xFFBFE278, 2, 0xFFBFE5D8, 0x00000000)  = 1
>> lwp_sigmask(SIG_SETMASK, 0x00000002, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> read(25, 0x040AB840, 65536)                     = 0
>> timer_settime(0, 1, 0xFFBFE4B8, 0x00000000)     = 0
>> alarm(0)                                        = 0
>> timer_settime(0, 1, 0xFFBFE438, 0x00000000)     = 0
>> lwp_sigmask(SIG_SETMASK, 0x00000002, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> pollsys(0xFFBFE278, 1, 0xFFBFE5D8, 0x00000000)  = 1
>> lwp_sigmask(SIG_SETMASK, 0x00000002, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
>> ...
>> 
>> The file lisp/erc/erc-join-tests.log looks like this:
>> 
>> Running 10 tests (2025-07-14 07:46:00-0700, selector `(not (or (tag 
>> :expensive-test) (tag :unstable) (tag :nativecomp)))')
>>     passed   1/10  erc-autojoin-add--network (0.021089 sec)
>>     passed   2/10  erc-autojoin-add--network-extended-syntax (0.014108 sec)
>>     passed   3/10  erc-autojoin-add--network-id (0.013998 sec)
>>     passed   4/10  erc-autojoin-add--server (0.012283 sec)
>>     passed   5/10  erc-autojoin-channels--connect (0.051325 sec)
>> 
>> pfiles reports the following extra files open, all fifos:
>> 
>>     5: S_IFIFO mode:0000 dev:340,0 ino:3591989 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>     6: S_IFIFO mode:0000 dev:340,0 ino:3591989 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>     8: S_IFIFO mode:0000 dev:340,0 ino:3591990 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>     9: S_IFIFO mode:0000 dev:340,0 ino:3591991 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    10: S_IFIFO mode:0000 dev:340,0 ino:3591993 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    11: S_IFIFO mode:0000 dev:340,0 ino:3591994 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    12: S_IFIFO mode:0000 dev:340,0 ino:3591996 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    13: S_IFIFO mode:0000 dev:340,0 ino:3591997 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    14: S_IFIFO mode:0000 dev:340,0 ino:3591999 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    15: S_IFIFO mode:0000 dev:340,0 ino:3592000 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    16: S_IFIFO mode:0000 dev:340,0 ino:3592002 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    17: S_IFIFO mode:0000 dev:340,0 ino:3592003 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    18: S_IFIFO mode:0000 dev:340,0 ino:3592005 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    19: S_IFIFO mode:0000 dev:340,0 ino:3592006 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    20: S_IFIFO mode:0000 dev:340,0 ino:3592008 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    21: S_IFIFO mode:0000 dev:340,0 ino:3592009 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    22: S_IFIFO mode:0000 dev:340,0 ino:3592011 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    23: S_IFIFO mode:0000 dev:340,0 ino:3592012 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    24: S_IFIFO mode:0000 dev:340,0 ino:3592014 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC
>>    25: S_IFIFO mode:0000 dev:340,0 ino:3592015 uid:5823 gid:30 size:0
>>        O_RDWR|O_NONBLOCK FD_CLOEXEC