Wind River Support Network

HomeDefectsLIN9-2282
Not to be fixed

LIN9-2282 : intel-kabylake-64: pci_generic_uio test caught calltrace

Created: Nov 17, 2016    Updated: Mar 6, 2019
Resolved Date: Feb 19, 2019
Found In Version: unknown
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: BSP

Description

 pci_generic_uio (keyword: 00:1f.6) testing
######################################################### 

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# cat /sys/bus/pci/devices/0000:00:1f.6/vendor
0x8086
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# cat /sys/bus/pci/devices/0000:00:1f.6/device
0x1570
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# find /sys/bus/pci/drivers/ -name *0000:00:1f.6*
/sys/bus/pci/drivers/e1000e/0000:00:1f.6
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# ls /sys/devices | grep pci
pci0000:00
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# find /sys/devices/pci*/ -name *0000:00:1f.6*
/sys/devices/pci0000:00/0000:00:1f.6
<< [do_test1] start PCI UIO Generic bind device testing>>
********************
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# modinfo uio_pci_generic
filename:       /lib/modules/4.8.3-WR9.0.0.0_standard/kerne1000e 0000:00:1f.6 eth0: removed PHC
el/drivers/uio/uio_pci_generic.ko
description:    Generic UIO driver for PCI 2.3 devices
author:         Michael S. Tsirkin <mst@redhat.com>
license:        GPL v2
version:        0.01.0
srcversion:     41BEEDE6B2A7E267E6CCD84
depends:        uio
intree:         Y
vermagic:       4.8.3-WR9.0.0.0_standard SMP preempt mod_unload 
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# modprobe uio_pci_generic

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo "8086 1570" > /sys/bus/pci/drivers/uio_pci_generic/new_id

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/e1000e/unbind
e1000e: eth0 NIC Link is Down

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/uio_pci_generic/bind

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# /bin/ls -l /sys/bus/pci/devices/0000:0e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
0:1f.6/driver |grep uio
lrwxrwxrwx 1 root root 0 Nov 18 05:39 /sys/bus/pci/devices/0000:00:1f.6/driver -> ../../../bus/pci/drivers/uio_pci_generic
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/uio_pci_generic/unbind

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/e1000e/bind
e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock
e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 90:49:fa:20:6d:a7
e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# /bin/ls -l /sys/bus/pci/devices/0000:00:1f.6/driver |grep e1000e
lrwxrwxrwx 1 root root 0 Nov 18 05:39 /sys/bus/pci/devices/0000:00:1f.6/driver -> ../../../bus/pci/drivers/e1000e
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# lsmod | grep uio
uio_pci_generic         2048  0
uio                     9973  1 uio_pci_generic
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# modprobe -r uio_pci_generic

<<end PCI UIO Generic bind device testing>>
********************
<<clean subcase>>
********************

<< [do_test2] start PCI UIO Generic stable testing>>
*******************e1000e 0000:00:1f.6 eth0: removed PHC
*
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# modprobe uio_pci_generic

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo "8086 1570" > /sys/bus/pci/drivers/uio_pci_generic/new_id

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/e1000e/unbind

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo -n 0000:00:1f.6 > /sys/bus/pci/drivers/uio_pci_generic/bind

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# /bin/ls -l /sys/bus/pci/devices/0000:00:1f.6/driver |grep uio
lrwxrwxrwx 1 root root 0 Nov 18 05:39 /sys/bus/pci/devices/0000:00:1f.6/driver -> ../../../bus/pci/drivers/uio_pci_generic
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# ukern /dev/uio0 &

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# sleep 1

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# pidof ukern
30278
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# echo 1 > /sys/devices/pci0000:00/0000:00:1f.6/remove

