Regular kernel "Bad Mode" errors

Post Reply
mrhash
Posts: 9
Joined: Thu Apr 11, 2019 7:15 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Regular kernel "Bad Mode" errors

Unread post by mrhash » Tue Jul 30, 2019 11:43 am

Hello, i've been experiencing regular "Bad Mode" errors such as the one shown across different CPU numbers for sometime. Is there a way to get the N2 working without rebooting so often? I have a Ubuntu 18 factory install on emmc with all packages up to date. thanks

Code: Select all

Jun 25 10:14:44 bento kernel: Bad mode in Error handler detected on CPU3, code 0xbf000000 -- SError
Jun 25 10:14:44 bento kernel: FAR:7fa2fff034
Jun 25 10:14:44 bento kernel: reg              value       pfn  reg              value       pfn
Jun 25 10:14:44 bento kernel: r0 :  0000000000000000  --------  r1 :  0000000000000080  --------
Jun 25 10:14:44 bento kernel: r2 :  0000000000000002  --------  r3 :  0000000000000000  --------
Jun 25 10:14:44 bento kernel: r4 :  00000055921281a0     d6bc7  r5 :  0000000000000000  --------
Jun 25 10:14:44 bento kernel: r6 :  0000000000000001  --------  r7 :  0000000001cdfe68  --------
Jun 25 10:14:44 bento kernel: r8 :  0000000000000062  --------  r9 :  003b9aca00000000  --------
Jun 25 10:14:44 bento kernel: r10:  000000000000ed02  --------  r11:  0000000014a883ae  --------
Jun 25 10:14:44 bento kernel: r12:  0000000000000018  --------  r13:  000000005d11f412  --------
Jun 25 10:14:44 bento kernel: r14:  00063730daa220c4  --------  r15:  0000319157614b32  --------
Jun 25 10:14:44 bento kernel: r16:  0000005592126b90     d6481  r17:  0000007fa43f46f0     e2ab3
Jun 25 10:14:44 bento kernel: r18:  0000007fa43e5a70     cfef6  r19:  00000055921281a0     d6bc7
Jun 25 10:14:44 bento kernel: r20:  0000007f9b7fdc80     ece28  r21:  0000007fa4a43000     d6ad5
Jun 25 10:14:44 bento kernel: r22:  00000055c6f625c0     e5301  r23:  0000000000000000  --------
Jun 25 10:14:44 bento kernel: r24:  0000000000001000  --------  r25:  0000007feaa1ab20         3
Jun 25 10:14:44 bento kernel: r26:  0000007fa4412000     d647a  r27:  0000007f9b7fdd90     ece28
Jun 25 10:14:44 bento kernel: r28:  0000000000000001  --------  r29:  0000007f9b7fc620     e3224
Jun 25 10:14:44 bento kernel: r30:  0000007fa43f47e4     e2ab3
Jun 25 10:14:44 bento kernel: pc :  0000007fa43fb5f4     cfbf1
Jun 25 10:14:44 bento kernel: sp :  0000007f9b7fc620     e3224
Jun 25 10:14:44 bento kernel: unused :  0000007fa2fff034     e4eeb
Jun 25 10:14:44 bento kernel: Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by odroid » Tue Jul 30, 2019 11:47 am

We could observed the issue with interactive or ondemand governor.
Please try "performance" governor mode.
https://wiki.odroid.com/odroid-xu4/appl ... _systemctl

mrhash
Posts: 9
Joined: Thu Apr 11, 2019 7:15 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by mrhash » Sat Aug 03, 2019 9:14 am

Thanks, i disabled the ondemand service for now and things seems more stable.

mrhash
Posts: 9
Joined: Thu Apr 11, 2019 7:15 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by mrhash » Thu Aug 15, 2019 4:56 am

Having problems again since new kernel update. lots of oop bad mode errors... disappointing really..

mrhash
Posts: 9
Joined: Thu Apr 11, 2019 7:15 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by mrhash » Thu Aug 15, 2019 9:20 am

For example

Code: Select all

