Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564530 - sys-kernel/hardened-sources-4.1.7 ata1 frozen
Summary: sys-kernel/hardened-sources-4.1.7 ata1 frozen
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-31 04:21 UTC by Lagu
Modified: 2016-01-06 03:25 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge (emerge,21.45 KB, text/plain)
2015-10-31 04:21 UTC, Lagu
Details
lspci (lspci,30.83 KB, text/plain)
2015-10-31 04:22 UTC, Lagu
Details
dmesg-ata-errors (dmesg-ata-errors,18.81 KB, text/plain)
2015-11-09 21:52 UTC, Alexander Tsoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lagu 2015-10-31 04:21:29 UTC
Hi, this happend when i start using the hardened kernel, this is the log:

oct 30 17:34:23 kAl53WJr kernel: ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 frozen
oct 30 17:34:23 kAl53WJr kernel: ata1.01: cmd a0/00:00:00:08:00/00:00:00:00:00/b0 tag 0 pio 16392 in
                                          opcode=0x4a 4a 01 00 00 10 00 00 00 08 00res 00/00:00:00:08:00/00:00:00:00:00/b0 Emask 0x2 (HSM violation)
oct 30 20:16:23 kAl53WJr kernel: ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 frozen
oct 30 20:16:24 kAl53WJr kernel: ata1.01: cmd a0/00:00:00:08:00/00:00:00:00:00/b0 tag 0 pio 16392 in
                                          opcode=0x4a 4a 01 00 00 10 00 00 00 08 00res 00/00:00:00:08:00/00:00:00:00:00/b0 Emask 0x2 (HSM violation)
oct 30 22:02:15 kAl53WJr kernel: ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 frozen
oct 30 22:02:17 kAl53WJr kernel: ata1.01: cmd a0/00:00:00:08:00/00:00:00:00:00/b0 tag 0 pio 16392 in
                                          opcode=0x4a 4a 01 00 00 10 00 00 00 08 00res 00/00:00:00:08:00/00:00:00:00:00/b0 Emask 0x2 (HSM violation)
oct 30 22:49:30 kAl53WJr kernel: ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 frozen
oct 30 22:49:30 kAl53WJr kernel: ata1.01: cmd a0/00:00:00:08:00/00:00:00:00:00/b0 tag 0 pio 16392 in
                                          opcode=0x4a 4a 01 00 00 10 00 00 00 08 00res 00/00:00:00:08:00/00:00:00:00:00/b0 Emask 0x2 (HSM violation)
oct 31 01:02:28 kAl53WJr kernel: ata1.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 frozen
oct 31 01:02:28 kAl53WJr kernel: ata1.01: cmd a0/00:00:00:08:00/00:00:00:00:00/b0 tag 0 pio 16392 in
                                          opcode=0x4a 4a 01 00 00 10 00 00 00 08 00res 00/00:00:00:08:00/00:00:00:00:00/b0 Emask 0x2 (HSM violation)


this doesn't happend with the before kernel so its very unprobable a hardware fault, and the hdd is relative new (2 months).
Comment 1 Lagu 2015-10-31 04:21:51 UTC
Created attachment 415776 [details]
emerge
Comment 2 Lagu 2015-10-31 04:22:52 UTC
Created attachment 415778 [details]
lspci
Comment 3 Anthony Basile gentoo-dev 2015-11-09 09:03:49 UTC
My first guess would have been its hardware.  Can you test hardened-sources-4.2.5-r1 and if it still happens there then test vanilla 4.2.5.  Upstream will want to see this bug on the latest grsec patches.

I'm particularly keen to see what happens with hardened-sources-4.2.5-r1 since that's the next candidate for stabilization.
Comment 4 Lagu 2015-11-09 12:59:25 UTC
okis, i'll be testing it a few days
Comment 5 Alexander Tsoy 2015-11-09 21:52:09 UTC
Created attachment 416492 [details]
dmesg-ata-errors

