https://bugs.kde.org/show_bug.cgi?id=360752
Bug ID: 360752 Summary: raise the number of reserved fds in m_main.c from 10 to 12 Product: valgrind Version: 3.12 SVN Platform: Compiled Sources OS: Solaris Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: iv...@ivosh.net Recently test gdbserver_tests/nlpasssigalrm started to fail intermittently on Solaris 11.3 SRU with the following stack trace: valgrind: m_libcfile.c:68 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed. host stacktrace: ==21159== at 0x38108BC8: show_sched_status_wrk (m_libcassert.c:343) ==21159== by 0x38108CE4: report_and_quit (m_libcassert.c:415) ==21159== by 0x38108E71: vgPlain_assert_fail (m_libcassert.c:481) ==21159== by 0x381099E8: vgPlain_safe_fd (m_libcfile.c:68) ==21159== by 0x380F3F71: vgSysWrap_solaris_sys_forksys_before (syswrap-solaris.c:6405) ==21159== by 0x380CFDA7: vgPlain_client_syscall (syswrap-main.c:1906) ==21159== by 0x380CCB12: handle_syscall (scheduler.c:1118) ==21159== by 0x380CDFB6: vgPlain_scheduler (scheduler.c:1435) ==21159== by 0x380DD573: run_a_thread_NORETURN (syswrap-solaris.c:135) sched status: running_tid=1 Thread 1: status = VgTs_Runnable (lwpid 1) ==21159== at 0x7FFF2303B: vfork (in /lib/amd64/libc.so.1) ==21159== by 0x7FFEED6E9: system (in /lib/amd64/libc.so.1) ==21159== by 0x4013FF: main (passsigalrm.c:52) Investigation showed the problem is failing VG_(fcntl)(VKI_F_DUPFD) which returned EMFILE (too many open files). And indeed, the file descriptor soft limit was one less. Simulation of Solaris vfork() puts quite a strain on Valgrind core because a pipe needs to be created and its file descriptors duplicated and closed via VG_(safe_fd)(). The fix is straigtforward - simple increase N_RESERVED_FDS from 10 to 12. This is sufficient for all tests. -- You are receiving this mail because: You are watching all bug changes.