Aug 15 00:15:25 bento kernel: Bad mode in Error handler detected on CPU4, code 0xbf000002 -- SError
Aug 15 00:15:25 bento kernel: FAR:7ecc51c123
Aug 15 00:15:27 bento kernel: reg              value       pfn  reg              value       pfn
Aug 15 00:15:27 bento kernel: r0 :  000000003bffc0ea  --------  r1 :  000000001637dbf8  --------
Aug 15 00:15:27 bento kernel: r2 :  0000007ecc51d13f     ddf66  r3 :  00000000d9f75af1  --------
Aug 15 00:15:27 bento kernel: r4 :  00000000b025d6bf  --------  r5 :  0000000000000000  --------
Aug 15 00:15:27 bento kernel: r6 :  000000555946cd90     be40c  r7 :  000000555946c990     be40c
Aug 15 00:15:27 bento kernel: r8 :  000000555946c590     be40c  r9 :  000000555946c190     be40c
Aug 15 00:15:27 bento kernel: r10:  000000000000100b  --------  r11:  0000000000000000  --------
Aug 15 00:15:27 bento kernel: r12:  00000000dc86ca17  --------  r13:  000000000000270f  --------
Aug 15 00:15:27 bento kernel: r14:  0000000000000002  --------  r15:  0000000000000000  --------
Aug 15 00:15:27 bento kernel: r16:  0000000000000007  --------  r17:  0000007ec00010d8     571d4
Aug 15 00:15:27 bento kernel: r18:  0000007f79d01a70     bb994  r19:  0000007ecc51c134     f540d
Aug 15 00:15:27 bento kernel: r20:  000000555957a000     bd5b2  r21:  0000000000000000  --------
Aug 15 00:15:27 bento kernel: r22:  0000005559587000     c93d9  r23:  0000000000000000  --------
Aug 15 00:15:27 bento kernel: r24:  000000000000101c  --------  r25:  0000007ec5c891a0     427ba
Aug 15 00:15:27 bento kernel: r26:  0000007ec5c89198     427ba  r27:  000000000000101b  --------
Aug 15 00:15:27 bento kernel: r28:  0000005567098750     b91e3  r29:  0000007ec5c89010     427ba
Aug 15 00:15:27 bento kernel: r30:  00000055592a31cc     b4c5d
Aug 15 00:15:27 bento kernel: pc :  0000005559299638     b3497
Aug 15 00:15:27 bento kernel: sp :  0000007ec5c89010     427ba
Aug 15 00:15:27 bento kernel: unused :  0000007ecc51c123     f540d
Aug 15 00:15:27 bento kernel: Internal error: Oops - bad mode: 0 [#1] PREEMPT SMP
-- Reboot --

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Fri Aug 16, 2019 7:56 am

I have the same situation here. N2 updated with latest apt full-upgrade.

Crashes randomly since a few days but I was able to trigger the crash with a backup routine that use a program called fsarchiver.

Serial console full log is attached.

After starting the backup, a couple minutes writing a backup image crashes the system with the same message. I have a feeling it's something with meson driver.

After it automatically reboots, the sd card that was used starts to show a lot of erros (it's in the logs also). If I power cycle the board the SD is back to normal.

The log contains a full init, call to the backup script, crash, then reboot logs again until I issue a "shutdown -h now" at the end. So it's a full cycle log until shutdown.

I have manually edited adding an indication where the crash starts.

I did not have this issue with older kernels. It was stable before.

Thank you


putty_20190815_040241.log
(976.6 KiB) Downloaded 9 times

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Sun Aug 18, 2019 12:20 am

Added mem=3800m to my boot.ini and the problem has gone away. I was even having crashes when decompressing files, my N2 was pretty unusable.

Add it under boot args of the file /media/boot/boot.ini :

# Boot Args
setenv bootargs "... (other entries) mem=3800m"

So, for people having issues with random crashes, it looks like a memory violation of some sort is going on on the newest kernels.

To hard limit the RAM usage, try to add mem=3800m to your /media/boot/boot.ini and reboot.

I will keep observing the box, but so far it is not happening anymore under the situations where the crash was always triggered.

mrhash
Posts: 9
Joined: Thu Apr 11, 2019 7:15 pm
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by mrhash » Tue Aug 20, 2019 6:19 am

this seems to have helped me but can't be sure this is the root cause of the problem. will keep an eye on things. thanks

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Tue Aug 20, 2019 7:37 am

oh yea, it's just a workaround.

something really odd is going on on these new kernels indeed, which need root cause analysis and fixes.

so far, to make my N2 stable again with these latest kernels i had to:

- do this memory trick
- blacklist my disk enclosure from UAS
- force "performance" governor on the cpu

things have been pretty unstable since last month's+ kernel, can't remember which....

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by odroid » Tue Aug 20, 2019 9:14 am

I think this recent uboot update might be a root cause. Let's check it.
viewtopic.php?f=177&t=34773&p=265700#p265700

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Wed Aug 21, 2019 2:54 am

As far as my logs go, *it looks like* things started to go wild after linux-odroid-n2:arm64 (4.9.182-35, 4.9.184-37) upgrade.

4.9.184-37 *seems* to have started it all.

If i had a way to revert to 4.9.182-35 i could confirm it... But I dont know how.

User avatar
tobetter
Posts: 3911
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 155 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by tobetter » Wed Aug 21, 2019 3:51 am

lm7 wrote:
Wed Aug 21, 2019 2:54 am
As far as my logs go, *it looks like* things started to go wild after linux-odroid-n2:arm64 (4.9.182-35, 4.9.184-37) upgrade.

4.9.184-37 *seems* to have started it all.

If i had a way to revert to 4.9.182-35 i could confirm it... But I dont know how.
Please do update new U-boot with version, this will mitigate the instability issue.
https://github.com/hardkernel/u-boot/re ... droidn2-57
These users thanked the author tobetter for the post:
lm7 (Wed Aug 21, 2019 12:33 pm)

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Wed Aug 21, 2019 7:55 am

A new version of u-boot just appeared at the apt repo today:

u-boot/unknown 20190820-921e8f4-6 arm64 [upgradable from: 20190813-b2af230-5]

Can I use that one or the one you have posted?

Thanks

User avatar
tobetter
Posts: 3911
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 155 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by tobetter » Wed Aug 21, 2019 8:10 am

lm7 wrote:A new version of u-boot just appeared at the apt repo today:

u-boot/unknown 20190820-921e8f4-6 arm64 [upgradable from: 20190813-b2af230-5]

Can I use that one or the one you have posted?

Thanks
I think either would be fine.

"Tapatalk wishes you to have fun with ODROID"


lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Wed Aug 21, 2019 9:29 am

Okay, just did that and removed the memory trick from boot.ini and it works again. I see this uboot version reverted the memory commit that caused instability.

So the memory problem seems fixed, thanks.

But i still have problems with UAS driver, i still have to blacklist my disk enclosure or else i get these kind of errors:

[ 508.939539] sd 0:0:0:3: [sdd] tag#29 uas_eh_abort_handler 0 uas-tag 29 inflight: CMD OUT
[ 508.939556] sd 0:0:0:3: [sdd] tag#29 CDB: Write(16) 8a 00 00 00 00 00 43 2b e8 90 00 00 00 10 00 00
[ 508.939596] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[ 508.943702] xhci-hcd xhci-hcd.0.auto: @00000000cf6123e0 00000000 00000000 1b000000 04088001
[ 508.952269] sd 0:0:0:3: [sdd] tag#28 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT
[ 508.952284] sd 0:0:0:3: [sdd] tag#28 CDB: Write(16) 8a 00 00 00 00 00 43 2b e8 50 00 00 00 10 00 00
[ 508.952319] xhci-hcd xhci-hcd.0.auto: ERROR Transfer event for disabled endpoint or incorrect stream ring
[ 508.961896] xhci-hcd xhci-hcd.0.auto: @00000000cf612400 00000000 00000000 1b000000 04088001

(repeat over and over)

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by odroid » Wed Aug 21, 2019 10:52 am

We've made a trial kernel deb package which has the UAS driver as a module.
Please install it with "dpkg -i" and let us know the result.
https://dn.odroid.com/S922X/ODROID-N2/t ... _arm64.deb
These users thanked the author odroid for the post:
lm7 (Wed Aug 21, 2019 12:32 pm)

lm7
Posts: 9
Joined: Thu Aug 15, 2019 4:26 pm
languages_spoken: english
ODROIDs: N2
XU4
C2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by lm7 » Wed Aug 21, 2019 12:30 pm

Same errors and resets. Tried to blacklist the storage enclosure using modprobe.d config file but it didn't work somehow...

My issue is similar to this one, with the same ICY BOX enclosure hardware: https://ubuntuforums.org/archive/index. ... 07662.html

Blacklist only worked when I readded it to boot.ini... weird... If it's a module now it should be blacklisted via regular config file...

Thanks,

User avatar
odroid
Site Admin
Posts: 32166
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 122 times
Been thanked: 297 times
Contact:

Re: Regular kernel "Bad Mode" errors

Unread post by odroid » Wed Aug 21, 2019 1:35 pm

Very weird.
Should we update the uInitrd file in the boot partition too?
I hope other experts can give me any hint.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest