Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Oct 2005 18:58:50 +0200
From:      Marc Olzheim <marcolz@stack.nl>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        Marc Olzheim <marcolz@stack.nl>, freebsd-threads@freebsd.org, Marc Olzheim <marcolz@ilse.net>, David Xu <davidxu@freebsd.org>, Sven Berkvens-Matthijsse <sven@ilse.net>
Subject:   Re: threads/76690: fork hang in child for (-lc_r & -lthr)
Message-ID:  <20051024165850.GA28694@stack.nl>
In-Reply-To: <Pine.GSO.4.43.0510241239180.17636-100000@sea.ntplx.net>
References:  <20051024144529.GP22568@ilse.net> <Pine.GSO.4.43.0510241239180.17636-100000@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 24, 2005 at 12:41:01PM -0400, Daniel Eischen wrote:
> > But then the free() in the child process may be using an unstable
> > state of the malloc system (because if you don't acquire the lock
> > before the fork(), malloc() may be busy in the middle of the fork()).
>=20
> I don't think that can happen because libc_r will not switch out
> a thread that is in a critical region (and libc locks are critical
> regions) until it leaves the region.

Well, that would be the idea, but GDB traces prove otherwise... :P
And that's why the patch prevents the test program in the PR from
hanging.

Marc

--AqsLC8rIMeq19msA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDXRLKezjnobFOgrERAukqAJ4shbzfmw0/lTJVx5gFji4OuRY0eQCgwBl4
pjkKgtYjRuELVkcc4X6e/fU=
=C/QT
-----END PGP SIGNATURE-----

--AqsLC8rIMeq19msA--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051024165850.GA28694>