IncentivesPro Forum Index IncentivesPro
Leading USB solutions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] Kernel ooops on Raspberry Pi 4

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IncentivesPro Forum Index -> USB Redirector for Linux
View previous topic :: View next topic  
Author Message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Wed Oct 02, 2019 8:06 pm    Post subject: [SOLVED] Kernel ooops on Raspberry Pi 4 Reply with quote

USB server is working perfectly on Raspberry Pi3 but with the Raspberry Pi4 we have an Kernel oops as follow :

Code:

[74100.930395] tusbd: loading out-of-tree module taints kernel.
[74100.932466] usbcore: registered new interface driver tusb-stub-driver
[74100.932559] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[74100.932570] pgd = 4c3011cf
[74100.932576] [00000008] *pgd=296d3003, *pmd=7d21e003
[74100.932592] Internal error: Oops: 207 [#1] SMP ARM
[74100.932598] Modules linked in: tusbd(O+) fuse rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic 8021q garp stp llc brcmfmac brcmutil sha256_generic raspberrypi_hwmon hwmon cfg80211 snd_bcm2835(C) rfkill snd_pcm bcm2835_codec(C) snd_timer snd v4l2_mem2mem bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) v4l2_common videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) rpivid_mem uio_pdrv_genirq uio fixed i2c_dev ip_tables x_tables ipv6
[74100.932736] CPU: 0 PID: 9133 Comm: modprobe Tainted: G         C O      4.19.75-v7l+ #1270
[74100.932742] Hardware name: BCM2835
[74100.932756] PC is at get_device_parent+0x90/0x1bc
[74100.932763] LR is at get_device_parent+0x60/0x1bc
[74100.932768] pc : [<c06d9bec>]    lr : [<c06d9bbc>]    psr: a0000013
[74100.932773] sp : ea721c70  ip : ea721c70  fp : ea721c8c
[74100.932778] r10: ed56ab80  r9 : 00000002  r8 : c1065fc8
[74100.932783] r7 : bf081288  r6 : c1004d88  r5 : bf081288  r4 : c1065fd0
[74100.932788] r3 : 00000000  r2 : fffffffc  r1 : e92dd8d4  r0 : e92dd830
[74100.932794] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[74100.932800] Control: 30c5383d  Table: 281a5800  DAC: fffffffd
[74100.932806] Process modprobe (pid: 9133, stack limit = 0x548a6388)
[74100.932812] Stack: (0xea721c70 to 0xea722000)
[74100.932818] 1c60:                                     00000003 bf081290 00000000 c1004d88
[74100.932824] 1c80: ea721cdc ea721c90 c06d9df4 c06d9b68 c0984cf4 c035f4a4 ea721cd8 c1004d88
[74100.932830] 1ca0: c1004d88 bf081278 ea721cd0 c0fcc112 c06d7a74 bf081278 00000000 bf081278
[74100.932836] 1cc0: 00000000 bf081288 00000002 ed56ab80 ea721d04 ea721ce0 c06df23c c06d9d24
[74100.932843] 1ce0: bf0812e0 bf081278 c1004d88 00000000 00000000 ed56ab40 ea721d1c ea721d08
[74100.932849] 1d00: c06dff3c c06df184 ee43d940 bf081ab0 ea721d84 ea721d20 bf077e8c c06dff18
[74100.932855] 1d20: c099a4f0 c0997e10 00000002 c0246250 ea721d54 0007606e 0002dc7a 000010d8
[74100.932861] 1d40: 00007bab bf0810b0 ea721d64 ea721d58 00048000 0000fedd 00001000 ea721d68
[74100.932868] 1d60: bf0759dc c0fcc112 00000000 bf0b3000 c1004d88 00000000 ea721d9c ea721d88
[74100.932874] 1d80: bf0b304c bf077dfc bf081440 bf0b3000 ea721e14 ea721da0 c02030cc bf0b300c
[74100.932880] 1da0: ea721dcc c0997e34 00000000 006000c0 ea721dcc ea721dc0 c0997e34 c0399fac
[74100.932886] 1dc0: ea721e14 ea721dd0 c0399fac c03a6da4 c039b3c4 c039a84c 00000001 00353019
[74100.932893] 1de0: ec298800 a0000013 f1319000 c0fcc112 bf081440 bf081440 bf081440 ec2987c0
[74100.932899] 1e00: c1004d88 ed56ab40 ea721e3c ea721e18 c02bb8f4 c0203088 ea721e3c ea721e28
[74100.932905] 1e20: c0387cb4 ea721f30 bf081440 00000002 ea721f0c ea721e40 c02ba86c c02bb88c
[74100.932911] 1e40: bf08144c 00007fff bf081440 c02b7870 00000000 c0c00034 bf08163c bf081554
[74100.932917] 1e60: bf081570 00000001 ed56ab48 bf081488 ea721e94 c0c1c56c c03b0018 c03afe84
[74100.932923] 1e80: ea721ea0 e68c4e40 00000000 00000000 00000000 00000000 00000000 00000000
[74100.932929] 1ea0: 6e72656b 00006c65 00000000 00000000 00000000 00000000 00000000 00000000
[74100.932935] 1ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c0fcc112
[74100.932941] 1ee0: 7fffffff c1004d88 00000000 00000003 0002d064 7fffffff 00000000 0000017b
[74100.932947] 1f00: ea721fa4 ea721f10 c02bb0cc c02b8ab8 7fffffff 00000000 00000003 00000000
[74100.932954] 1f20: 00000000 f1319000 0001d08c 00000000 f1327582 f13291c0 f1319000 0001d08c
[74100.932960] 1f40: f133595c f13357a0 f132e8d8 00013000 000156e0 00000000 00000000 00000000
[74100.932966] 1f60: 000052e0 0000002b 0000002c 00000020 00000024 00000010 00000000 c0fcc112
[74100.932972] 1f80: 80b12c00 01933798 00000000 0000017b c02011c4 ea720000 00000000 ea721fa8
[74100.932979] 1fa0: c0201000 c02bb01c 80b12c00 01933798 00000003 0002d064 00000000 0002ec3c
[74100.932985] 1fc0: 80b12c00 01933798 00000000 0000017b 01934d30 00000000 01934c90 00000000
[74100.932991] 1fe0: bee1dfd8 bee1dfc8 00022cb8 b6c2daf0 60000010 00000003 00000000 00000000
[74100.933004] [<c06d9bec>] (get_device_parent) from [<c06d9df4>] (device_add+0xdc/0x600)
[74100.933014] [<c06d9df4>] (device_add) from [<c06df23c>] (platform_device_add+0xc4/0x22c)
[74100.933023] [<c06df23c>] (platform_device_add) from [<c06dff3c>] (platform_device_register+0x30/0x34)
[74100.933050] [<c06dff3c>] (platform_device_register) from [<bf077e8c>] (IlIIlIllI+0x9c/0xf0 [tusbd])
[74100.933101] [<bf077e8c>] (IlIIlIllI [tusbd]) from [<bf0b304c>] (lIIlllIll+0x4c/0x1000 [tusbd])
[74100.933125] [<bf0b304c>] (lIIlllIll [tusbd]) from [<c02030cc>] (do_one_initcall+0x50/0x218)
[74100.933135] [<c02030cc>] (do_one_initcall) from [<c02bb8f4>] (do_init_module+0x74/0x220)
[74100.933145] [<c02bb8f4>] (do_init_module) from [<c02ba86c>] (load_module+0x1dc0/0x2404)
[74100.933153] [<c02ba86c>] (load_module) from [<c02bb0cc>] (sys_finit_module+0xbc/0xcc)
[74100.933161] [<c02bb0cc>] (sys_finit_module) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
[74100.933166] Exception stack(0xea721fa8 to 0xea721ff0)
[74100.933173] 1fa0:                   80b12c00 01933798 00000003 0002d064 00000000 0002ec3c
[74100.933179] 1fc0: 80b12c00 01933798 00000000 0000017b 01934d30 00000000 01934c90 00000000
[74100.933184] 1fe0: bee1dfd8 bee1dfc8 00022cb8 b6c2daf0
[74100.933192] Code: e5923004 e1510003 e2432004 0a000014 (e5933008)
[74100.933200] ---[ end trace 2f61d94e18a2bcfc ]---



