GNOME Bugzilla – Bug 677527
OS X: gthread/spawn-async selftest failure
Last modified: 2012-06-06 11:17:00 UTC
glib-2.32.3 on OS X 10.6 (xcode 4.2), building in 32-bit mode (passing "-arch i386" as a compiler flag)... TEST: spawn-multithreaded... (pid=60913) /gthread/spawn-sync: OK /gthread/spawn-async: ** ERROR:spawn-multithreaded.c:172:test_spawn_async_multithreaded_instance: assertion failed (error == NULL): Failed to create pipe for communicating with child process (Too many open files) (g-exec-error-quark, 19) ** ERROR:spawn-multithreaded.c:172:test_spawn_async_multithreaded_instance: assertion failed (error == NULL): Failed to create pipe for communicating with child process (Too many open files) (g-exec-error-quark, 19) ** ERROR:spawn-multithreaded.c:172:test_spawn_async_multithreaded_instance: assertion failed (error == NULL): Failed to create pipe for communicating with child process (Too many open files) (g-exec-error-quark, 19) ** ERROR:spawn-multithreaded.c:172:test_spawn_async_multithreaded_instance: assertion failed (error == NULL): Failed to create pipe for communicating with child process (Too many open files) (g-exec-error-quark, 19) FAIL GTester: last random seed: R02S5ef047c73cf482f336ac14bc0236f455 I don't see any warnings during the compiling stage.
Yeah; nothing really to do here short of lowering d51198ba gthread/tests/spawn-multithreaded.c (Colin Walters 2011-06-02 11:53:25 -0400 29) #define N_THREADS (100) Dunno...we could probably go as low as 10 and have it still be a reasonable test. Does that work for you?
Although it might be worth checking if OS X has the equivalent of Linux eventfd(2) so we can avoid having two file descriptors per main context.
I only get it to fail "usually" with 100; knocking it down to 20 I ran it several dozen times and it did not fail for any of them. I don't know anything about signal-handlers myself, but I know darwin has kqueue/kevent that sounds like it's a similar idea or alternative to eventfd.