root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# pidof ukern
30278
root@localhost:/opt/wr-test/testcases/bts/pci_generic_uio# wait 30278
BUG: unable to handle kernel NULL pointer dereference at 0000000000000200
IP: [<ffffffffa0d36490>] uio_release+0x20/0x60 [uio]
PGD 0 
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: uio_pci_generic uio i2c_dev ip_tables x_tables deflate ctr twofish_generic twofish_common camellia_generic serpent_generic blowfish_generic blowfish_common cast5_generic cast_common xcbc sha512_ssse3 sha512_generic af_key bnep iTCO_wdt iTCO_vendor_support snd_hda_codec_hdmi intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm crct10dif_pclmul snd_hda_codec_realtek crct10dif_common mac80211 snd_hda_codec_generic aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd efi_pstore efivars iwlwifi snd_hda_intel snd_hda_codec i2c_i801 cfg80211 i2c_smbus snd_hda_core thermal battery fan tpm_tis acpi_pad spidev ac tpm_tis_core softdog efivarfs [last unloaded: uio]
CPU: 2 PID: 30278 Comm: ukern Tainted: G        W  O    4.8.3-WR9.0.0.0_standard #2
Hardware name: Intel Corporation Kabylake Client platform/Kabylake U DDR3L RVP7, BIOS KBLSE2R1.R00.X043.P03.1606200914 06/20/2016
task: ffff880253c15700 task.stack: ffff880258a18000
RIP: 0010:[<ffffffffa0d36490>]  [<ffffffffa0d36490>] uio_release+0x20/0x60 [uio]
RSP: 0018:ffff880258a1bdf0  EFLAGS: 00010246
RAX: ffffffffa0d36470 RBX: ffff88025c51e770 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88026184be00 RDI: ffff88025b93ddf8
RBP: ffff880258a1be08 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88026184be10 R11: 0000000000000000 R12: ffff88025c516e98
R13: 0000000000000000 R14: ffff880262348da0 R15: ffff88025de273c0
FS:  0000000000000000(0000) GS:ffff88026ec80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000200 CR3: 0000000002006000 CR4: 00000000003406e0
DR0: 0000000000601098 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Stack:
 ffff88026184be00 0000000000000010 ffff88025b93ddf8 ffff880258a1be48
 ffffffff811c7ecf ffff88026184be10 ffff88026e9b7900 ffff880253c15700
 ffff88026184be00 0000000000000000 ffff880253c15df8 ffff880258a1be58
Call Trace:
 [<ffffffff811c7ecf>] __fput+0x9f/0x1e0
 [<ffffffff811c807e>] ____fput+0xe/0x10
 [<ffffffff81079d60>] task_work_run+0x80/0xa0
 [<ffffffff81061330>] do_exit+0x2a0/0xb50
 [<ffffffff810a30e7>] ? percpu_up_read+0x17/0x40
 [<ffffffff811c87e1>] ? __sb_end_write+0x21/0x30
 [<ffffffff811c6133>] ? vfs_write+0x143/0x190
 [<ffffffff81061c5b>] do_group_exit+0x3b/0xb0
 [<ffffffff81061ce4>] SyS_exit_group+0x14/0x20
 [<ffffffff81a765db>] entry_SYSCALL_64_fastpath+0x13/0x8f
Code: c1 18 e8 d4 1a 4a e0 5d c3 66 90 0f 1f 44 00 00 55 48 89 e5 41 55 45 31 ed 41 54 53 48 8b 9e d0 00 00 00 4c 8b 23 49 8b 54 24 38 <48> 8b 82 00 02 00 00 48 85 c0 74 0b 48 89 fe 48 89 d7 ff d0 41 
RIP  [<ffffffffa0d36490>] uio_release+0x20/0x60 [uio]
 RSP <ffff880258a1bdf0>
CR2: 0000000000000200
---[ end trace 799a916da8d745b2 ]---
Fixing recursive fault but reboot is needed!

Steps to Reproduce

                                                            
#################################################################################################################################### 

Test case Author:  lei.yang
------------------
Project Build Path:
------------------
pek-lpgtest18.wrs.com:/buildarea1/wgao/90/kaby_bts/build

To Get The Testing Layer:
------------------------
# git clone git://git.wrs.com/git/projects/wassp-repos/testcases/wrlinux
# cd wrlinux;git checkout master

Project Build:
----------------------
    --machines intel-kabylake-64 --distros wrlinux --base-url git://pek-git.wrs.com --dl-layers
    Build Steps:
    . environment-setup-x86_64-wrlinuxsdk-linux
    . oe-init-build-env
    Add BTS layer  
    1.bitbake-layers add-layer <path to wr-testing/bts-dev>
    2.echo 'require templates/feature/bts/template.conf' >> conf/local.conf
    3.bitbake wrlinux-image-glibc-std

