Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2010 21:10:29 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Mikolaj Golub <to.my.trociny@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: hastd: parent got stuck in waitpid()
Message-ID:  <20100922191028.GD2895@garage.freebsd.pl>
In-Reply-To: <868w2yaweh.fsf@kopusha.home.net>
References:  <868w2yaweh.fsf@kopusha.home.net>

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

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

On Sun, Sep 19, 2010 at 12:57:10PM +0300, Mikolaj Golub wrote:
> Hi,
>=20
> When trying to produce the scenario described in another thread (hastd: p=
ossible
> race when a worker is starting) I stepped on another issue. I was running=
 the
> following script:
>=20
> #!/bin/sh
>=20
> for i in `jot 1000`; do
>         hastctl status storage > /dev/null
> done &
> for i in `jot 1000`; do
>         hastctl role init storage
>         hastctl role primary storage
> done
>=20
> Parent hastd got stuck but that time when changing the role to init and
> terminating the worker: in waitpid() after sending kill() to the worker. =
It
> looked like the signal was lost. I don't have a clue how this might happe=
n but
> it is rather easy reproducible in my environment with the script above.

Could you try r213009?

The problem was (I believe) that signal mask was configured after we
forked, so there was a window where signal could have been delivered,
but before we could handled it properly. Now signal mask is configured
in the main process and the primary process inherits it, so there is no
window anymore.

Your test also triggered different bug for me - a descriptor leak, which
is now also fixed.

Thanks for the reports!

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--zbGR4y+acU1DwHSi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkyaVKQACgkQForvXbEpPzTnjQCgvvMwbElJ+bT4YbnEN5iYYL29
4IMAoLkaDA6Zsglnp1g94BMctUOlTXdI
=kQsd
-----END PGP SIGNATURE-----

--zbGR4y+acU1DwHSi--



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