( # journalctl -o short-monotonic -b -2 | egrep '(kernel: ata|host bus error)' > dmesg-ata-errors )

I had a similar problem. With hardened-sources-4.1.7 there was a bunch of ATA errors on *every* boot. Unfortunately I didn't try gentoo- or vanilla-sources. After upgrade to 4.2.5-r1 the issue is gone. 3.14 series was also fine.
Comment 6 Lagu 2015-11-10 00:11:30 UTC
Hi, i already try the hardened-4.2.5, in this day sadly in my case persist the issue, tomorrow i'll try vanilla.

Alexander Tsoy, can you still pending of the log plis? this effectively happend a lot in the boot time, but in 4.2.5 now is less, but i still can found some moments of this (this day 2 errors in 4.2.5)

Thx.
Comment 7 Lagu 2015-11-11 09:33:28 UTC
okis, now i can confirm this on vanilla-sources-4.2.5!
Comment 8 Lagu 2015-11-11 12:32:08 UTC
Hi, ppl searching i found a intersting thing:

https://bbs.archlinux.org/viewtopic.php?pid=1052099#p1052099

Alexander Tsoy can you test it too plis?
Comment 9 Alexander Tsoy 2015-11-11 14:01:01 UTC
(In reply to Lagu from comment #8)

It seems we have different bugs. Error classes are also different: "HSM violation" vs "host bus error". And as I stated above upgrade to 4.2.5 fixed it for me.
Comment 10 Lagu 2015-11-11 14:12:04 UTC
D: at least say it helps to Anthony Basile, checking 4.2.5 kernel.
Comment 11 Anthony Basile gentoo-dev 2015-11-11 18:02:50 UTC
(In reply to Alexander Tsoy from comment #5)
> Created attachment 416492 [details]
> dmesg-ata-errors
> 
> ( # journalctl -o short-monotonic -b -2 | egrep '(kernel: ata|host bus
> error)' > dmesg-ata-errors )
> 
> I had a similar problem. With hardened-sources-4.1.7 there was a bunch of
> ATA errors on *every* boot. Unfortunately I didn't try gentoo- or
> vanilla-sources. After upgrade to 4.2.5-r1 the issue is gone. 3.14 series
> was also fine.

Okay I'm cc-ing upstream because they may know what happened.

@pipacs.  4.2.5-r1  = grsecurity-3.1-4.2.5-201511021814  Does this bug look familiar and can you confirm that it should be fixed by now.

I'm looking now at 4.2.5-r2 = grsecurity-3.1-4.2.5-201511081815 to stabilize next.
Comment 12 Alexander Tsoy 2015-11-11 18:21:50 UTC
(In reply to Anthony Basile from comment #11)

It is likely related to dm_crypt bug in my case [1]. hardened-sources-4.1.7 doesn't include [2]. This bug was fixed upstream in 4.1.11 and in gentoo-sources-4.1.9.

[1] https://www.redhat.com/archives/dm-devel/2015-May/msg00001.html
[2] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=b544e58963421d03b0f8dd9560bcf5b5ed123727
Comment 13 Alexander Tsoy 2015-11-11 20:15:14 UTC
(In reply to Alexander Tsoy from comment #12)

> [1] https://www.redhat.com/archives/dm-devel/2015-May/msg00001.html

Upstream bug:
https://bugzilla.kernel.org/show_bug.cgi?id=104421
Comment 14 Lagu 2015-11-11 23:23:58 UTC
Hi ppl, from this comment: https://bugs.gentoo.org/show_bug.cgi?id=564530#c8

well finishing this day of testing the vanilla sources i have some info, this happend with the package laptop-mode-tools, and it doesn't need be enabled the service, i remove the package and the message is gone (its a temporary fix), in the comment are a link to a similar post, basically:

sources-4.x+laptop-mode-tools=bug

and i'm curious, i get boot messages from laptop-mode when the service was disabled:

nov 10 10:55:32 KL2 laptop-mode[2369]: Laptop mode
nov 10 10:55:32 KL2 laptop-mode[2456]: enabled, not active
nov 10 10:55:33 KL2 laptop-mode[2489]: Laptop mode
nov 10 10:55:33 KL2 laptop-mode[2490]: enabled, not active

the error is most probable in the boot and starting from a suspension.
Comment 15 Lagu 2015-11-12 02:33:57 UTC
Hi, a little question, actually the vanilla 4.2.5 was deleted from portage tree, but i still have it, i most upgrade to 4.2.6? or continue with this version?
Comment 16 PaX Team 2015-11-12 11:07:51 UTC
(In reply to Anthony Basile from comment #11)
> Okay I'm cc-ing upstream because they may know what happened.
> 
> @pipacs.  4.2.5-r1  = grsecurity-3.1-4.2.5-201511021814  Does this bug look
> familiar and can you confirm that it should be fixed by now.

never seen this myself and from other comments it doesn't seem to be grsec specific either...
Comment 17 Anthony Basile gentoo-dev 2015-12-23 08:18:28 UTC
(In reply to PaX Team from comment #16)
> (In reply to Anthony Basile from comment #11)
> > Okay I'm cc-ing upstream because they may know what happened.
> > 
> > @pipacs.  4.2.5-r1  = grsecurity-3.1-4.2.5-201511021814  Does this bug look
> > familiar and can you confirm that it should be fixed by now.
> 
> never seen this myself and from other comments it doesn't seem to be grsec
> specific either...

Okay this doesn't appear to be hardened-sources related.
Comment 18 Lagu 2015-12-23 16:45:34 UTC
As thanks for the help.
Comment 19 Lagu 2015-12-23 16:46:32 UTC
where it should be reported?
Comment 20 Anthony Basile gentoo-dev 2015-12-23 20:45:55 UTC
(In reply to Lagu from comment #19)
> where it should be reported?

I would first verify it happens in the latest vanilla sources.  If it does, then I would try to find an earlier vanilla source where it doesn't happen and then do a git bisect until I get down to the commit that broke it.  I would then report it upstream to lkml.

You can still use this bug for discussion, bit its not a *hardened* problem so there's nothing for *hardened* to do.  I'm still willing to help you get it fixed :)
Comment 21 Lagu 2016-01-06 03:25:17 UTC
Hi, bad news, now i have how test this easly:
linux+laptop-mode-tools+without power cable=bug

i already test this on kernels over 3.2 to 4.3.3-r3 (i skip some ones betwen 4.1 and 4.3) and continues D: sadly the bug can't be fixed bisecting, i probably should report it to kernel bugzilla.

Thx Helping :D