This is on Raspberry Pi4 - 1Gb memory variant and with latest kernel 4.19.75-v7l+ :
Code:

#uname -a
Linux raspberrypi-0fc867 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux


Do you have any information or need some more information to correct it ?


Last edited by roms on Thu Oct 03, 2019 2:49 pm; edited 3 times in total
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Wed Oct 02, 2019 8:29 pm    Post subject: Reply with quote

Hi roms
Thank you for reporting this. And while we are looking into it, you can try re-installing USB Redirector in server-only mode (./installer.sh install-server), because it looks like the crash happens in USB client part.
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 9:19 am    Post subject: Reply with quote

Thanks for your quick reply. This is working is server mode only Very Happy
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 10:20 am    Post subject: Reply with quote

oops on another rpi4 :

Code:

[   24.066180] tusbd: loading out-of-tree module taints kernel.
[   24.068711] usbcore: registered new interface driver tusb-stub-driver
[   24.632650] Unable to handle kernel paging request at virtual address 0401007a
[   24.632677] pgd = efd591fe
[   24.632693] [0401007a] *pgd=2a6e6003, *pmd=00000000
[   24.632737] Internal error: Oops: 206 [#1] SMP ARM
[   24.632758] Modules linked in: tusbd(O) fuse rfcomm bnep hci_uart btbcm serdev bluetooth ecdh_generic 8021q garp stp llc brcmfmac brcmutil sha256_generic raspberrypi_hwmon snd_bcm2835(C) hwmon snd_pcm cfg80211 snd_timer snd rfkill bcm2835_v4l2(C) bcm2835_codec(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) v4l2_common videobuf2_dma_contig videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) rpivid_mem uio_pdrv_genirq fixed uio i2c_dev ip_tables x_tables ipv6
[   24.633129] CPU: 3 PID: 855 Comm: usbsrvd Tainted: G         C O      4.19.75-v7l+ #1270
[   24.633143] Hardware name: BCM2835
[   24.633191] PC is at IlIlllIl+0x64/0x174 [tusbd]
[   24.633224] LR is at llIlIllll+0x6d4/0x794 [tusbd]
[   24.633238] pc : [<bf7f9a90>]    lr : [<bf7f1034>]    psr: 20000013
[   24.633251] sp : e7c91e10  ip : e7c91e38  fp : e7c91e34
[   24.633263] r10: 00000036  r9 : e7c90000  r8 : 00000003
[   24.633276] r7 : bf7fc090  r6 : 00000001  r5 : ee6d7c00  r4 : 00000001
[   24.633289] r3 : ee5ba640  r2 : 00000014  r1 : 0401000e  r0 : ee6d7c00
[   24.633304] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   24.633318] Control: 30c5383d  Table: 2a7c95c0  DAC: 55555555
[   24.633334] Process usbsrvd (pid: 855, stack limit = 0xa6d1f393)
[   24.633348] Stack: (0xe7c91e10 to 0xe7c92000)
[   24.633363] 1e00:                                     00000000 c1004d88 ee6d7c00 ee6d7cac
[   24.633379] 1e20: 00000003 e7c90000 e7c91ec4 e7c91e38 bf7f1034 bf7f9a38 00000000 00000004
[   24.633395] 1e40: 0000000b 00000000 ef18f510 ec697b28 00010001 e7c91e54 e7c91e54 b61aa2f4
[   24.633411] 1e60: ed6eea00 c1004d88 c1004d88 e7c91f50 2d311e90 00000031 00000000 00000000
[   24.633427] 1e80: 00000000 00000000 00000000 00000000 00000000 b61aa2f4 c1010b80 c1004d88
[   24.633443] 1ea0: bec68808 ec3da8a0 eca719c0 00000003 e7c90000 00000036 e7c91ed4 e7c91ec8
[   24.633458] 1ec0: bf7f0114 bf7f096c e7c91f6c e7c91ed8 c03c4620 bf7f00ec 00000000 eceb76c0
[   24.633474] 1ee0: 00000000 00000000 00000000 c10a6510 eceb76c0 00000142 e7c91f14 e7c91f08
[   24.633489] 1f00: c02919e8 c099d138 e438851c e4388000 e4388538 c10a6510 00000000 c0e97ad8
[   24.633505] 1f20: c0242190 e4388000 e4388538 c03d08f4 0004be00 bec68808 00012bb0 b61aa2f4
[   24.633520] 1f40: e7c91f5c eca719c1 bec68808 eca719c0 000040cc 00000003 e7c90000 00000036
[   24.633536] 1f60: e7c91f94 e7c91f70 c03c4dac c03c4570 bec68808 0004be00 01008cb8 00012bb0
[   24.633552] 1f80: 00000036 c02011c4 e7c91fa4 e7c91f98 c03c4dec c03c4d74 00000000 e7c91fa8
[   24.633567] 1fa0: c0201000 c03c4de0 0004be00 01008cb8 00000003 000040cc bec68808 bec68808
[   24.633583] 1fc0: 0004be00 01008cb8 00012bb0 00000036 00000000 00000000 b6f2d000 bec68834
[   24.633598] 1fe0: 00089b10 bec687fc 0004be6c b6c1551c a0000010 00000003 00000000 00000000
[   24.633684] [<bf7f9a90>] (IlIlllIl [tusbd]) from [<bf7f1034>] (llIlIllll+0x6d4/0x794 [tusbd])
[   24.633733] [<bf7f1034>] (llIlIllll [tusbd]) from [<bf7f0114>] (IlllllIlI+0x34/0x48 [tusbd])
[   24.633780] [<bf7f0114>] (IlllllIlI [tusbd]) from [<c03c4620>] (do_vfs_ioctl+0xbc/0x804)
[   24.633806] [<c03c4620>] (do_vfs_ioctl) from [<c03c4dac>] (ksys_ioctl+0x44/0x6c)
[   24.633829] [<c03c4dac>] (ksys_ioctl) from [<c03c4dec>] (sys_ioctl+0x18/0x1c)
[   24.633851] [<c03c4dec>] (sys_ioctl) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
[   24.633864] Exception stack(0xe7c91fa8 to 0xe7c91ff0)
[   24.633880] 1fa0:                   0004be00 01008cb8 00000003 000040cc bec68808 bec68808
[   24.633896] 1fc0: 0004be00 01008cb8 00012bb0 00000036 00000000 00000000 b6f2d000 bec68834
[   24.633909] 1fe0: 00089b10 bec687fc 0004be6c b6c1551c
[   24.633927] Code: e2844001 e7931102 e3510000 0afffff7 (e591206c)
[   24.633972] ---[ end trace 7b5db9a9d0038080 ]---

Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Thu Oct 03, 2019 10:25 am    Post subject: Reply with quote

