sas driver call trace and insmod/rmmod SAS ko
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu-18.04-hwe |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hardware: X6000 (saenger in 18T lab)
Firmware: sudo dmidecode shows "Vendor: Huawei Corp. Version: 0.95 Release Date: 08/15/2019"
Kernel: Linux saenger 5.0.0-23-generic #24~18.04.1-Ubuntu SMP Mon Jul 29 16:10:24 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@saenger:~$ cat /proc/cmdline
BOOT_IMAGE=
[Steps to Reproduce Issue]
1. Deploy the x6000 with bionic-hwe with MaaS. (Install the system via ISO should work as well. I did not try this.)
2. Install the 5.0.0-23 kernel by
KVERSION=5.0.0-23; sudo apt-get update; sudo apt-get install linux-headers-
3. Boot to the 5.0.0-23 kernel by
sudo grub-reboot '1>2'; sudo reboot
4. sudo rmmod hisi_sas_v3_hw
[Expected Result]
No kernel trace
[Actual Result]
Kernel trace shows up immediately (tail -f /var/log/syslog will help you see it), and the kernel module is not unloaded successfully.
ubuntu@saenger:~$ lsmod | grep sas
hisi_sas_v3_hw 49152 0
hisi_sas_main 57344 1 hisi_sas_v3_hw
megaraid_sas 143360 2
libsas 90112 2 hisi_sas_
scsi_transport_sas 40960 3 hisi_sas_
ubuntu@saenger:~$ rmmod hisi_sas_v3_hw
rmmod: ERROR: ../libkmod/
rmmod: ERROR: could not remove module hisi_sas_v3_hw: Operation not permitted
ubuntu@saenger:~$ sudo rmmod hisi_sas_v3_hw
Segmentation fault (core dumped)
ubuntu@saenger:~$ lsmod | grep sas
hisi_sas_v3_hw 49152 -1
hisi_sas_main 57344 1 hisi_sas_v3_hw
megaraid_sas 143360 2
libsas 90112 2 hisi_sas_
scsi_transport_sas 40960 3 hisi_sas_
ubuntu@saenger:~$
[Additional Information]
1. According to my test with saenger, the following steps in the original description seem not necessary:
1-1. not necessary to append "cpumax=15 nr_cpus=15" to cause the kernel trace
1-2. not necessary to rmmod/insmod over and over again
1-3. it does not matter if the disk is mounted or not when trying to rmmod. Besides, it does not matter if the hisi_sas_v3_hw kernel module is successfully unloaded or not. Invoking "rmmod" will just raise the kernel trace.
2. bionic-hwe 5.4 ((bionic-hwe, 5.4.0-67-generic) won't reproduce this issue by following the above steps, and the module could successfully unload.
ubuntu@saenger:~$ uname -a
Linux saenger 5.4.0-67-generic #75~18.04.1-Ubuntu SMP Tue Feb 23 19:15:33 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@saenger:~$ sudo rmmod hisi_sas_v3_hw
ubuntu@saenger:~$
ubuntu@saenger:~$ lsmod | grep sas
hisi_sas_main 73728 0
libsas 102400 1 hisi_sas_main
megaraid_sas 163840 2
scsi_transport_sas 45056 2 hisi_sas_
ubuntu@saenger:~$
====== Original Bug Description ======
[Bug Description]
if you use "intr_conv/
[Steps to Reproduce]
1)set grub.cfg cmdline to “cpumax=15 nr_cpus=15”
2)boot ubuntu 18.04.3(Ubuntu 5.0.0-23-generic)
3) rmmod hisi_sas_v3_hw
4)insmod hisi_sas_v3_hw.ko auto_affine_
5)rmmod hisi_sas_v3_hw
6)insmod hisi_sas_v3_hw.ko auto_affine_
7)rmmod hisi_sas_v3_hw
8)insmod hisi_sas_v3_hw.ko intr_conv=0
root@Ubuntu:
Architecture: aarch64
Byte Order: Little Endian
CPU(s): 15
On-line CPU(s) list: 0-14
Thread(s) per core: 1
Core(s) per socket: 15
Socket(s): 1
NUMA node(s): 4
Vendor ID: 0x48
Model: 0
Stepping: 0x1
CPU max MHz: 2600.0000
CPU min MHz: 200.0000
BogoMIPS: 200.00
L1d cache: 64K
L1i cache: 64K
L2 cache: 512K
L3 cache: 32768K
NUMA node0 CPU(s): 0-14
NUMA node1 CPU(s):
NUMA node2 CPU(s):
NUMA node3 CPU(s):
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asi
[Actual Results]
[ 335.426740] CPU: 4 PID: 2825 Comm: insmod Not tainted 5.0.0-23-generic #24~18.04.1-Ubuntu
[ 335.434878] Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V5.B110.01 01/07/2021
[ 335.443708] pstate: 40400009 (nZcv daif +PAN -UAO)
[ 335.448476] pc : free_contig_
[ 335.452727] lr : free_contig_
[ 335.456975] sp : ffff000011a2b7b0
[ 335.460274] x29: ffff000011a2b7b0 x28: ffff0000110ce000
[ 335.465560] x27: ffff0000116fbfd0 x26: ffff0000092945d0
[ 335.470847] x25: 000000000000102a x24: ffff0000110ce000
[ 335.476133] x23: 0000000000000400 x22: ffff7e0000000000
[ 335.481419] x21: 000000000003cb15 x20: 000000000003cb15
[ 335.486705] x19: 000000000003cb15 x18: ffffffffffffffff
[ 335.491991] x17: 0000000000000000 x16: 0000000000000000
[ 335.497277] x15: ffff0000116cc708 x14: ffff000091a2b497
[ 335.502563] x13: ffff000011a2b4a5 x12: ffff0000116f2000
[ 335.507849] x11: 0000000005f5e0ff x10: ffff0000116cd168
[ 335.513135] x9 : ffff0000112e6018 x8 : ffff000010796668
[ 335.518421] x7 : 6120736567617020 x6 : ffff8027ffee8210
[ 335.523707] x5 : ffff8027ffee8210 x4 : 0000000000000000
[ 335.528993] x3 : ffff8027ffef0948 x2 : ffff8027ffee8210
[ 335.534279] x1 : ed551064fa983e00 x0 : 0000000000000000
[ 335.539566] Call trace:
[ 335.542003] free_contig_
[ 335.545908] cma_release+
[ 335.549380] dma_free_
[ 335.553457] dma_direct_
[ 335.557189] dma_free_
[ 335.560835] dmam_release+
[ 335.564307] release_
[ 335.568039] devres_
[ 335.572032] really_
[ 335.575590] driver_
[ 335.579841] __driver_
[ 335.583745] bus_for_
[ 335.587563] driver_
[ 335.591121] bus_add_
[ 335.594940] driver_
[ 335.598759] __pci_register_
[ 335.603012] sas_v3_
[ 335.608991] do_one_
[ 335.612810] do_init_
[ 335.616542] load_module+
[ 335.620274] __se_sys_
[ 335.624611] __arm64_
[ 335.629122] el0_svc_
[ 335.632854] el0_svc_
[ 335.636586] el0_svc+0x8/0xc
[ 335.639452] ---[ end trace 2d56e2c20fb40c7c ]---
[ 335.644080] BUG: Bad page state in process insmod pfn:37356
[ 335.649722] page:ffff7e0000
[ 335.657698] flags: 0xffff000000100
[ 335.662042] raw: 00ffff0000001000 ffff7e0000dcd588 ffff7e0000dcd588 0000000000000000
[ 335.669755] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[ 335.677466] page dumped because: PAGE_FLAGS_
[ 335.683881] bad because of flags: 0x1000(reserved)
[Expected Results]
no error
[Reproducibility]
100%
[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required):
kernel version:Linux Ubuntu 5.0.0-23-generic #24~18.04.1-Ubuntu SMP Mon Jul 29 16:10:24 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
build bionic source deb package,installing this deb, and not reproduce this bug.
[Resolution]
NA
Changed in kunpeng920: | |
assignee: | nobody → Taihsiang Ho (taihsiangho) |
tags: | added: tairadar |
tags: | removed: tairadar |
Changed in kunpeng920: | |
assignee: | Taihsiang Ho (taihsiangho) → nobody |
Hi @Fred, may you elaborate how you boot the system in more details if possible? For example, did you boot the system with ram disk instead of hard disk? It's not possible to unload hisi_sas_v3_hw when your system boots with hard disks, so I suppose you booted the system without mounting any hard disk.