threads/119920: fork broken in libpthread
Daniel Eischen
eischen at vigrid.com
Tue Jan 29 20:23:34 PST 2008
On Tue, 29 Jan 2008, Landon Fuller wrote:
>
> On Jan 29, 2008, at 13:13, Daniel Eischen wrote:
>>>
>>
>> There is a bug somewhere else or something is stomping
>> on the thread's lockuser. It is allocated once when the
>> thread is created and should never be null thereafter.
>> Hence, it should never be malloc'd and the reinit should
>> be sufficient.
>
> I'm totally unfamiliar with KSE, so perhaps this a stupid question -- it
> seems to solve the issue locally, so I'll ask it --
> Why not place the fork() code inside of _kse_critical_enter /
> _kse_critical_leave, to ensure upcalls are blocked while re-initializing in
> the child process post-fork?
That just prevents an upcall from happening (which my patch solves),
but doesn't prevent the corruption of the lockuser or lock. My
patch does solve this in -current, but -stable probably lacks
a few other patches. It (-stable) really needs all of -current's
code, not just this patch.
--
DE
More information about the freebsd-threads
mailing list