Hi roms,

Is it possible that you updated the kernel without updating raspberrypi-kernel-headers package?
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 12:16 pm    Post subject: Reply with quote

Kernel and Headers are the same version :

Code:
root@raspberrypi-1e789a:~# dpkg -s raspberrypi-kernel-headers
Package: raspberrypi-kernel-headers
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 215969
Maintainer: Serge Schneider <serge@raspberrypi.org>
Architecture: armhf
Source: raspberrypi-firmware
[b]Version: 1.20190925-1[/b]
Provides: linux-headers
Description: Header files for the Raspberry Pi Linux kernel
 This package provides the architecture-specific kernel header files for
 the Raspberry Pi Linux kernel, generally used for building out-of-tree
 kernel modules.
Homepage: https://github.com/raspberrypi/firmware


Code:

root@raspberrypi-1e789a:~# dpkg -s raspberrypi-kernel
Package: raspberrypi-kernel
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 272917
Maintainer: Serge Schneider <serge@raspberrypi.org>
Architecture: armhf
Source: raspberrypi-firmware
[b]Version: 1.20190925-1[/b]
Replaces: raspberrypi-bootloader (<< 1.20160324-1)
Provides: linux-image
Breaks: raspberrypi-bootloader (<< 1.20160324-1)
Conffiles:
 /etc/default/raspberrypi-kernel aa1f56ed7333c9749dba288036f96334
