On Tue, Aug 23, 2016 at 09:57:03AM +0200, Otto Moerbeek wrote:
> On Mon, Aug 22, 2016 at 08:59:44PM -0400, Ted Unangst wrote:
>
> > Otto Moerbeek wrote:
> > >
> > > After a forkl of a threaded program __isthreaded is reset, but
> > > existing allocations are spread around the pools. But the new single
> > > threaded child only looks in the first pool. I have to think how to
> > > solve this.
> >
> > Create a new flag, _malloc_threads. Init to 0.
> >
> > Change all existing tests for __isthreaded in malloc.c to _malloc_threads.
> >
> > Set _malloc_threads to 1 (or N) in malloc_init().
> >
> > (Future direction may be to replace _MALLOC_MUTEXES with _malloc_threads and
> > allow it to vary somewhat based on cpu count.)
> >
> > Trying to reverse the process of going to thread mode is more trouble than
> > it's work. I'd even argue there's no need to reset __isthreaded, but I don't
> > want to get bogged down with other consequences.
>
> Indeed, thats the solution I came up with as well. chrome, ff, gimp
> and mysqld seem to be happy. Online now.
>
> -Otto
Hi,
diff has been commited just now (from the hackathon in Cambridge,
UK). Upcoming snaps will contain it. Please make sure you update
packages as well when they arrive at mirrors, since both librthread and
libc versions have been bumped. Otherwise you just will be testing old
code.
Thanks to all the testers,
-Otto