Wind River Support Network

HomeDefectsLIN1023-639
Acknowledged

LIN1023-639 : nxp-s32g: pfe test caught kmemleak at pfeng_netif_set_rx_mode

Created: May 18, 2023    Updated: Jul 24, 2023
Found In Version: 10.23.30.1
Severity: Standard
Applicable for: Wind River Linux LTS 23
Component/s: BSP

Description

root@nxp-s32g:/opt/wr-test/testcases/bts/rtc_hctosys# cat /sys/kernel/debug/kmemleak |grep -E -B10 -A50 'kmemleak_alloc|kmem_cache_alloc' ||return 0
unreferenced object 0xffffff880282cf80 (size 128):
  comm "(udev-worker)", pid 808, jiffies 4294968848 (age 281.768s)
  hex dump (first 32 bytes):
    06 00 00 00 00 00 00 00 00 a6 13 18 88 ff ff ff  ................
    90 c9 82 02 88 ff ff ff 84 0c 2f 18 88 ff ff ff  ........../.....
  backtrace:
    <ffffffc00830900c>] __kmem_cache_alloc_node+0x1cc/0x260
    [<ffffffc00829f758>] __kmalloc+0x68/0x104
    [<ffffffc001248190>] oal_mm_malloc+0x1c/0x2c [pfeng]
    [<ffffffc001224b40>] pfe_if_db_add+0x13c/0x188 [pfeng]
    [<ffffffc001243400>] pfe_platform_register_log_if+0xc4/0x154 [pfeng]
    [<ffffffc00125dc80>] pfeng_netif_control_platform_ifs+0x31c/0x620 [pfeng]
    [<ffffffc00125dfcc>] pfeng_netif_logif_init_second_stage+0x48/0x19c [pfeng]
    [<ffffffc00125e474>] pfeng_netif_logif_create+0x354/0x470 [pfeng]
    [<ffffffc00125fa98>] pfeng_netif_create+0x58/0xc0 [pfeng]
    [<ffffffc001263354>] pfeng_drv_probe+0xb04/0xc44 [pfeng]
    [<ffffffc008a77704>] platform_probe+0x70/0xcc
    [<ffffffc00910027c>] really_probe+0x16c/0x358
    [<ffffffc009100548>] __driver_probe_device.part.0+0xe0/0x120
    [<ffffffc008a74890>] driver_probe_device+0xc0/0x114
    [<ffffffc008a75194>] __driver_attach+0x84/0x1b0
    [<ffffffc008a720e0>] bus_for_each_dev+0x7c/0xdc


http://pek-lpgtest3.wrs.com/lpg-build/cdc/publiclog/WRLinux1023/S230509_LTS23/2023WW20/GIT_20230517/BSP/nxp-s32g_standard_glibc-std/NXP_S32G274A_RDB2_OE_USB2_systemd/storage_nfs_mounts/target_29161.platform_B0E1R0_20230518_040142.log

root@nxp-s32g:/opt/wr-test/testcases/bts/storage_nfs_mounts# cat /sys/kernel/debug/kmemleak  (grep -E -B10 -A50 'kmemleak_alloc|kmem_cache_alloc' ||return 0
unreferenced object 0xffffff8839919700 (size 128):
  comm "systemd-resolve", pid 303, jiffies 4302082052 (age 360.644s)
  hex dump (first 32 bytes):
    33 33 00 00 00 01 06 91 91 39 88 ff ff ff 06 c5  33.......9......
    54 16 88 ff ff ff 00 00 00 00 00 00 00 00 00 00  T...............
  backtrace:
    [<ffffffc00831ebe8>) __kmem_cache_alloc_node+0x284/0x39c
    [<ffffffc0082b44cc>] __kmalloc+0x68/0x10c
    [<ffffffc001277a98>] kzalloc+0x14/0x20 [pfeng]
    [<ffffffc001277d6c>] pfe_mac_db_add_addr+0x80/0x100 [pfeng]
    [<ffffffc0012717d4>] pfe_phy_if_add_mac_addr+0x78/0x180 [pfeng]
    [<ffffffc0012aeff4>] pfeng_netif_set_rx_mode+0x200/0x31c [pfeng]
    [<ffffffc008e6d000>] __dev_set_rx_mode+0x70/0xb0
    [<ffffffc008e70c24>] dev_mc_del+0x94/0xb4
    [<ffffffc008fa08cc>] __igmp_group_dropped+0x26c/0x300
    [<ffffffc008fa0b1c>] __ip_mc_dec_group+0x1bc/0x230
    [<ffffffc008fa1cf0>] ip_mc_leave_group+0xc0/0x1c0
    [<ffffffc008f4439c>] do_ip_setsockopt+0xb0c/0x1500
    [<ffffffc008f44dcc>] ip_setsockopt+0x3c/0xa4
    [<ffffffc008f84cd4>] udp_setsockopt+0x24/0x50
    [<ffffffc008e36294>] sock_common_setsockopt+0x24/0x30
    [<ffffffc008e34914>] __sys_setsockopt+0xa4/0x1a0

