BTRFS Kernel panic

Post Reply
ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

BTRFS Kernel panic

Unread post by ollil » Tue Jul 30, 2019 3:20 am

Hi,

i see a "Unable to handle kernel NULL pointer dereference" when i create a file on my BTRFS RAID1. After this the odroid-n2 is rebooting.
I have a fresh install of the image ubuntu-18.04.2-4.9-minimal-odroid-n2-20190329.img kernel Linux odroid 4.9.184-37
The two HDD worked on a raspberry i've just moved them to the odroid-n2, they are connected to a powered USB 3.0 hub and the hub to the odroid-n2.
the syslog shows:

Jul 29 17:32:57 odroid kernel: [ 1251.395341@0] Internal error: Oops: 96000005 [#1] PREEMPT SMP
Jul 29 17:32:57 odroid kernel: [ 1251.401017@0] Modules linked in: btrfs raid6_pq fuse xor rtc_pcf8563 i2c_meson_master sch_fq_codel amvdec_vp9 amvdec_vc1 amvdec_real amvdec_mmpeg4 amvdec_mpeg4 amvdec_mpeg12 amvdec_mmjpeg amvdec_mjpeg amvdec_h265 amvdec_h264mvc amvdec_mh264 amvdec_h264 amvdec_avs stream_input decoder_common firmware media_clock nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables ipv6
Jul 29 17:32:57 odroid kernel: [ 1251.434387@0] CPU: 0 PID: 2225 Comm: btrfs-transacti Tainted: G W 4.9.184-37 #1
Jul 29 17:32:57 odroid kernel: [ 1251.442787@0] Hardware name: Hardkernel ODROID-N2 (DT)
Jul 29 17:32:57 odroid kernel: [ 1251.447902@0] task: ffffffc0c7d92a00 task.stack: ffffffc0c5c50000
Jul 29 17:32:57 odroid kernel: [ 1251.453980@0] PC is at __do_page_cache_readahead+0x48/0x2b0
Jul 29 17:32:57 odroid kernel: [ 1251.459519@0] LR is at ondemand_readahead+0x118/0x278
Jul 29 17:32:57 odroid kernel: [ 1251.464542@0] pc : [<ffffff80091d7608>] lr : [<ffffff80091d7988>] pstate: 20000145
...
Jul 29 17:32:57 odroid kernel: [ 1253.092478@0] Kernel panic - not syncing: Aiee, killing interrupt

Has anybody a idear to fix this?
thanks in advance.

best regards
olli

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

Re: BTRFS Kernel panic

Unread post by odroid » Tue Jul 30, 2019 10:58 am

Please add one kernel argument usb-xhci.tablesize=2 to /media/boot/boot.ini. So it would be look like this.

Code: Select all

# Boot Args
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 levator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} outmode=${voutmode} ${cmode} disablehpd=${disablehpd} cvbscable=${cvbscable} overscan=${overscan} ${hid_quirks} usb-xhci.tablesize=2"
And let me know the result.

ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by ollil » Tue Jul 30, 2019 5:10 pm

Hello,

thank you for your answer.
Still the same problem.
For this test i connect the hdd's direct to the odroid-n2. Attached you will find the dmesg output after adding tablesize=2, rebooting and touching file on btrfs.

Please let me know if you need aynthing else.

