Not to be fixed
Created: Oct 19, 2015
Updated: Apr 19, 2018
Resolved Date: Apr 17, 2018
Found In Version: 8.0
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: BSP
Start testcase storage_dd_1G with SSD testing
kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 167.7 GiB, 180045766656 bytes, 351651888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb53f885b
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 351651887 351649840 167.7G 83 Linux
Disk /dev/mmcblk0: 28.5 GiB, 30601641984 bytes, 59768832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B6DF3C90-E71A-4203-84E2-B5AE7D3B83F0
Device Start End Sectors Size Type
/dev/mmcblk0p1 34 262177 262144 128M Microsoft reserved
/dev/mmcblk0p2 264192 59766783 59502592 28.4G Microsoft basic data
Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 14.8 GiB, 15854469120 bytes, 30965760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x709bab47
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4196351 4194304 2G 83 Linux
/dev/sdb2 4196352 30965759 26769408 12.8G 83 Linux
Disk /dev/sdc: 14.8 GiB, 15854469120 bytes, 30965760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x006cfb04
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 30965759 30963712 14.8G 83 Linux
Disk /dev/sdd: 14.6 GiB, 15698231296 bytes, 30660608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3ae69c81
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 30660607 30658560 14.6G 83 Linux
/dev/sda will be used by testing
the previous partion is /dev/sda1
re-partion the /dev/sda
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# (echo o; echo n; echo p; echo 1; echo ; echo; echo w) | fdisk /dev/sda
sda: sda1
Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): Created a new DOS disklabel with disk identifier 0xf60a308f.
Command (m for help): Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): Partition number (1-4, default 1): First sector (2048-351651887, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-351651887, default 351651887):
Created a new partition 1 of type 'Linux' and of size 167.7 GiB.
Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
new_partition for test device is /dev/sda1
the previous partion is /dev/sda1
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# mkfs.ext4 /dev/sda1
mke2fs 1.42.9 (28-Dec-2013)
Discarding device blocks: 3722854EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
10993664 inodes, 43956230 blocks
2197811 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1342 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
<<start dd a big 1G file>>
********************
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# mount /dev/sda1 /24653
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# dd if=/dev/zero of=/24653/1000.file bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 12.6746 s, 82.7 MB/s
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# sync
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# rm /24653/1000.file -rf
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# umount /24653
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# rm -rf /24653
<<end dd a big 1G file>>
********************
<<clean subcase>>
********************
<<start check testcase call trace>>
********************
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# dmesg |grep -i -w -E -B10 -A50 'Call Trace|BUG:' ||return 0
<<end check testcase call trace>>
********************
<<clean subcase>>
********************
<<start check kmemleak>>
********************
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# cat /sys/kernel/debug/kmemleak |grep -E -B10 -A50 'kmemleak_alloc|kmem_cache_alloc' ||return 0
unreferenced object 0xffff88017e88d780 (size 96):
comm "swapper/0", pid 1, jiffies 4294668234 (age 734.297s)
hex dump (first 32 bytes):
80 d7 44 82 ff ff ff ff 00 00 00 00 01 00 00 00 ..D.............
01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81adf608>] kmemleak_alloc+0x28/0x50
[<ffffffff811825b6>] __kmalloc+0x136/0x330
[<ffffffff81204e96>] __register_sysctl_table+0x56/0x6f0
[<ffffffff8120554b>] register_sysctl+0x1b/0x20
[<ffffffff821c31e8>] net_sysctl_init+0x1e/0x47
[<ffffffff821af4cf>] sock_init+0xb/0x91
[<ffffffff810002cc>] do_one_initcall+0x8c/0x1c0
[<ffffffff8215f0f0>] kernel_init_freeable+0x19f/0x264
[<ffffffff81add70e>] kernel_init+0xe/0xf0
[<ffffffff81aeb122>] ret_from_fork+0x42/0x70
[<ffffffffffffffff>] 0xffffffffffffffff
unreferenced object 0xffff88017a13c428 (size 8):
comm "swapper/0", pid 1, jiffies 4294671019 (age 731.516s)
hex dump (first 8 bytes):
ff ff ff ff 00 00 00 00 ........
backtrace:
[<ffffffff81adf608>] kmemleak_alloc+0x28/0x50
[<ffffffff81182fca>] kmem_cache_alloc_trace+0x23a/0x2b0
[<ffffffff816080e6>] platform_device_register_full+0xa6/0x120
[<ffffffff8148f629>] acpi_create_platform_device+0x175/0x1b9
[<ffffffff8148edf0>] acpi_lpss_create_device+0x334/0x37d
[<ffffffff81489b06>] acpi_bus_attach+0xc4/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489cb4>] acpi_bus_scan+0x61/0x6c
[<ffffffff8219b563>] acpi_scan_init+0x7c/0x1b2
[<ffffffff8219b354>] acpi_init+0x249/0x266
[<ffffffff810002cc>] do_one_initcall+0x8c/0x1c0
[<ffffffff8215f0f0>] kernel_init_freeable+0x19f/0x264
[<ffffffff81add70e>] kernel_init+0xe/0xf0
[<ffffffff81aeb122>] ret_from_fork+0x42/0x70
unreferenced object 0xffff88017a13c430 (size 8):
comm "swapper/0", pid 1, jiffies 4294671026 (age 731.509s)
hex dump (first 8 bytes):
ff ff ff ff 00 00 00 00 ........
backtrace:
[<ffffffff81adf608>] kmemleak_alloc+0x28/0x50
[<ffffffff81182fca>] kmem_cache_alloc_trace+0x23a/0x2b0
[<ffffffff816080e6>] platform_device_register_full+0xa6/0x120
[<ffffffff8148f629>] acpi_create_platform_device+0x175/0x1b9
[<ffffffff8148edf0>] acpi_lpss_create_device+0x334/0x37d
[<ffffffff81489b06>] acpi_bus_attach+0xc4/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489b60>] acpi_bus_attach+0x11e/0x163
[<ffffffff81489cb4>] acpi_bus_scan+0x61/0x6c
[<ffffffff8219b563>] acpi_scan_init+0x7c/0x1b2
[<ffffffff8219b354>] acpi_init+0x249/0x266
[<ffffffff810002cc>] do_one_initcall+0x8c/0x1c0
[<ffffffff8215f0f0>] kernel_init_freeable+0x19f/0x264
[<ffffffff81add70e>] kernel_init+0xe/0xf0
[<ffffffff81aeb122>] ret_from_fork+0x42/0x70
<<end check kmemleak>>
********************
<<clean subcase>>
********************
storage_dd_1G with SSD test results:
*1 dd a big 1G file(do_test1) PASS
*2 check testcase call trace(do_check_call_trace) PASS
*3 check kmemleak(do_check_kmemleak) FAIL
ERROR CMD OR INFO IS :
line:150 "There is kmemleak for this testcase"
Test Summary
Total number : 3
Pass number : 2
Fail number : 1
Skip number : 0
Excution Time: 97 seconds
End testcase storage_dd_1G testing
Test case Author: lei.yang
------------------
Product update date(Spin):
------------------
spin=GIT_20151013
------------------
Project Build Path:
------------------
To Get The Testing Layer:
------------------------
# git clone git://git.wrs.com/git/projects/wassp-repos/testcases/wrlinux
# cd wrlinux;git checkout master
Project Configure Line:
----------------------
# Generated by wrlinux configure at Wed Oct 14 12:10:22 CST 2015
wrlinux-8/wrlinux/configure --enable-board=intel-x86-64 --enable-kernel=preempt-rt --enable-rootfs=glibc-std --enable-jobs=36 --enable-parallel-pkgbuilds=36 --with-layer=/buildarea2/lya0
Build Configuration:
----------------------------
BB_VERSION = "1.28.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
DISTRO = "wrlinux"
DISTRO_VERSION = "8.0.0.0"
MACHINE = "intel-x86-64"
DEFAULTTUNE = "corei7-64"
TARGET_SYS = "x86_64-wrs-linux"
TUNE_FEATURES = "m64 corei7"
TARGET_FPU = ""
lib32: DEFAULTTUNE = "corei7-32"
lib32: TARGET_SYS = "i686-wrsmllib32-linux"
lib32: TUNE_FEATURES = "m32 corei7"
wrlinux = "master:0390a734fa08f16fa3734830d3f12b2004932bac"
wrlcompat = "master:65f1a1c4d32f2b7e19185b2cb1add2d42ee39f27"
wr-sdk-toolchain = "master:1b3f1f910e79486438cb75827e129b87501ee304"
wr-tcwrappers = "master:ccfc4f8c3dadc2f5a8e0ef7864a5f8026ddae213"
meta = "wr-8.0-20151008:df935cee080c6d39cf7818ebf7be4d6dfb3527f4"
oe-core-dl-1.7 = "master:772c4fab80b88b1ba12c72eab2ca078950a1692a"
meta-downloads = "master:08f1f7caa69afa2b6a7818379227585d9d0e9aec"
wr-kernel = "master:78f5bd35b6baca4ca95d7a20a7ce5aa1d8c8b59a"
intel-x86 = "master:0034c549195cefe34ad1941fb7f9ede23a5aa0d1"
wr-base = "master:0442cd0655fa9e06a3cdaf7695ba9f4ae4e436d5"
wr-fixes = "master:fde1b2356e507a31c7c7ebf00babb665838f9dc7"
wr-tools-profile = "master:b6af7b9cf4e6b02270421334e0a233db05f87695"
wr-tools-debug = "master:c307715e864eab1340f61e2dab49867aac01a76d"
meta-filesystems
meta-initramfs
meta-gnome
meta-multimedia
meta-networking
meta-oe
meta-python
meta-perl
meta-webserver
meta-xfce = "wr-8.0-20151008:934f6baebcec026ea16954b27474b44e4053742c"
wr-prebuilts = "master:152e4960d828a1daefdccb0b31b0917178161b3e"
bts-dev = "master:7e7f1ab44b9b7cbe06f7436f30f195bd94b69d24"
----------------------------------------------------------------------
Kernel source top 10 commits:
----------------------------
Tony Liu 7b95181 arm_versatile_926ejs: kick off PrimeCell RTC PL031 Mon Oct 5 13:15:22 2015 -0700
bo liu 158a7bf arm_versatile_926ejs: add default nor flash mtd parts Mon Oct 5 13:15:20 2015 -0700
He Zhe 74bdd74 kdb: disable kdb_summary command in preempt context Mon Oct 5 13:15:14 2015 -0700
Yong Zhang 6d653bc cpu: make clear_tasks_mm_cpumask() lockless when iterating each thread Mon Oct 5 13:15:14 2015 -0700
Paul Gortmaker af6df43 rtmutex/rt: don't BUG for -EDEADLK when detect_deadlock is off Mon Oct 5 13:15:13 2015 -0700
fupan li 8af035f set DMA_API_DEBUG feature depending on !PREEMPT_RT_FULL Mon Oct 5 13:15:13 2015 -0700
fupan li fb72c27 kdb,vt_console: Fix the calltrace of spinlock on RT kernel Mon Oct 5 13:15:12 2015 -0700
fupan li a055334 perf: No need to test the irqs_disabled in hrtimer callback function on RT kernel Mon Oct 5 13:15:12 2015 -0700
fupan li 70a3468 usb: use nort variant to replace local_irq_disable/local_irq_enable Mon Oct 5 13:15:11 2015 -0700
Thomas Gleixner 0b8ec6e v4.1.7-rt8 Mon Oct 5 13:15:09 2015 -0700
Kernel config enabled by the testing layer:
------------------------------------------
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=5000
CONFIG_INPUT_EVDEV=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_DMATEST=m
CONFIG_DMA_API_DEBUG=y
CONFIG_USB_SERIAL_PL2303=y
CONFIG_PM_TEST_SUSPEND=m
CONFIG_IOMMU_STRESS=m
CONFIG_OPROFILE=y
CONFIG_ACPI_DEBUG=y
CONFIG_DEBUG_HIGHMEM=y
CONFIG_DEBUG_HOTPLUG_CPU0=y
CONFIG_DMADEVICES_DEBUG=y
CONFIG_PCI_DEBUG=y
CONFIG_USB_GADGET=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_CMA_DEBUG=y
CONFIG_AUFS_FS=y
Kernel Boot Parameter:
---------------------
root@128.224.162.250:/opt/wr-test/testcases/bts/storage_dd_1G# cat /proc/cmdline
fs0:\EFI\wrl\bzImage.efi rootwait root=/dev/sdb2 rw console=ttyS0,115200 ip=dhcp
To reproduce it:
---------------
# /opt/wr-test/testcases/bts/storage_dd_1G/runtest.sh -k SSD
Test Env:
-storage device is SSD
-SSD's /dev/sda is for testing
-----------------------------------------------
WRL Test Completed Unsuccessfully