Description: Raspberry Pi bootloader
 This package contains the Raspberry Pi Linux kernel.
Homepage: https://github.com/raspberrypi/firmware
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Thu Oct 03, 2019 12:24 pm    Post subject: Reply with quote

Did you run rpi-update?
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Thu Oct 03, 2019 12:42 pm    Post subject: Reply with quote

Also, it is important to use the same gcc version which was used to compile the kernel itself.
You can check gcc version that was used to compile the kernel by running `cat /proc/version` and compare it with your currently installed gcc by running `gcc --version`
Can you check?
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 12:52 pm    Post subject: Reply with quote

I did not run rpi-update
gcc is the one provided with raspbian.

On the faulty rpi4 :
Code:

root@raspberrypi-1e789a:~# cat /proc/version
Linux version 4.19.75-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1270 SMP Tue Sep 24 18:51:41 BST 2019
root@raspberrypi-1e789a:~# gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


On one correct rpi4 :
Code:

root@raspberrypi-1e7a2c:~# cat /proc/version
Linux version 4.19.75-v7l+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88                                                                                                    -g8460611)) #1270 SMP Tue Sep 24 18:51:41 BST 2019
root@raspberrypi-1e7a2c:~# gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 12:54 pm    Post subject: Reply with quote

Please note, that module is correctly load.

