mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bodo Eggert <7eggert@gmx.de>
To: linux-os@analogic.com, linux-kernel@vger.kernel.org,
	theant@nodivisions.com
Subject: Re: uninterruptible sleep lockups
Date: Wed, 23 Feb 2005 01:59:28 +0100	[thread overview]
Message-ID: <E1D3ksD-0001NH-MI@be1.7eggert.dyndns.org> (raw)
In-Reply-To: <fa.irk349q.1c3si2o@ifi.uio.no>

linux-os <linux-os@analogic.com> wrote:

> You don't seem to understand. A process that's stuck in 'D' state
> shows a SEVERE error, usually with a hardware driver.

Or a network filesystem mount to a no longer existing server or share.

> For instance, 
> somebody may have coded something in a critical section that will
> wait forever for some bit to be set when, in fact, that bit may
> never be set because of a hardware glitch. Such problems must
> be found. One can't just suck some process out of the 'D' state.

But you can easily fall into one, e.g. by mounting a SMB share to ~/mnt,
working until after the windows box breaks down and trying to save the
work of the last hour (which involves enumerating and stat()ing all
entries in ~).

> The 'D' state usually stands for 'Down' where a task
> was 'down()' on a semaphore. To get out of that state,
> that task (and none other) needs to execute `up()`.
> This means that whatever that task was waiting for
> needs to happen or it won't call 'up()'.

Maybe the device/mountpoint causing the processes to hang can be declared
dead (This is the more important part to me) and/or the syscall can be
forced to fail. If it involves wasting some MB of RAM for copying all
possibly affected memory in order to avoid corrupting used RAM, that
will be the price to pay for not losing your data.

How to clean up the stuck processes: (This requires a MMU)
Add an error path to each syscall (or create some generic error paths) and
keep the original stack frame. On errors, you can "longjump" (not exactly,
but similar) to the error path after copying the memory. The semaphore will
not be taken, and the code depending on the semaphore will not be executed.



BTW: Your Reply-To: should be omited if it's equal to the From:

       reply	other threads:[~2005-02-23  0:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.duv6ag6.p5mth0@ifi.uio.no>
     [not found] ` <fa.irk349q.1c3si2o@ifi.uio.no>
2005-02-23  0:59   ` Bodo Eggert [this message]
2005-02-23 13:50     ` linux-os
2005-02-24  2:05       ` Bodo Eggert
2005-02-23 16:55 Parag Warudkar
  -- strict thread matches above, loose matches on Subject: below --
2005-02-21 19:18 Anthony DiSante
2005-02-21 19:45 ` Valdis.Kletnieks
2005-02-21 20:24   ` Anthony DiSante
2005-02-21 20:54     ` Valdis.Kletnieks
2005-02-21 22:18       ` Anthony DiSante
2005-02-21 22:43         ` Chris Friesen
2005-02-22  0:06           ` Anthony DiSante
2005-02-22  0:36             ` Valdis.Kletnieks
2005-02-21 22:44       ` Anthony DiSante
2005-02-21 23:11         ` Nish Aravamudan
     [not found]     ` <421B12DB.70603@aitel.hist.no>
2005-02-22 11:16       ` Anthony DiSante
2005-02-22 12:26         ` Denis Vlasenko
2005-02-22 12:35           ` Anthony DiSante
2005-02-22 13:47         ` linux-os
2005-02-22 20:03           ` Anthony DiSante
2005-02-22 20:16             ` Chris Friesen
2005-02-22 20:29               ` Anthony DiSante
2005-02-22 20:24             ` Horst von Brand
2005-02-22 20:56               ` Chris Friesen
2005-02-22 21:40                 ` linux-os
2005-02-22 23:17                   ` Chris Friesen
2005-02-22 23:42                     ` linux-os
2005-02-23  0:25                       ` Chris Friesen
2005-02-23  1:05                 ` Horst von Brand
2005-02-23 10:04                   ` Bernd Petrovitsch
2005-02-22 21:31 ` Olaf Titz
2005-02-23 16:34   ` Nish Aravamudan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1D3ksD-0001NH-MI@be1.7eggert.dyndns.org \
    --to=7eggert@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=theant@nodivisions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®