2003-05-06 15:30:27

by Michael Buesch

[permalink] [raw]
Subject: Re: [NFS] processes stuck in D state

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 06 May 2003 17:20, Trond Myklebust wrote:
> >>>>> " " == Michael Buesch <[email protected]> writes:
> > Hi! Please take a look at this problem:
> >
> > [linux-kernel-mailing-list thread]
> > http://marc.theaimsgroup.com/?t=98639966100003&r=1&w=2
>
> If I can hazard a guess: someone is firewalling the lockd port and/or
> the statd port.
>
> Either mount using the 'nolock' option, or fix the firewall (see the
> HOWTO and/or FAQ).

To reproduce the problem:
- - mount some nfs from a server in your lan.
- - Open an app, that uses the mounted fs. I've simply opened a
konqueror-window for the directory where the nfs is mounted.
- - shut down or crash the server or just pull the network-cable.
- - Now the konqueror-process is nonkillable in D state. There's no
chance to kill it.

I've tried it with all firewalls disabled, but the problem resists.

> Cheers,
> Trond

@linux-kernel-mailing-list: I've posted a thread to nfs-mailing list with
the same topic as in lkml. IMHO this is the better list for this problem. :)

- --
Regards Michael B?sch
http://www.8ung.at/tuxsoft
17:34:35 up 1:26, 5 users, load average: 1.52, 1.32, 1.13
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+t9fWoxoigfggmSgRAvrcAJ4i+i3V+kcRd+kLHS7cb2WDZDHKsQCfWljd
rwtAFK4ONkJHzVck03t7F5U=
=gHuP
-----END PGP SIGNATURE-----


2003-05-06 15:53:16

by Trond Myklebust

[permalink] [raw]
Subject: Re: [NFS] processes stuck in D state

>>>>> " " == Michael Buesch <[email protected]> writes:


> To reproduce the problem:
> - - mount some nfs from a server in your lan.
> - - Open an app, that uses the mounted fs. I've simply opened a
> konqueror-window for the directory where the nfs is mounted.
> - - shut down or crash the server or just pull the
> network-cable.
> - - Now the konqueror-process is nonkillable in D
> state. There's no
> chance to kill it.

Unless you are using the 'intr' or 'soft' mount flags, then that is
*documented and expected* behaviour.

It is true that even when using the 'intr' mount flag, you don't
always succeed in killing a task that is hanging on NFS. That is
usually due to the fact that it is waiting on some semaphore that is
held by another process. semaphores always sleep in the
TASK_UNINTERRUPTIBLE state, so they cannot be signalled.
Linus has suggested a solution to this problem: to set up a special
class of semaphores that are killable with 'SIGKILL', but doing that
(and then replacing all those semaphores in the VFS and VM) is not
going to happen before 2.7.x. at the earliest.

However, as I've mentioned on this list *many* times before: there
exists a workaround if you are wanting to kill all processes in order
to unmount the partition:
kill -9 all the processes.
kill -9 rpciod.

Cheers,
Trond

2003-05-06 16:42:30

by Trond Myklebust

[permalink] [raw]
Subject: Re: [NFS] processes stuck in D state

>>>>> " " == Michael Buesch <[email protected]> writes:

>> kill -9 all the processes. kill -9 rpciod.

> kill -9 doesn't work for me to kill the app.

I didn't say kill the app. I said signal it with -9, then signal
rpciod.

Cheers,
Trond

2003-05-06 16:28:32

by Michael Buesch

[permalink] [raw]
Subject: Re: [NFS] processes stuck in D state

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 06 May 2003 18:05, Trond Myklebust wrote:
> >>>>> " " == Michael Buesch <[email protected]> writes:
> > To reproduce the problem:
> > - - mount some nfs from a server in your lan.
> > - - Open an app, that uses the mounted fs. I've simply opened a
> > konqueror-window for the directory where the nfs is mounted.
> > - - shut down or crash the server or just pull the
> > network-cable.
> > - - Now the konqueror-process is nonkillable in D
> > state. There's no
> > chance to kill it.
>
> Unless you are using the 'intr' or 'soft' mount flags, then that is
> *documented and expected* behaviour.

I'm using intr.

> However, as I've mentioned on this list *many* times before: there
> exists a workaround if you are wanting to kill all processes in order
> to unmount the partition:
> kill -9 all the processes.
> kill -9 rpciod.

kill -9 doesn't work for me to kill the app.

- --
Regards Michael B?sch
http://www.8ung.at/tuxsoft
18:28:55 up 2:20, 5 users, load average: 1.02, 1.06, 1.06
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+t+MhoxoigfggmSgRAkeqAJ0c71DxLZ13/CHqUXlTa8TvjAt2iwCeLO34
s7crt56Gr8JyKxCLZMbrNvc=
=z8EU
-----END PGP SIGNATURE-----

2003-05-06 17:22:12

by Michael Buesch

[permalink] [raw]
Subject: Re: [NFS] processes stuck in D state

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 06 May 2003 18:54, Trond Myklebust wrote:
> >>>>> " " == Michael Buesch <[email protected]> writes:
> >> kill -9 all the processes. kill -9 rpciod.
> >>
> > kill -9 doesn't work for me to kill the app.
>
> I didn't say kill the app. I said signal it with -9, then signal
> rpciod.

Ah, I understand. :)

> Cheers,
> Trond

- --
Regards Michael B?sch
http://www.8ung.at/tuxsoft
19:31:20 up 3:22, 2 users, load average: 1.23, 1.09, 1.04
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+t/G3oxoigfggmSgRAq5BAJ0SezM+y1LFnwglArReHERXb2VJZQCeKKd0
Sx6RqCkOvm4FvgTCVyx2gCE=
=K8c7
-----END PGP SIGNATURE-----