Module Name: src Committed By: riastradh Date: Mon May 4 13:58:48 UTC 2020
Modified Files: src/sys/kern: uipc_sem.c Log Message: Release the collision if we find one. Candidate fix for: panic: lock error: Mutex: mutex_vector_enter,542: locking against myself: lock 0xffff8f611abd37e0 cpu 8 lwp 0xffff8f60a3c6a040 cpu8: Begin traceback... vpanic() at netbsd:vpanic+0x178 snprintf() at netbsd:snprintf lockdebug_abort() at netbsd:lockdebug_abort+0xe6 mutex_vector_enter() at netbsd:mutex_vector_enter+0x3c1 ksem_close_fop() at netbsd:ksem_close_fop+0x17 closef() at netbsd:closef+0x69 fd_free() at netbsd:fd_free+0x101 exit1() at netbsd:exit1+0x118 sys_exit() at netbsd:sys_exit+0x3d syscall() at netbsd:syscall+0x299 Would be nice to have an automatic test for this. Since semids are only 24 bits, we only need to create a few thousand of them to have a high probability of collision. Maybe we should bump default semmax while here... To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/kern/uipc_sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.