Date: Tue, 17 Nov 2015 19:08:21 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 204633] If INVARIANTS is enabled, free() may attempt to acquire sleeping lock Message-ID: <bug-204633-8-vRJuzTsc7x@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-204633-8@https.bugs.freebsd.org/bugzilla/> References: <bug-204633-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204633 --- Comment #2 from Jonathan T. Looney <jtl@freebsd.org> --- (In reply to Mark Johnston from comment #1) > The assertion is failing because the thread holds a spin mutex or a critical section, > in which case it is not valid to try and acquire a sleep mutex. It could probably be > triggered in a non-INVARIANTS kernel too, since uma_zfree_arg() will attempt to > acquire the corresponding zone lock, which is also a sleep mutex. Good point. That makes this very much look like intended behavior. I only saw this when I tried testing my changes with an unusually high load. Presumably, that caused the allocator to need to acquire the zone lock when it would normally not need to do so. I wonder how many other things have slipped through without enough testing to actually trigger the assert? Perhaps, I should propose a man page change to make this more clear. And/or add a check in malloc/free to catch these problems more reliably. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204633-8-vRJuzTsc7x>