Jul 30 07:51:50 odroid kernel: [ 990.138745@0] Unable to handle kernel NULL pointer dereference at virtual address 00000044
Jul 30 07:51:50 odroid kernel: [ 990.141465@0] pgd = ffffffc0c2493000
Jul 30 07:51:51 odroid kernel: [ 990.146551@0] [0000000000000044] *pgd=0000000000000000, *pud=0000000000000000
Jul 30 07:51:51 odroid kernel: [ 990.152034@0] Internal error: Oops: 96000005 [#1] PREEMPT SMP
Jul 30 07:51:51 odroid kernel: [ 990.157749@0] Modules linked in: btrfs raid6_pq xor rtc_pcf8563 i2c_meson_master sch_fq_codel amvdec_vp9 amvdec_vc1 amvdec_real amvdec_mmpeg4 amvdec_mpeg4 amvdec_mpeg12 amvdec_mmjpeg amvdec_mjpeg amvdec_h265 amvdec_h264mvc amvdec_mh264 amvdec_h264 amvdec_avs stream_input decoder_common firmware nfsd media_clock auth_rpcgss nfs_acl lockd grace sunrpc ip_tables x_tables ipv6
Jul 30 07:51:51 odroid kernel: [ 990.190687@0] CPU: 0 PID: 2777 Comm: touch Tainted: G W 4.9.184-37 #1
Jul 30 07:51:51 odroid kernel: [ 990.198220@0] Hardware name: Hardkernel ODROID-N2 (DT)
Jul 30 07:51:51 odroid kernel: [ 990.203336@0] task: ffffffc0c1cf8000 task.stack: ffffffc0c1c94000
Jul 30 07:51:51 odroid kernel: [ 990.209414@0] PC is at __do_page_cache_readahead+0x48/0x2b0
Jul 30 07:51:51 odroid kernel: [ 990.214951@0] LR is at ondemand_readahead+0x118/0x278
Jul 30 07:51:51 odroid kernel: [ 990.219975@0] pc : [<ffffff80091d7608>] lr : [<ffffff80091d7988>] pstate: 20000145

thanks in advance

best regards
olli
Attachments
dmesg.txt
(92.59 KiB) Downloaded 4 times

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

Re: BTRFS Kernel panic

Unread post by odroid » Tue Jul 30, 2019 5:24 pm

Since we have no experience of using the BTRFS, we don't know where is the problem at this moment.

We will try it a few days later once this on-going test is settled.
viewtopic.php?f=181&t=35031&start=100#p263905

Meanwhile, update the system with "apt upgrade" again to have a more responsive USB IRQ handler.

xabolcs
Posts: 47
Joined: Fri Jun 22, 2018 6:37 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 58 times
Been thanked: 1 time
Contact:

Re: BTRFS Kernel panic

Unread post by xabolcs » Tue Jul 30, 2019 7:07 pm

ollil, I reproduced the issue without RAID and USB: directly on the eMMC card.

ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by ollil » Tue Jul 30, 2019 8:16 pm

Thank you xabolcs.
So it is not related to my configuration.
Hopefully odroid will find the solution.

Thank you both

Best regards
Olli

Gesendet von meinem SM-T580 mit Tapatalk


ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by ollil » Sun Aug 11, 2019 8:59 pm

Hello,

yust to inform you.

My problem with BTRFS was related to my HDDs and UAS.
My environment:
2x USB3 HDD Maxtor HX-M201TCB/GMR (M3 Portable 2TB) inside is Seagate ST2000LM007, direct connected to the odroid.
# uname -a
Linux odroid 4.9.185-44 #1 SMP PREEMPT Wed Jul 31 23:50:32 -03 2019 aarch64 aarch64 aarch64 GNU/Linux
# mkfs.btrfs -f -m raid1 -d raid1 /dev/sda1 /dev/sdb1
btrfs-progs v4.15.1
# lsusb
Bus 002 Device 006: ID 0bc2:61b5 Seagate RSS LLC
Bus 002 Device 005: ID 0bc2:61b5 Seagate RSS LLC
Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Disabled UAS in boot.ini by appending this "usb-storage.quirks=0bc2:61b5:u" to the # Boot Args.
Test procedure
# dd if=/dev/zero of=/media/usb0/zero_test.bin bs=1024M count=10
and scp 39GB over network to the filesystem.

Best regards,

olli

xabolcs
Posts: 47
Joined: Fri Jun 22, 2018 6:37 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 58 times
Been thanked: 1 time
Contact:

Re: BTRFS Kernel panic

Unread post by xabolcs » Sun Aug 11, 2019 11:07 pm

Interesting.

I tried to disabling UAS, but didn't help for me.

Please test your setup with f3write & f3read from the f3 package!
Please read it's manual to avoid testing all the free space! ;)

ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by ollil » Tue Aug 13, 2019 1:48 pm

Sh*t
With f3write has a problem.
F3 is a good test procedure.


Gesendet von meinem SM-T580 mit Tapatalk


sbi
Posts: 14
Joined: Wed May 01, 2019 8:07 pm
languages_spoken: german, english
ODROIDs: xu4, n2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by sbi » Wed Aug 14, 2019 1:26 am

I also had crashes with btrfs on arm with the 4.9 kernels. I really think that there are bugs in the kernel's btrfs implementation on arm. When I moved with my XU4 from 4.9 to a more recent kernel the crashes where gone. Then I got my N2 and with the stock kernel (4.9) I also had crashes. Now I am running the mainline kernel and no crashes at all...

elatllat
Posts: 1433
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: BTRFS Kernel panic

Unread post by elatllat » Thu Aug 15, 2019 4:21 am

Use 5.3 for now if you want working btrfs.

ollil
Posts: 8
Joined: Tue Jul 30, 2019 2:55 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: BTRFS Kernel panic

Unread post by ollil » Sun Aug 18, 2019 4:04 am

Hi elatllat,

mainline 5.3 seems to work. I think I'll stay with this kernel.
Do you know how to disable the blue led with this kernel?

thanx

best regards

olli

elatllat
Posts: 1433
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: BTRFS Kernel panic

Unread post by elatllat » Sun Aug 18, 2019 11:35 am

ollil wrote:
Sun Aug 18, 2019 4:04 am
...Do you know how to disable the blue led with [5.3] kernel?...
No, sorry.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 3 guests