Steps to Reproduce

/lpg-build/cdc/fast_prod/WRL10_23/WRL10_23_GIT/wrlinux-10/setup.sh --machines nxp-s32g --templates feature/docker --distro nodistro --dl-layers=1 --accept-eula=yes
source environment-setup-x86_64-wrlinuxsdk-linux
source oe-init-build-env build
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"' >> conf/local.conf

bitbake-layers add-layer /net/128.224.34.180/buildarea1/test_env/wassp-linux/testcases/wrlinux/wr-testing/bts-dev

OR

#####To Clone a whole new testcases layer#####
git clone --depth 1 -b WRLINUX_10_23_HEAD git://lxgit.wrs.com/wrlinux-testing/testcases.git ../layers/testcases/wrlinux/
bitbake-layers add-layer ../layers/testcases/wrlinux/wr-testing/bts-dev
#####End#####

echo 'require templates/feature/bts/template.conf' >> conf/local.conf
echo 'SHARED_IMAGE_BASE = "/net/pek-lpgtest7408/buildarea1/SharedImage"
FIRMWARE_DIR_BASE = "${SHARED_IMAGE_BASE}/wr-bsp-images/nxp-s32g/firmwares"
HSE_LOCAL_FIRMWARE_DIR = "${FIRMWARE_DIR_BASE}/hse"
HSE_FW_VERSION_S32G2 = "0.1.0.9"
HSE_FW_VERSION_S32G3 = "0.2.16.1"
HSE_FW_NAME_S32G2 = "rev2.0_s32g2xx_hse_fw_0.1.0_1.0.9_pb230405.bin.pink"
HSE_FW_NAME_S32G3 = "rev1.0_s32g3xx_hse_fw_0.20.0_2.16.1_pb221011.bin.pink"
LLCE_LOCAL_FIRMWARE_DIR = "${FIRMWARE_DIR_BASE}/llce/1.0.6/s32g2"
LLCE_LOCAL_FIRMWARE_DIR_S32G3 = "${FIRMWARE_DIR_BASE}/llce/1.0.6/s32g3"
IPCF_M7_APP_BIN_DIR = "${FIRMWARE_DIR_BASE}/ipcf"
PFE_LOCAL_FIRMWARE_DIR = "${FIRMWARE_DIR_BASE}/pfe/1.6.0"
WRL_RECIPES:wr-nxp-s32g += "llce"
IMAGE_INSTALL:append = " llce ipc-shm pfe pfe-slave libfci-cli"' >> conf/local.conf
bitbake wrlinux-image-std

http://pek-lpgtest3.wrs.com/lpg-build/cdc/publiclog/WRLinux1023/S230509_LTS23/2023WW20/GIT_20230517/BSP/nxp-s32g_standard_glibc-std/NXP_S32G274A_RDB2_OE_systemd/aarch64_exploring_test/target_29161.platform_B0E1R0_20230517_093806.log
Live chat
Online