Subject: Re: Processes in state "sawait"
To: Juan RP <juan@xtrarom.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 10/21/2005 14:04:42
--SkvwRMAIpAhPCcCJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 21, 2005 at 07:36:16PM +0200, Juan RP wrote:
> On Fri, 21 Oct 2005 10:15:35 -0700
> Bill Studenmund <wrstuden@netbsd.org> wrote:
>=20
> > On Fri, Oct 21, 2005 at 01:14:16PM +0200, Juan RP wrote:
> > >=20
> > > Hi Chuq,
> > >=20
> > > I was running three threaded apps with your latest changes
> > > to libpthread and after 8 hours working perfectly, one app
> > > changed its state to "sawait". The app couldn't be killed, and
> > > I had to reboot the machine.
> >=20
> > I'm not sure abote the can't be killed state, but when I see apps
> > show up in "sawait" in ps, there usually is a deadlock in userland.
> > The threads have entered lock deadlock.
> >=20
> > ps -s may also be interesting both before and after the hang.
>=20
> True, I've been having deadlocks in vnlock recently (maybe not related
> to any official code). Anyway I'll try to create a core dump with gcore
> next time as Chuq told me.

Note: vnlock is a _kernel_ thread state. What I've seen is where the=20
_userland_ locks are deadlocked. i.e. thread 1 has mutex a and wants mutex=
=20
b, and thread 2 has mutex b and wants mutex a.

While it is the same idea as kernel deadlock, it's a different set of=20
locks. :-)

Take care,

Bill

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFDWVfqWz+3JHUci9cRAqWlAJ9eI2sIDKBfB9pt8gSny+iuYlUR4QCfWgFl
C5N0nB2gTx2SUkqOJQcvlR8=
=uD+1
-----END PGP SIGNATURE-----

--SkvwRMAIpAhPCcCJ--