But I have a Kernell Oops when usbsrvd is running. I did try with usb-redirector-linux-arm-gnueabi and usb-redirector-linux-arm-gnueabihf.

For now, there is no usb device attached to rpi4.
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 2:27 pm    Post subject: Reply with quote

OK ! It's working ! I did have to do manually

make KERNELDIR=/lib/modules/$(uname -r)/build/ clean
and
make scripts inside /lib/modules/$(uname -r)/build/ to make it work

Thanks Peter !
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Thu Oct 03, 2019 3:56 pm    Post subject: Reply with quote

Hmm...sounds odd. That probably eliminated compiler version differences. Because such random crashes (based on your logs, they happened in different unrelated parts of code) usually happen because of wrong compilers or wrong kernel-headers.

Anyway, I'm glad to know that it works now! Let me know if this problem happens again.
Back to top
View user's profile Send private message
roms



Joined: 11 Jan 2012
Posts: 24

PostPosted: Thu Oct 03, 2019 8:09 pm    Post subject: Reply with quote

Yes, you have right : latest raspberrypi-kernel-headers (1.20190925-1) on raspbian/buster was faulty and packaged for AARCH64.
"make scripts", inside kernel-headers dir, did resolved the issue.
Thanks again for your help.
Back to top
View user's profile Send private message
Peter
Site Admin


Joined: 01 Aug 2007
Posts: 653

PostPosted: Fri Oct 04, 2019 9:31 am    Post subject: Reply with quote

Ok, that explains everything Smile Thanks for update!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    IncentivesPro Forum Index -> USB Redirector for Linux All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group