From: Mikael Pettersson <mikpe@it.uu.se>
To: Adko Branil <adkobranil@yahoo.com>
Cc: Borislav Petkov <bp@alien8.de>, Jeff Garzik <jgarzik@pobox.com>,
Mikael Pettersson <mikpe@it.uu.se>,
linux-ide <linux-ide@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: HDD problem, software bug, bios bug, or hardware ?
Date: Sun, 2 Sep 2012 22:04:53 +0200 [thread overview]
Message-ID: <20547.48101.900727.735398@pilspetsen.it.uu.se> (raw)
In-Reply-To: <1346325007.23643.YahooMailNeo@web124706.mail.ne1.yahoo.com>
Adko Branil writes:
> >Right near the end there's a lockdep warning about a deadlock
>
> >between sata_promise's hardreset thing and the machine getting a
> >ata_bmdma_interrupt.
>
> >But since I don't know this code, it would be nice if you could take a
> >look at it.
>
> I picked up 3 more dmesg after rebooting, and 2 more oopses.
> I will put here just pieces from dmesgs about these locks, they differs slightly each-other:
>
> ***********************************************************************************
> 1.
>
>
> [ 1.859215] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
> [ 1.943678]
> [ 1.943679] =================================
> [ 1.943680] [ INFO: inconsistent lock state ]
> [ 1.943682] 3.5.2 #4 Not tainted
> [ 1.943683] ---------------------------------
> [ 1.943684] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
> [ 1.943686] swapper/1/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
> [ 1.943687] (&(&host->lock)->rlock){?.+...}, at: [<ffffffff818f4e47>] ata_bmdma_interrupt+0x27/0x1d0
> [ 1.943695] {HARDIRQ-ON-W} state was registered at:
> [ 1.943696] [<ffffffff810998fb>] __lock_acquire+0x61b/0x1af0
> [ 1.943701] [<ffffffff8109b31a>] lock_acquire+0x8a/0x110
> [ 1.943703] [<ffffffff81b4d051>] _raw_spin_lock+0x31/0x40
> [ 1.943708] [<ffffffff8190b3c5>] pdc_sata_hardreset+0x85/0x100
> [ 1.943711] [<ffffffff818eabba>] ata_do_reset+0x3a/0x90
> [ 1.943713] [<ffffffff818edd72>] ata_eh_reset+0x372/0xe00
> [ 1.943716] [<ffffffff818eec25>] ata_eh_recover+0x2a5/0x13d0
> [ 1.943718] [<ffffffff818f073d>] ata_do_eh+0x4d/0xb0
> [ 1.943721] [<ffffffff818f33ba>] ata_sff_error_handler+0xca/0x120
> [ 1.943723] [<ffffffff8190a9e4>] pdc_error_handler+0x24/0x30
> [ 1.943725] [<ffffffff818f029c>] ata_scsi_port_error_handler+0x47c/0x800
> [ 1.943728] [<ffffffff818f06be>] ata_scsi_error+0x9e/0xd0
> [ 1.943730] [<ffffffff816732e8>] scsi_error_handler+0xf8/0x500
> [ 1.943734] [<ffffffff810654fe>] kthread+0xae/0xc0
> [ 1.943737] [<ffffffff81b4f5f4>] kernel_thread_helper+0x4/0x10
> [ 1.943740] irq event stamp: 51304
> [ 1.943741] hardirqs last enabled at (51301): [<ffffffff8100ab7d>] default_idle+0x5d/0x1b0
> [ 1.943745] hardirqs last disabled at (51302): [<ffffffff81b4da67>] common_interrupt+0x67/0x6c
> [ 1.943748] softirqs last enabled at (51304): [<ffffffff810498d3>] _local_bh_enable+0x13/0x20
> [ 1.943752] softirqs last disabled at (51303): [<ffffffff8104a355>] irq_enter+0x75/0x90
> [ 1.943754]
> [ 1.943754] other info that might help us debug this:
> [ 1.943755] Possible unsafe locking scenario:
> [ 1.943755]
> [ 1.943755] CPU0
> [ 1.943755] ----
> [ 1.943756] lock(&(&host->lock)->rlock);
> [ 1.943757] <Interrupt>
> [ 1.943758] lock(&(&host->lock)->rlock);
I was initially able to reproduce the lockdep warning, and wrote
a crude test patch, but now I can't seem to reproduce the warning
with or without that patch, so I'm not sure what to make of it.
pdc_hard_reset_port needs to serialize because hard reset has to flip
a port-specific bit in a controller register that's shared by all ports,
so it takes the host lock. But now an interrupt occurs during the hard
reset, and pdc_interrupt also has to take the host lock. (I don't know
why the interrupt occurs, hotplug events are supposed to have been masked
by ->freeze before ->hardreset. It might come from a different device,
my test machine has multiple ATA controllers from different vendors,
and some of them do share IRQ.)
Jeff: ->hardreset is called with the host lock NOT held, right?
I think I'll have to introduce a new private lock just for serializing
pdc_hard_reset_port. Expect a patch next weekend (I'll be away from
my Promise test equipment until then.)
/Mikael
next prev parent reply other threads:[~2012-09-02 20:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 13:36 HDD problem, software bug, bios bug, or hardware ? Adko Branil
2012-08-25 17:46 ` Adko Branil
2012-08-26 13:01 ` Borislav Petkov
2012-08-27 17:01 ` Adko Branil
2012-08-27 17:21 ` Felix Miata
2012-08-27 21:59 ` Borislav Petkov
2012-08-29 17:02 ` Adko Branil
2012-08-29 17:31 ` Adko Branil
2012-08-30 10:12 ` Borislav Petkov
[not found] ` <1346259574.81504.YahooMailNeo@web124706.mail.ne1.yahoo.com>
2012-08-30 9:58 ` Borislav Petkov
2012-08-30 10:11 ` Borislav Petkov
2012-08-30 11:10 ` Adko Branil
2012-09-02 20:04 ` Mikael Pettersson [this message]
2012-09-03 21:46 ` Adko Branil
2012-09-07 11:32 ` Adko Branil
2012-09-08 16:30 ` Mikael Pettersson
2012-09-08 17:22 ` Adko Branil
2012-09-11 13:38 ` Adko Branil
2012-09-10 9:15 ` Borislav Petkov
2012-09-10 9:17 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2012-08-25 1:31 Adko Branil
2012-08-25 11:33 ` Borislav Petkov
2012-08-27 7:50 ` Rafael J. Wysocki
2012-09-01 12:45 ` Dan Merillat
2012-09-02 7:24 ` Borislav Petkov
2012-09-03 0:38 ` Dan Merillat
2012-09-10 20:51 ` Borislav Petkov
2012-09-10 21:29 ` Dan Merillat
2012-09-10 21:59 ` Borislav Petkov
2012-09-15 1:34 ` Dan Merillat
2012-09-15 10:34 ` Borislav Petkov
2012-08-25 0:54 Adko Branil
2012-08-25 2:58 ` Felix Miata
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=20547.48101.900727.735398@pilspetsen.it.uu.se \
--to=mikpe@it.uu.se \
--cc=adkobranil@yahoo.com \
--cc=bp@alien8.de \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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