Build Configuration:
----------------------------
BB_VERSION        = '1.32.0'
BUILD_SYS         = 'x86_64-linux'
NATIVELSBSTRING   = 'universal'
DISTRO            = 'wrlinux'
DISTRO_VERSION    = '9.0.0.0'
MACHINE           = 'intel-kabylake-64'
DEFAULTTUNE       = 'skylake-64'
TARGET_SYS        = 'x86_64-wrs-linux'
TUNE_FEATURES     = 'm64 haswell haswell-ep skylake mpx'
TARGET_FPU        = ''
lib32:  DEFAULTTUNE       = 'skylake-32'
lib32:  TARGET_SYS        = 'i686-wrsmllib32-linux'
lib32:  TUNE_FEATURES     = 'm32 haswell haswell-ep skylake mpx'
wr-base           = 'HEAD:b71f5c5f285ecb0f6dc587c7adbad20a8f6607a3'
wr-fixes          = 'HEAD:86020b2b2b961e3bb447b54184e817ac131eb7a9'
wrlinux           = 'HEAD:b485c957b544009534a21e7a8352fca8374f415b'
intel-kabylake    = 'HEAD:9151fa9123161175b1944bf09dcb68ca6f783f4d'
meta              = 'HEAD:1aa70d0598b436493dc2769d9186ea81f47474c7'
meta-initramfs    
meta-python       
meta-networking   
meta-oe           
meta-perl         
meta-webserver    = 'HEAD:a1e73d51d6f054f32850184d272b90805d0e7d36'
wr-template       = 'HEAD:d1f165f234f11376a31b99ec2aaef4843d9c6ded'
intel-x86         = 'HEAD:9151fa9123161175b1944bf09dcb68ca6f783f4d'
wr-kernel         = 'HEAD:c9637574278cb02b6880e2944f595b3093203c26'
meta-filesystems  = 'HEAD:a1e73d51d6f054f32850184d272b90805d0e7d36'
meta-realtime     
meta-virtualization = 'HEAD:c9637574278cb02b6880e2944f595b3093203c26'
wr-base-dl        = 'HEAD:aa1eab16a8c351551912bc3b20a3d41896036cbc'
oe-core-dl-2.2    = 'HEAD:c4e4e415289e6bee73aebc12a68b0feb7609bd93'
meta-initramfs-dl-2.2 = 'HEAD:1347989107c2f97644b18d862f850fd4dc0e104e'
meta-python-dl-2.2 = 'HEAD:b7397cb44fb80d3a19b6ef92f4a44de7ffddf53c'
meta-networking-dl-2.2 = 'HEAD:39bd9c511d73eaaba0ab150c65058c0ba563f8e0'
meta-oe-dl-2.2    = 'HEAD:c50834ba0473b121f124040e254ed9a7eeeb826e'
meta-perl-dl-2.2  = 'HEAD:4d65c8cf72a198d849104cd3f213b6f3777f7431'
meta-webserver-dl-2.2 = 'HEAD:ec10bc34d57bd4f8f1a8ff4d6fff993d45c754a0'
wr-kernel-dl      = 'HEAD:f9d20574ab2f63288ecdca850573e0d372577e36'
meta-filesystems-dl-2.2 = 'HEAD:ffa26ce28c1a1ddd181aedc6dbc95c2b539f35a4'
local             = 'master:c6088cd7de46fe44b250511f4559638322a93474'
bts-dev           = 'master:4c02ff4d34bc27530c4ddd24648bad37dcdb525b'


Kernel source top 10 commits:
----------------------------
Yang Shi 48ec55c locktorture: Fix potential memory leak with rw lock test Mon Nov 14 12:39:59 2016 -0800
Pengyu Ma 93823e5 Force PCI BAR memory resource within 32-bit address on x86-32 arch Thu Nov 10 21:44:25 2016 +0000
Waiman Long 5c8700a x86/hpet: Reduce HPET counter read contention Wed Nov 9 16:33:10 2016 -0800
Yang Shi 05358ac nfs4: Restore the original errno for version check Wed Nov 9 16:29:43 2016 -0800
yzhu1 0c2d330 ipv4: net namespace does not inherit network configurations Mon Nov 7 17:24:53 2016 -0800
Paul Gortmaker 8ab1ff2 cryptodev: stomp dynamic version numbering for in tree builds Mon Nov 7 09:36:41 2016 -0800
Liwei Song 42ef2cf cryptodev: fix compile error when enable CONFIG_CRYPTODEV Mon Nov 7 09:36:33 2016 -0800
Kexin(Casey) Chen a07b56d kgdb: protect find_task_by_pid_ns() with rcu read lock Fri Nov 4 17:09:01 2016 -0700
Kexin(Casey) Chen 48d865c x86, kgdb: correct kgdb_arch_remove_breakpoint Fri Nov 4 17:08:57 2016 -0700
Kexin(Casey) Chen ebfa512 pmac_zilog,console_poll: Implement the poll_rx_cb API Fri Nov 4 17:08:52 2016 -0700

Kernel config enabled by the testing layer:
------------------------------------------
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=5000
CONFIG_IOSCHED_BFQ=y
CONFIG_DMATEST=m
CONFIG_USB_SERIAL_PL2303=y
CONFIG_CMA_DEBUG=y
CONFIG_UIO_PCI_GENERIC=m
CONFIG_USB_USBNET=y
CONFIG_USB_NET_DM9601=y


Kernel Boot Parameter:
---------------------
root@localhost:/opt/wr-test/testcases/bts/kernwarning_buildcheck# cat /proc/cmdline
fs0:\bzImage.efi root=/dev/sdb2 rw rootwait console=ttyS0,115200 intel_iommu=off
Live chat
Online