[Bug 202304] test lib/libutil/pidfile_test:main hangs on many non-x86 platforms

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jul 22 23:33:27 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202304

Bas Bossink <bas.bossink+freebsd at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bas.bossink+freebsd at gmail.c
                   |                            |om

--- Comment #4 from Bas Bossink <bas.bossink+freebsd at gmail.com> ---
In virtualbox; uname -a:
FreeBSD fb11 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r303113: Thu Jul 21 22:42:16
CEST 2016    bas at fb11:/usr/obj/usr/src/sys/GENERIC  amd64

This problem also occurs only when executing the test program using kyua.
When using the debugger to see where the test executable is hanging, it
reveals:
--
(lldb) bt
* thread #1: tid = 100089, 0x0000000800b8e3ea libc.so.7`_select + 10
  * frame #0: 0x0000000800b8e3ea libc.so.7`_select + 10
    frame #1: 0x00000000004012f8
pidfile_test`common_test_pidfile_child(fn="test_pidfile_contested",
parent_open=0) + 616 at pidfile_test.c:172 [opt]
    frame #2: 0x0000000000400e37 pidfile_test`main [inlined]
test_pidfile_contested + 12 at pidfile_test.c:236 [opt]
    frame #3: 0x0000000000400e2b pidfile_test`main + 139 at pidfile_test.c:272
[opt]
    frame #4: 0x0000000000400cbf pidfile_test`_start + 383
--
Looking at the code we see:
select(0,0,0,0); at line 172

I don't claim to understand the specifics of this bug but in general I would
say that blocking with no timeout is a bad idea. I think this test should be
changed to include a timeout at line 172.
Next to that the reason why the behavior is different between running the test
app with or without kyua still needs to be investigated.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-testing mailing list