regressions.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* BUG: kworker memory leak found in 6.1.0-rc3
@ 2022-11-04 10:40 Mirsad Goran Todorovac
  2022-11-10  4:57 ` BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4 Mirsad Goran Todorovac
  0 siblings, 1 reply; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-04 10:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: regressions, Tejun Heo, Florian Mickler

[-- Attachment #1: Type: text/plain, Size: 3181 bytes --]

Dear Sirs,

When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled 
CONFIG_DEBUG_KMEMLEAK=y
and the result showed an unreferenced object in kworker process:

# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffffa01dabff6100 (size 16):
   comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
   hex dump (first 16 bytes):
     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
   backtrace:
     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
     [<0000000005472512>] kstrdup+0x36/0x70
     [<000000002f797ac4>] kstrdup_const+0x28/0x30
     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
     [<000000004158a6c0>] dev_set_name+0x53/0x70
     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
     [<00000000122bb894>] process_one_work+0x214/0x3f0
     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
     [<0000000002409855>] kthread+0xed/0x120
     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
unreferenced object 0xffffa01dabff6ec0 (size 16):
   comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
   hex dump (first 16 bytes):
     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
   backtrace:
     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
     [<0000000005472512>] kstrdup+0x36/0x70
     [<000000002f797ac4>] kstrdup_const+0x28/0x30
     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
     [<000000004158a6c0>] dev_set_name+0x53/0x70
     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
     [<00000000122bb894>] process_one_work+0x214/0x3f0
     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
     [<0000000002409855>] kthread+0xed/0x120
     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
#

Please fing the build config and lshw output attached.

dmesg is useless, as it is filled with events like:

[ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
[ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
[ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
[ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
[ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
[ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
[ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
[ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
[ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
[ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
[ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0

Thank you,

Mirsad

-- 
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
-- 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia

[-- Attachment #2: lshw-20221104.txt --]
[-- Type: text/plain, Size: 23440 bytes --]

pc-mtodorov.slava.alu.hr
    description: Desktop Computer
    product: 10TX000VCR (LENOVO_MT_10TX_BU_Lenovo_FM_V530S-07ICB)
    vendor: LENOVO
    version: V530S-07ICB
    serial: YL004CDC
    width: 64 bits
    capabilities: smbios-3.1.1 dmi-3.1.1 smp vsyscall32
    configuration: administrator_password=disabled boot=normal chassis=desktop family=V530S-07ICB keyboard_password=enabled power-on_password=disabled sku=LENOVO_MT_10TX_BU_Lenovo_FM_V530S-07ICB uuid=4fb93a00-bb35-11e8-bb0a-59599e0a2e00
  *-core
       description: Motherboard
       product: 3140
       vendor: LENOVO
       physical id: 0
       version: SDK0J40697 WIN 3305148204708
       slot: Default string
     *-firmware
          description: BIOS
          vendor: LENOVO
          physical id: 0
          version: M22KT23A
          date: 07/16/2018
          size: 64KiB
          capacity: 16MiB
          capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: System Memory
          physical id: 3b
          slot: System board or motherboard
          size: 16GiB
        *-bank:0
             description: DIMM DDR4 Synchronous 2666 MHz (0.4 ns)
             product: RMUA5110ME78HAF-2666
             vendor: Fujitsu
             physical id: 0
             serial: 14903C7C
             slot: ChannelA-DIMM1
             size: 8GiB
             width: 64 bits
             clock: 2666MHz (0.4ns)
        *-bank:1
             description: DIMM DDR4 Synchronous 2666 MHz (0.4 ns)
             product: JM2666HLB-8G
             vendor: Transcend
             physical id: 1
             serial: 00002814
             slot: ChannelB-DIMM2
             size: 8GiB
             width: 64 bits
             clock: 2666MHz (0.4ns)
     *-cache:0
          description: L1 cache
          physical id: 45
          slot: L1 Cache
          size: 384KiB
          capacity: 384KiB
          capabilities: synchronous internal write-back unified
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: 46
          slot: L2 Cache
          size: 1536KiB
          capacity: 1536KiB
          capabilities: synchronous internal write-back unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          physical id: 47
          slot: L3 Cache
          size: 9MiB
          capacity: 9MiB
          capabilities: synchronous internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
          vendor: Intel Corp.
          physical id: 48
          bus info: cpu@0
          version: 6.158.10
          serial: To Be Filled By O.E.M.
          slot: U3E1
          size: 3860MHz
          capacity: 4005MHz
          width: 64 bits
          clock: 100MHz
          capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d cpufreq
          configuration: cores=6 enabledcores=6 microcode=150 threads=6
     *-pci
          description: Host bridge
          product: 8th Gen Core Processor Host Bridge/DRAM Registers
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 07
          width: 32 bits
          clock: 33MHz
          configuration: driver=skl_uncore
          resources: irq:0
        *-display
             description: VGA compatible controller
             product: CoffeeLake-S GT2 [UHD Graphics 630]
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             logical name: /dev/fb0
             version: 00
             width: 64 bits
             clock: 33MHz
             capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
             configuration: depth=32 driver=i915 latency=0 resolution=1920,1080
             resources: irq:124 memory:a0000000-a0ffffff memory:90000000-9fffffff ioport:4000(size=64) memory:c0000-dffff
        *-generic:0 UNCLAIMED
             description: System peripheral
             product: Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
             vendor: Intel Corporation
             physical id: 8
             bus info: pci@0000:00:08.0
             version: 00
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm cap_list
             configuration: latency=0
             resources: memory:a1221000-a1221fff
        *-generic:1
             description: Signal processing controller
             product: Cannon Lake PCH Thermal Controller
             vendor: Intel Corporation
             physical id: 12
             bus info: pci@0000:00:12.0
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi cap_list
             configuration: driver=intel_pch_thermal latency=0
             resources: irq:16 memory:a1220000-a1220fff
        *-usb
             description: USB controller
             product: Cannon Lake PCH USB 3.1 xHCI Host Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:121 memory:a1200000-a120ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 6.1.0-rc3 xhci-hcd
                physical id: 0
                bus info: usb@1
                logical name: usb1
                version: 6.01
                capabilities: usb-2.00
                configuration: driver=hub slots=16 speed=480Mbit/s
              *-usb:0
                   description: Mouse
                   product: PixArt lenovo USB Optical Mouse
                   vendor: PixArt
                   physical id: 3
                   bus info: usb@1:3
                   logical name: input3
                   logical name: /dev/input/event3
                   logical name: /dev/input/mouse0
                   version: 1.00
                   capabilities: usb-2.00 usb
                   configuration: driver=usbhid maxpower=100mA speed=2Mbit/s
              *-usb:1
                   description: Keyboard
                   product: Lenovo Lenovo Calliope USB Keyboard Consumer Control
                   vendor: Lenovo
                   physical id: 4
                   bus info: usb@1:4
                   logical name: input4
                   logical name: /dev/input/event4
                   logical name: input4::capslock
                   logical name: input4::numlock
                   logical name: input4::scrolllock
                   logical name: input5
                   logical name: /dev/input/event5
                   logical name: input6
                   logical name: /dev/input/event6
                   logical name: /dev/input/js0
                   version: 2.18
                   capabilities: usb-2.00 usb
                   configuration: driver=usbhid maxpower=100mA speed=2Mbit/s
              *-usb:2
                   description: MMC Host
                   product: USB2.0-CRW
                   vendor: Generic
                   physical id: 6
                   bus info: usb@1:6
                   logical name: mmc0
                   version: 39.60
                   serial: 20100201396000000
                   capabilities: usb-2.00
                   configuration: driver=rtsx_usb maxpower=500mA speed=480Mbit/s
           *-usbhost:1
                product: xHCI Host Controller
                vendor: Linux 6.1.0-rc3 xhci-hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 6.01
                capabilities: usb-3.10
                configuration: driver=hub slots=6 speed=10000Mbit/s
        *-memory UNCLAIMED
             description: RAM memory
             product: Cannon Lake PCH Shared SRAM
             vendor: Intel Corporation
             physical id: 14.2
             bus info: pci@0000:00:14.2
             version: 10
             width: 64 bits
             clock: 33MHz (30.3ns)
             capabilities: pm cap_list
             configuration: latency=0
             resources: memory:a1216000-a1217fff memory:a121f000-a121ffff
        *-serial:0
             description: Serial bus controller
             product: Cannon Lake PCH Serial IO I2C Controller #0
             vendor: Intel Corporation
             physical id: 15
             bus info: pci@0000:00:15.0
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: driver=intel-lpss latency=0
             resources: irq:16 memory:a1219000-a1219fff
        *-serial:1
             description: Serial bus controller
             product: Cannon Lake PCH Serial IO I2C Controller #1
             vendor: Intel Corporation
             physical id: 15.1
             bus info: pci@0000:00:15.1
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: driver=intel-lpss latency=0
             resources: irq:17 memory:a121d000-a121dfff
        *-communication:0
             description: Communication controller
             product: Cannon Lake PCH HECI Controller
             vendor: Intel Corporation
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=mei_me latency=0
             resources: irq:125 memory:a121c000-a121cfff
        *-sata
             description: SATA controller
             product: Cannon Lake PCH SATA AHCI Controller
             vendor: Intel Corporation
             physical id: 17
             bus info: pci@0000:00:17.0
             logical name: scsi0
             logical name: scsi1
             version: 10
             width: 32 bits
             clock: 66MHz
             capabilities: sata msi pm ahci_1.0 bus_master cap_list emulated
             configuration: driver=ahci latency=0
             resources: irq:122 memory:a1214000-a1215fff memory:a121b000-a121b0ff ioport:4090(size=8) ioport:4080(size=4) ioport:4060(size=32) memory:a121a000-a121a7ff
           *-disk
                description: ATA Disk
                product: WDC  WDS500G2B0A
                vendor: Western Digital
                physical id: 0
                bus info: scsi@0:0.0.0
                logical name: /dev/sda
                version: 20WD
                serial: 21251V800740
                size: 465GiB (500GB)
                capabilities: gpt-1.00 partitioned partitioned:gpt
                configuration: ansiversion=5 guid=337420f3-fbd8-437d-ab9c-1a5f5f14c1d1 logicalsectorsize=512 sectorsize=512
              *-volume:0
                   description: reserved partition
                   vendor: Windows
                   physical id: 1
                   bus info: scsi@0:0.0.0,1
                   logical name: /dev/sda1
                   serial: 9e53775b-0aa1-4b97-93da-0e4e1531d755
                   capacity: 15MiB
                   capabilities: nofs
                   configuration: name=Microsoft reserved partition
              *-volume:1
                   description: Windows NTFS volume
                   vendor: Windows
                   physical id: 2
                   bus info: scsi@0:0.0.0,2
                   logical name: /dev/sda2
                   version: 3.1
                   serial: e40c9218-ef8c-4e46-947e-2f1c19b65ae3
                   size: 292GiB
                   capacity: 292GiB
                   capabilities: ntfs initialized
                   configuration: clustersize=4096 created=2021-09-30 16:24:41 filesystem=ntfs label=New Volume name=Basic data partition state=clean
              *-volume:2
                   description: Windows NTFS volume
                   vendor: Windows
                   physical id: 3
                   bus info: scsi@0:0.0.0,3
                   logical name: /dev/sda3
                   version: 3.1
                   serial: 28ff-3849
                   size: 488MiB
                   capacity: 507MiB
                   capabilities: boot precious ntfs initialized
                   configuration: clustersize=4096 created=2021-10-20 10:53:48 filesystem=ntfs state=clean
              *-volume:3
                   description: Windows FAT volume
                   vendor: MSDOS5.0
                   physical id: 4
                   bus info: scsi@0:0.0.0,4
                   logical name: /dev/sda4
                   logical name: /boot/efi
                   version: FAT32
                   serial: 161a-4187
                   size: 80MiB
                   capacity: 99MiB
                   capabilities: boot fat initialized
                   configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.options=rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=winnt,errors=remount-ro name=EFI System Partition state=mounted
              *-volume:4 UNCLAIMED
                   description: EFI partition
                   physical id: 5
                   bus info: scsi@0:0.0.0,5
                   serial: 215919e7-bba2-422f-b239-ce4814c65c12
                   capacity: 1023MiB
              *-volume:5
                   description: LVM Physical Volume
                   vendor: Linux
                   physical id: 6
                   bus info: scsi@0:0.0.0,6
                   logical name: /dev/sda6
                   serial: 5mgsOO-lX9e-wV9r-GPcp-1VBx-UJpx-3uWLde
                   size: 170GiB
                   capabilities: multi lvm2
           *-cdrom
                description: DVD-RAM writer
                product: DVDRAM GUE0N
                vendor: HL-DT-ST
                physical id: 1
                bus info: scsi@1:0.0.0
                logical name: /dev/cdrom
                logical name: /dev/sr0
                version: T.02
                capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
                configuration: ansiversion=5 status=nodisc
        *-pci
             description: PCI bridge
             product: Cannon Lake PCH PCI Express Root Port #7
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: f0
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:120 ioport:3000(size=4096) memory:a1100000-a11fffff
           *-network
                description: Ethernet interface
                product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:01:00.0
                logical name: enp1s0
                version: 15
                serial: f4:93:9f:f0:a5:f5
                size: 1Gbit/s
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.1.0-rc3 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=193.198.186.200 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
                resources: irq:18 ioport:3000(size=256) memory:a1104000-a1104fff memory:a1100000-a1103fff
        *-communication:1
             description: Communication controller
             product: Cannon Lake PCH Serial IO UART Host Controller
             vendor: Intel Corporation
             physical id: 1e
             bus info: pci@0000:00:1e.0
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm bus_master cap_list
             configuration: driver=intel-lpss latency=0
             resources: irq:20 memory:a121e000-a121efff
        *-isa
             description: ISA bridge
             product: Intel Corporation
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 10
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master
             configuration: latency=0
           *-pnp00:00
                product: PnP device PNP0c02
                physical id: 0
                capabilities: pnp
                configuration: driver=system
           *-pnp00:01
                product: PnP device PNP0501
                physical id: 1
                capabilities: pnp
                configuration: driver=serial
           *-pnp00:02
                product: PnP device PNP0c02
                physical id: 2
                capabilities: pnp
                configuration: driver=system
           *-pnp00:03
                product: PnP device PNP0b00
                physical id: 3
                capabilities: pnp
                configuration: driver=rtc_cmos
           *-pnp00:04
                product: PnP device INT3f0d
                vendor: Interphase Corporation
                physical id: 4
                capabilities: pnp
                configuration: driver=system
           *-pnp00:05
                product: PnP device PNP0c02
                physical id: 5
                capabilities: pnp
                configuration: driver=system
           *-pnp00:06
                product: PnP device PNP0c02
                physical id: 6
                capabilities: pnp
                configuration: driver=system
           *-pnp00:07
                product: PnP device PNP0c02
                physical id: 7
                capabilities: pnp
                configuration: driver=system
           *-pnp00:08
                product: PnP device PNP0c02
                physical id: 8
                capabilities: pnp
                configuration: driver=system
        *-multimedia
             description: Audio device
             product: Cannon Lake PCH cAVS
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             logical name: card0
             logical name: /dev/snd/controlC0
             logical name: /dev/snd/hwC0D0
             logical name: /dev/snd/hwC0D2
             logical name: /dev/snd/pcmC0D0c
             logical name: /dev/snd/pcmC0D0p
             logical name: /dev/snd/pcmC0D3p
             logical name: /dev/snd/pcmC0D7p
             logical name: /dev/snd/pcmC0D8p
             version: 10
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=snd_hda_intel latency=32
             resources: irq:126 memory:a1210000-a1213fff memory:a1000000-a10fffff
           *-input:0
                product: HDA Intel PCH Front Mic
                physical id: 0
                logical name: input10
                logical name: /dev/input/event10
           *-input:1
                product: HDA Intel PCH Line Out
                physical id: 1
                logical name: input11
                logical name: /dev/input/event11
           *-input:2
                product: HDA Intel PCH Front Headphone
                physical id: 2
                logical name: input12
                logical name: /dev/input/event12
           *-input:3
                product: HDA Intel PCH HDMI/DP,pcm=3
                physical id: 3
                logical name: input13
                logical name: /dev/input/event13
           *-input:4
                product: HDA Intel PCH HDMI/DP,pcm=7
                physical id: 4
                logical name: input14
                logical name: /dev/input/event14
           *-input:5
                product: HDA Intel PCH HDMI/DP,pcm=8
                physical id: 5
                logical name: input15
                logical name: /dev/input/event15
           *-input:6
                product: HDA Intel PCH Mic
                physical id: 6
                logical name: input9
                logical name: /dev/input/event9
        *-serial:2
             description: SMBus
             product: Cannon Lake PCH SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.4
             bus info: pci@0000:00:1f.4
             version: 10
             width: 64 bits
             clock: 33MHz
             configuration: driver=i801_smbus latency=0
             resources: irq:16 memory:a1218000-a12180ff ioport:efa0(size=32)
        *-serial:3
             description: Serial bus controller
             product: Cannon Lake PCH SPI Controller
             vendor: Intel Corporation
             physical id: 1f.5
             bus info: pci@0000:00:1f.5
             version: 10
             width: 32 bits
             clock: 33MHz
             configuration: driver=intel-spi latency=0
             resources: irq:0 memory:fe010000-fe010fff
  *-power UNCLAIMED
       description: To Be Filled By O.E.M.
       product: To Be Filled By O.E.M.
       vendor: To Be Filled By O.E.M.
       physical id: 1
       version: To Be Filled By O.E.M.
       serial: To Be Filled By O.E.M.
       capacity: 32768mWh
  *-input:0
       product: Sleep Button
       physical id: 2
       logical name: input0
       logical name: /dev/input/event0
       capabilities: platform
  *-input:1
       product: Power Button
       physical id: 3
       logical name: input1
       logical name: /dev/input/event1
       capabilities: platform
  *-input:2
       product: Power Button
       physical id: 4
       logical name: input2
       logical name: /dev/input/event2
       capabilities: platform
  *-input:3
       product: Video Bus
       physical id: 5
       logical name: input7
       logical name: /dev/input/event7
       capabilities: platform
  *-input:4
       product: PC Speaker
       physical id: 6
       logical name: input8
       logical name: /dev/input/event8
       capabilities: isa

[-- Attachment #3: config-6.1.0-rc3.gz --]
[-- Type: application/gzip, Size: 66273 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-04 10:40 BUG: kworker memory leak found in 6.1.0-rc3 Mirsad Goran Todorovac
@ 2022-11-10  4:57 ` Mirsad Goran Todorovac
  2022-11-10  8:28   ` Thorsten Leemhuis
  2022-11-10  9:20   ` Greg KH
  0 siblings, 2 replies; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-10  4:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: regressions, Tejun Heo, Florian Mickler, Thorsten Leemhuis,
	systemd-devel

[-- Attachment #1: Type: text/plain, Size: 6231 bytes --]

On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:

> Dear Sirs,
>
> When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled 
> CONFIG_DEBUG_KMEMLEAK=y
> and the result showed an unreferenced object in kworker process:
>
> # cat /sys/kernel/debug/kmemleak
> unreferenced object 0xffffa01dabff6100 (size 16):
>   comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
>   hex dump (first 16 bytes):
>     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>   backtrace:
>     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>     [<0000000005472512>] kstrdup+0x36/0x70
>     [<000000002f797ac4>] kstrdup_const+0x28/0x30
>     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>     [<000000004158a6c0>] dev_set_name+0x53/0x70
>     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>     [<00000000122bb894>] process_one_work+0x214/0x3f0
>     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>     [<0000000002409855>] kthread+0xed/0x120
>     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> unreferenced object 0xffffa01dabff6ec0 (size 16):
>   comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
>   hex dump (first 16 bytes):
>     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>   backtrace:
>     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>     [<0000000005472512>] kstrdup+0x36/0x70
>     [<000000002f797ac4>] kstrdup_const+0x28/0x30
>     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>     [<000000004158a6c0>] dev_set_name+0x53/0x70
>     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>     [<00000000122bb894>] process_one_work+0x214/0x3f0
>     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>     [<0000000002409855>] kthread+0xed/0x120
>     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> #
>
> Please fing the build config and lshw output attached.
>
> dmesg is useless, as it is filled with events like:
>
> [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
> [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
> [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
> [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
> [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
> [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0

This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev" 
kernel memory leaks, potentially exposing race conditions or other more 
serious bug.

The bug is now also confirmed and now manifested also in the Ubuntu 
22.04 LTS jammy 6.1-rc4 build.

Here is the kmemleak output:

unreferenced object 0xffff9242b13b3980 (size 64):
   comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
   hex dump (first 32 bytes):
     80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
     20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
   backtrace:
     [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
     [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
     [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180
     [<0000000099436a99>] xhci_alloc_command_with_ctx+0x1d/0x60
     [<0000000070f45e17>] xhci_change_max_exit_latency+0x2e/0x1c0
     [<000000001b13cf46>] xhci_disable_usb3_lpm_timeout+0x77/0xb0
     [<00000000ff561da4>] usb_disable_link_state+0x53/0xd0
     [<0000000068febd40>] usb_disable_lpm+0x82/0xc0
     [<00000000dffec01f>] usb_unlocked_disable_lpm+0x2d/0x50
     [<0000000061a59294>] usb_disable_device+0x12f/0x250
     [<0000000044e2299d>] usb_set_configuration+0x65c/0x9a0
     [<000000001af32470>] driver_set_config_work+0x78/0xa0
     [<00000000320216c3>] process_one_work+0x214/0x3f0
     [<00000000694e932f>] worker_thread+0x34/0x3d0
     [<0000000002e30775>] kthread+0xed/0x120
     [<00000000512e8066>] ret_from_fork+0x1f/0x30
unreferenced object 0xffff9242f0a08620 (size 32):
   comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
   hex dump (first 32 bytes):
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
     30 86 a0 f0 42 92 ff ff 30 86 a0 f0 42 92 ff ff 0...B...0...B...
   backtrace:
     [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
     [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
     [<00000000459908cf>] xhci_alloc_command+0xe6/0x180
     [<0000000099436a99>] xhci_alloc_command_with_ctx+0x1d/0x60
     [<0000000070f45e17>] xhci_change_max_exit_latency+0x2e/0x1c0
     [<000000001b13cf46>] xhci_disable_usb3_lpm_timeout+0x77/0xb0
     [<00000000ff561da4>] usb_disable_link_state+0x53/0xd0
     [<0000000068febd40>] usb_disable_lpm+0x82/0xc0
     [<00000000dffec01f>] usb_unlocked_disable_lpm+0x2d/0x50
     [<0000000061a59294>] usb_disable_device+0x12f/0x250
     [<0000000044e2299d>] usb_set_configuration+0x65c/0x9a0
     [<000000001af32470>] driver_set_config_work+0x78/0xa0
     [<00000000320216c3>] process_one_work+0x214/0x3f0
     [<00000000694e932f>] worker_thread+0x34/0x3d0
     [<0000000002e30775>] kthread+0xed/0x120
     [<00000000512e8066>] ret_from_fork+0x1f/0x30

Please find the complete kmemleak output attached:

Thanks,
Mirsad

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
-- 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union

[-- Attachment #2: thermald_systemd-dev_kworker.memleak.lrz --]
[-- Type: application/x-lrzip, Size: 2723 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-10  4:57 ` BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4 Mirsad Goran Todorovac
@ 2022-11-10  8:28   ` Thorsten Leemhuis
  2022-11-11  8:44     ` Mirsad Goran Todorovac
  2022-11-10  9:20   ` Greg KH
  1 sibling, 1 reply; 10+ messages in thread
From: Thorsten Leemhuis @ 2022-11-10  8:28 UTC (permalink / raw)
  To: Mirsad Goran Todorovac, linux-kernel
  Cc: regressions, Tejun Heo, Florian Mickler, systemd-devel

On 10.11.22 05:57, Mirsad Goran Todorovac wrote:
> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:

> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
> kernel memory leaks, potentially exposing race conditions or other more
> serious bug.

Maybe, but that sadly is also true for a lot of other known issues, for
example those in this quite long list:
https://syzkaller.appspot.com/upstream#open

It would help if you could pinpoint the problem, then we know who should
look into this. You CCed me and the regression list, so I assume it's a
regression. Hence: Could you try to bisect it?

Ciao, Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-10  4:57 ` BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4 Mirsad Goran Todorovac
  2022-11-10  8:28   ` Thorsten Leemhuis
@ 2022-11-10  9:20   ` Greg KH
  2022-11-17 15:34     ` Mirsad Goran Todorovac
  2022-11-29  3:35     ` Mirsad Goran Todorovac
  1 sibling, 2 replies; 10+ messages in thread
From: Greg KH @ 2022-11-10  9:20 UTC (permalink / raw)
  To: Mirsad Goran Todorovac
  Cc: linux-kernel, regressions, Tejun Heo, Florian Mickler,
	Thorsten Leemhuis, systemd-devel

On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote:
> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:
> 
> > Dear Sirs,
> > 
> > When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled
> > CONFIG_DEBUG_KMEMLEAK=y
> > and the result showed an unreferenced object in kworker process:
> > 
> > # cat /sys/kernel/debug/kmemleak
> > unreferenced object 0xffffa01dabff6100 (size 16):
> >   comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
> >   hex dump (first 16 bytes):
> >     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
> >   backtrace:
> >     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
> >     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
> >     [<0000000005472512>] kstrdup+0x36/0x70
> >     [<000000002f797ac4>] kstrdup_const+0x28/0x30
> >     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
> >     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
> >     [<000000004158a6c0>] dev_set_name+0x53/0x70
> >     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
> >     [<00000000122bb894>] process_one_work+0x214/0x3f0
> >     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
> >     [<0000000002409855>] kthread+0xed/0x120
> >     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> > unreferenced object 0xffffa01dabff6ec0 (size 16):
> >   comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
> >   hex dump (first 16 bytes):
> >     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
> >   backtrace:
> >     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
> >     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
> >     [<0000000005472512>] kstrdup+0x36/0x70
> >     [<000000002f797ac4>] kstrdup_const+0x28/0x30
> >     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
> >     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
> >     [<000000004158a6c0>] dev_set_name+0x53/0x70
> >     [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
> >     [<00000000122bb894>] process_one_work+0x214/0x3f0
> >     [<00000000fcf282cc>] worker_thread+0x34/0x3d0
> >     [<0000000002409855>] kthread+0xed/0x120
> >     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> > #
> > 
> > Please fing the build config and lshw output attached.
> > 
> > dmesg is useless, as it is filled with events like:
> > 
> > [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
> > [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> > [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
> > [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> > [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
> > [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
> > [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
> > [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> 
> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
> kernel memory leaks, potentially exposing race conditions or other more
> serious bug.

How is a memory leak a race condition?

> The bug is now also confirmed and now manifested also in the Ubuntu 22.04
> LTS jammy 6.1-rc4 build.
> 
> Here is the kmemleak output:
> 
> unreferenced object 0xffff9242b13b3980 (size 64):
>   comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
>   hex dump (first 32 bytes):
>     80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
>     20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
>   backtrace:
>     [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
>     [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
>     [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180

This is a totally different backtrace from above, how are they related?

This looks like a potential xhci issue.  Can you use 'git bisect' to
track down the offending change that caused this?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-10  8:28   ` Thorsten Leemhuis
@ 2022-11-11  8:44     ` Mirsad Goran Todorovac
  2022-11-11 10:09       ` Mirsad Goran Todorovac
  0 siblings, 1 reply; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-11  8:44 UTC (permalink / raw)
  To: Thorsten Leemhuis, linux-kernel
  Cc: regressions, Tejun Heo, Florian Mickler, systemd-devel

On 10.11.2022. 9:28, Thorsten Leemhuis wrote:

> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
> kernel memory leaks, potentially exposing race conditions or other more
> serious bug.
>> Maybe, but that sadly is also true for a lot of other known issues, for
>> example those in this quite long list:
>> https://syzkaller.appspot.com/upstream#open
>>
>> It would help if you could pinpoint the problem, then we know who should
>> look into this. You CCed me and the regression list, so I assume it's a
>> regression. Hence: Could you try to bisect it?
>>
>> Ciao, Thorsten

Hi, Thorsten!

I am taking this task, however, it might not be a relatively easy bisect 
like the past
two or three (probably were beginner's luck).

It appears to predate 4.19:

$ head -13 memleak-kwork-4.19.0-08-84df9525b0c2-memlk-menu-al.log
unreferenced object 0xffff8ff917c79c40 (size 16):
   comm "kworker/u12:4", pid 422, jiffies 4294672757 (age 380.342s)
   hex dump (first 16 bytes):
     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
   backtrace:
     [<000000004f7bc99c>] kobject_set_name_vargs+0x1e/0x90
     [<00000000f00ab312>] dev_set_name+0x57/0x70
     [<000000001fd9518e>] memstick_check+0x99/0x330 [memstick]
     [<000000008c797991>] process_one_work+0x1a7/0x3a0
     [<00000000405c5133>] worker_thread+0x30/0x390
     [<0000000060a58c2e>] kthread+0x112/0x130
     [<000000004b138871>] ret_from_fork+0x35/0x40
     [<0000000029f3e0aa>] 0xffffffffffffffff
$

Cheers,
Mirsad

-- 
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-11  8:44     ` Mirsad Goran Todorovac
@ 2022-11-11 10:09       ` Mirsad Goran Todorovac
  0 siblings, 0 replies; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-11 10:09 UTC (permalink / raw)
  To: Thorsten Leemhuis, linux-kernel; +Cc: regressions, Tejun Heo, Florian Mickler

On 10.11.2022. 9:28, Thorsten Leemhuis wrote:

> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
> kernel memory leaks, potentially exposing race conditions or other more
> serious bug.
>> Maybe, but that sadly is also true for a lot of other known issues, for
>> example those in this quite long list:
>> https://syzkaller.appspot.com/upstream#open
>>
>> It would help if you could pinpoint the problem, then we know who should
>> look into this. You CCed me and the regression list, so I assume it's a
>> regression. Hence: Could you try to bisect it?
>>
>> Ciao, Thorsten

Hi, Thorsten!

I am taking this task, however, it might not be a relatively easy bisect 
like the past
two or three (probably were beginner's luck).

It appears to predate 4.19:

$ head -13 memleak-kwork-4.19.0-08-84df9525b0c2-memlk-menu-al.log
unreferenced object 0xffff8ff917c79c40 (size 16):
   comm "kworker/u12:4", pid 422, jiffies 4294672757 (age 380.342s)
   hex dump (first 16 bytes):
     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
   backtrace:
     [<000000004f7bc99c>] kobject_set_name_vargs+0x1e/0x90
     [<00000000f00ab312>] dev_set_name+0x57/0x70
     [<000000001fd9518e>] memstick_check+0x99/0x330 [memstick]
     [<000000008c797991>] process_one_work+0x1a7/0x3a0
     [<00000000405c5133>] worker_thread+0x30/0x390
     [<0000000060a58c2e>] kthread+0x112/0x130
     [<000000004b138871>] ret_from_fork+0x35/0x40
     [<0000000029f3e0aa>] 0xffffffffffffffff
$

Cheers,
Mirsad

P.S. This mail is re-sent because of forgetting to set "Plain text" mode 
to Thunderbird.

-- 
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-10  9:20   ` Greg KH
@ 2022-11-17 15:34     ` Mirsad Goran Todorovac
  2022-11-29  3:35     ` Mirsad Goran Todorovac
  1 sibling, 0 replies; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-17 15:34 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, regressions, Tejun Heo, Florian Mickler,
	Thorsten Leemhuis, systemd-devel

On 10.11.2022. 10:20, Greg KH wrote:
> On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote:
>> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:
>>
>>> Dear Sirs,
>>>
>>> When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled
>>> CONFIG_DEBUG_KMEMLEAK=y
>>> and the result showed an unreferenced object in kworker process:
>>>
>>> # cat /sys/kernel/debug/kmemleak
>>> unreferenced object 0xffffa01dabff6100 (size 16):
>>>    comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
>>>    hex dump (first 16 bytes):
>>>      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>    backtrace:
>>>      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>      [<0000000005472512>] kstrdup+0x36/0x70
>>>      [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>      [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>      [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>      [<0000000002409855>] kthread+0xed/0x120
>>>      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>> unreferenced object 0xffffa01dabff6ec0 (size 16):
>>>    comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
>>>    hex dump (first 16 bytes):
>>>      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>    backtrace:
>>>      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>      [<0000000005472512>] kstrdup+0x36/0x70
>>>      [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>      [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>      [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>      [<0000000002409855>] kthread+0xed/0x120
>>>      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>> #
>>>
>>> Please fing the build config and lshw output attached.
>>>
>>> dmesg is useless, as it is filled with events like:
>>>
>>> [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
>>> [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>> [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
>>> [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>> [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
>>> [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
>>> [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
>>> [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>
>> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
>> kernel memory leaks, potentially exposing race conditions or other more
>> serious bug.
> 
> How is a memory leak a race condition?
Probably I connected it with spurious memleak in thermald that occurs 
only under the torture tests.

>> The bug is now also confirmed and now manifested also in the Ubuntu 22.04
>> LTS jammy 6.1-rc4 build.
>>
>> Here is the kmemleak output:
>>
>> unreferenced object 0xffff9242b13b3980 (size 64):
>>    comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
>>    hex dump (first 32 bytes):
>>      80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
>>      20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
>>    backtrace:
>>      [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
>>      [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
>>      [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180
> 
> This is a totally different backtrace from above, how are they related?
> 
> This looks like a potential xhci issue.  Can you use 'git bisect' to
> track down the offending change that caused this?
> 
> thanks,
> 
> greg k-h

Hi, Greg, I saw this email only now. I will try to bisect the bug.
I was trying to bisect the first instance that occurs only on AlmaLinux 
and it is introduced before 4.17. Here is the progress of the bisect on 
AlmaLinux 8.6 (a.k.a. Centos 8):

mtodorov@domac:~/linux/kernel/linux_stable$ git bisect log
git bisect start
# bad: [f0c4d9fc9cc9462659728d168387191387e903cc] Linux 6.1-rc4
git bisect bad f0c4d9fc9cc9462659728d168387191387e903cc
# bad: [fbd56ddcecab5a3623a89c8e941fdbcc55b41045] Linux 6.0.1
git bisect bad fbd56ddcecab5a3623a89c8e941fdbcc55b41045
# bad: [7e18e42e4b280c85b76967a9106a13ca61c16179] Linux 6.0-rc4
git bisect bad 7e18e42e4b280c85b76967a9106a13ca61c16179
# bad: [568035b01cfb107af8d2e4bd2fb9aea22cf5b868] Linux 6.0-rc1
git bisect bad 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
# bad: [84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d] Linux 4.19
git bisect bad 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d
# bad: [94710cac0ef4ee177a63b5227664b38c95bbf703] Linux 4.18
git bisect bad 94710cac0ef4ee177a63b5227664b38c95bbf703
# bad: [29dcea88779c856c7dc92040a0c01233263101d4] Linux 4.17
git bisect bad 29dcea88779c856c7dc92040a0c01233263101d4
mtodorov@domac:~/linux/kernel/linux_stable$

I failed to notice the different nature of the second memory leak.
Of course, if it is reproducible always in the same way, I'd agree that 
it doesn't look like a race condition, but from one occurrence it is 
hard to tell (I generalised from thermald/acpi bug bisect).

Please give me some grace period for I am only 2 1/2 months in the 
kernel bisecting ...

Cheers,
Mirsad

-- 
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-10  9:20   ` Greg KH
  2022-11-17 15:34     ` Mirsad Goran Todorovac
@ 2022-11-29  3:35     ` Mirsad Goran Todorovac
  2022-11-29  8:36       ` Greg KH
  1 sibling, 1 reply; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-29  3:35 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, regressions, Tejun Heo, Florian Mickler,
	Thorsten Leemhuis, systemd-devel

On 10. 11. 2022. 10:20, Greg KH wrote:
> On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote:
>> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:
>>
>>> Dear Sirs,
>>>
>>> When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled
>>> CONFIG_DEBUG_KMEMLEAK=y
>>> and the result showed an unreferenced object in kworker process:
>>>
>>> # cat /sys/kernel/debug/kmemleak
>>> unreferenced object 0xffffa01dabff6100 (size 16):
>>>    comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
>>>    hex dump (first 16 bytes):
>>>      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>    backtrace:
>>>      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>      [<0000000005472512>] kstrdup+0x36/0x70
>>>      [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>      [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>      [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>      [<0000000002409855>] kthread+0xed/0x120
>>>      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>> unreferenced object 0xffffa01dabff6ec0 (size 16):
>>>    comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
>>>    hex dump (first 16 bytes):
>>>      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>    backtrace:
>>>      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>      [<0000000005472512>] kstrdup+0x36/0x70
>>>      [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>      [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>      [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>      [<0000000002409855>] kthread+0xed/0x120
>>>      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>> #
>>>
>>> Please fing the build config and lshw output attached.
>>>
>>> dmesg is useless, as it is filled with events like:
>>>
>>> [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
>>> [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>> [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
>>> [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>> [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
>>> [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>> [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
>>> [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
>>> [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>
>> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
>> kernel memory leaks, potentially exposing race conditions or other more
>> serious bug.
> 
> How is a memory leak a race condition?
> 
>> The bug is now also confirmed and now manifested also in the Ubuntu 22.04
>> LTS jammy 6.1-rc4 build.
>>
>> Here is the kmemleak output:
>>
>> unreferenced object 0xffff9242b13b3980 (size 64):
>>    comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
>>    hex dump (first 32 bytes):
>>      80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
>>      20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
>>    backtrace:
>>      [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
>>      [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
>>      [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180
> 
> This is a totally different backtrace from above, how are they related?
> 
> This looks like a potential xhci issue.  Can you use 'git bisect' to
> track down the offending change that caused this?
> 
> thanks,
> 
> greg k-h

Hello, Greg, Thorsten!

After multiple attempts, my box's UEFI refuses to run pre-4.17 kernels.
The bisect shows the problem appeared before 4.17, so unless I find what is
causing black screen when booting pre-4.17 kernels, it's a no-go ... :(

Thanks,
Mirsad

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
-- 
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-29  3:35     ` Mirsad Goran Todorovac
@ 2022-11-29  8:36       ` Greg KH
  2022-11-29  9:59         ` Mirsad Goran Todorovac
  0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2022-11-29  8:36 UTC (permalink / raw)
  To: Mirsad Goran Todorovac
  Cc: linux-kernel, regressions, Tejun Heo, Florian Mickler,
	Thorsten Leemhuis, systemd-devel

On Tue, Nov 29, 2022 at 04:35:10AM +0100, Mirsad Goran Todorovac wrote:
> On 10. 11. 2022. 10:20, Greg KH wrote:
> > On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote:
> > > On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:
> > > 
> > > > Dear Sirs,
> > > > 
> > > > When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled
> > > > CONFIG_DEBUG_KMEMLEAK=y
> > > > and the result showed an unreferenced object in kworker process:
> > > > 
> > > > # cat /sys/kernel/debug/kmemleak
> > > > unreferenced object 0xffffa01dabff6100 (size 16):
> > > >    comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
> > > >    hex dump (first 16 bytes):
> > > >      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
> > > >    backtrace:
> > > >      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
> > > >      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
> > > >      [<0000000005472512>] kstrdup+0x36/0x70
> > > >      [<000000002f797ac4>] kstrdup_const+0x28/0x30
> > > >      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
> > > >      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
> > > >      [<000000004158a6c0>] dev_set_name+0x53/0x70
> > > >      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
> > > >      [<00000000122bb894>] process_one_work+0x214/0x3f0
> > > >      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
> > > >      [<0000000002409855>] kthread+0xed/0x120
> > > >      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> > > > unreferenced object 0xffffa01dabff6ec0 (size 16):
> > > >    comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
> > > >    hex dump (first 16 bytes):
> > > >      6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
> > > >    backtrace:
> > > >      [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
> > > >      [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
> > > >      [<0000000005472512>] kstrdup+0x36/0x70
> > > >      [<000000002f797ac4>] kstrdup_const+0x28/0x30
> > > >      [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
> > > >      [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
> > > >      [<000000004158a6c0>] dev_set_name+0x53/0x70
> > > >      [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
> > > >      [<00000000122bb894>] process_one_work+0x214/0x3f0
> > > >      [<00000000fcf282cc>] worker_thread+0x34/0x3d0
> > > >      [<0000000002409855>] kthread+0xed/0x120
> > > >      [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
> > > > #
> > > > 
> > > > Please fing the build config and lshw output attached.
> > > > 
> > > > dmesg is useless, as it is filled with events like:
> > > > 
> > > > [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
> > > > [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > > > [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> > > > [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
> > > > [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > > > [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
> > > > [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
> > > > [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > > > [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
> > > > [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
> > > > [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
> > > 
> > > This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
> > > kernel memory leaks, potentially exposing race conditions or other more
> > > serious bug.
> > 
> > How is a memory leak a race condition?
> > 
> > > The bug is now also confirmed and now manifested also in the Ubuntu 22.04
> > > LTS jammy 6.1-rc4 build.
> > > 
> > > Here is the kmemleak output:
> > > 
> > > unreferenced object 0xffff9242b13b3980 (size 64):
> > >    comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
> > >    hex dump (first 32 bytes):
> > >      80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
> > >      20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
> > >    backtrace:
> > >      [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
> > >      [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
> > >      [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180
> > 
> > This is a totally different backtrace from above, how are they related?
> > 
> > This looks like a potential xhci issue.  Can you use 'git bisect' to
> > track down the offending change that caused this?
> > 
> > thanks,
> > 
> > greg k-h
> 
> Hello, Greg, Thorsten!
> 
> After multiple attempts, my box's UEFI refuses to run pre-4.17 kernels.
> The bisect shows the problem appeared before 4.17, so unless I find what is
> causing black screen when booting pre-4.17 kernels, it's a no-go ... :(

Ok, so I guess this has always been an issue, and is not a regression,
which is good.  Can you work with the memstick developers to find a
solution?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4
  2022-11-29  8:36       ` Greg KH
@ 2022-11-29  9:59         ` Mirsad Goran Todorovac
  0 siblings, 0 replies; 10+ messages in thread
From: Mirsad Goran Todorovac @ 2022-11-29  9:59 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, regressions, Tejun Heo, Florian Mickler,
	Thorsten Leemhuis, Alex Dubov, Arnd Bergmann, Greg Kroah-Hartman,
	Greg Kroah-Hartman, Jiri Slaby, Joey Pabalan, Kai-Heng Feng,
	Kay Sievers, Linus Torvalds, Paul Gortmaker, Qinglang Miao,
	Tejun Heo, Thomas Gleixner, Uwe Kleine-König,
	Vasiliy Kulikov, Wang Hai, Wolfram Sang

On 29.11.2022. 9:36, Greg KH wrote:
> On Tue, Nov 29, 2022 at 04:35:10AM +0100, Mirsad Goran Todorovac wrote:
>> On 10. 11. 2022. 10:20, Greg KH wrote:
>>> On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote:
>>>> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote:
>>>>
>>>>> Dear Sirs,
>>>>>
>>>>> When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled
>>>>> CONFIG_DEBUG_KMEMLEAK=y
>>>>> and the result showed an unreferenced object in kworker process:
>>>>>
>>>>> # cat /sys/kernel/debug/kmemleak
>>>>> unreferenced object 0xffffa01dabff6100 (size 16):
>>>>>     comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s)
>>>>>     hex dump (first 16 bytes):
>>>>>       6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>>>     backtrace:
>>>>>       [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>>>       [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>>>       [<0000000005472512>] kstrdup+0x36/0x70
>>>>>       [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>>>       [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>>>       [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>>>       [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>>>       [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>>>       [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>>>       [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>>>       [<0000000002409855>] kthread+0xed/0x120
>>>>>       [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>>>> unreferenced object 0xffffa01dabff6ec0 (size 16):
>>>>>     comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s)
>>>>>     hex dump (first 16 bytes):
>>>>>       6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0.......
>>>>>     backtrace:
>>>>>       [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0
>>>>>       [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150
>>>>>       [<0000000005472512>] kstrdup+0x36/0x70
>>>>>       [<000000002f797ac4>] kstrdup_const+0x28/0x30
>>>>>       [<00000000e3f86581>] kvasprintf_const+0x78/0xa0
>>>>>       [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0
>>>>>       [<000000004158a6c0>] dev_set_name+0x53/0x70
>>>>>       [<000000001a120541>] memstick_check+0xff/0x384 [memstick]
>>>>>       [<00000000122bb894>] process_one_work+0x214/0x3f0
>>>>>       [<00000000fcf282cc>] worker_thread+0x34/0x3d0
>>>>>       [<0000000002409855>] kthread+0xed/0x120
>>>>>       [<000000007b02b4a3>] ret_from_fork+0x1f/0x30
>>>>> #
>>>>>
>>>>> Please fing the build config and lshw output attached.
>>>>>
>>>>> dmesg is useless, as it is filled with events like:
>>>>>
>>>>> [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0
>>>>> [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>>>> [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>>>> [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1
>>>>> [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>>>> [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762
>>>>> [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0
>>>>> [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>>>> [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792
>>>>> [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1
>>>>> [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0
>>>>
>>>> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev"
>>>> kernel memory leaks, potentially exposing race conditions or other more
>>>> serious bug.
>>>
>>> How is a memory leak a race condition?
>>>
>>>> The bug is now also confirmed and now manifested also in the Ubuntu 22.04
>>>> LTS jammy 6.1-rc4 build.
>>>>
>>>> Here is the kmemleak output:
>>>>
>>>> unreferenced object 0xffff9242b13b3980 (size 64):
>>>>     comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s)
>>>>     hex dump (first 32 bytes):
>>>>       80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B...........
>>>>       20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B...........
>>>>     backtrace:
>>>>       [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0
>>>>       [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0
>>>>       [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180
>>>
>>> This is a totally different backtrace from above, how are they related?
>>>
>>> This looks like a potential xhci issue.  Can you use 'git bisect' to
>>> track down the offending change that caused this?
>>>
>>> thanks,
>>>
>>> greg k-h
>>
>> Hello, Greg, Thorsten!
>>
>> After multiple attempts, my box's UEFI refuses to run pre-4.17 kernels.
>> The bisect shows the problem appeared before 4.17, so unless I find what is
>> causing black screen when booting pre-4.17 kernels, it's a no-go ... :(
> 
> Ok, so I guess this has always been an issue, and is not a regression,
> which is good.  Can you work with the memstick developers to find a
> solution?

Hi, Greg,

Of course, I will gladly cooperate with the memstick team.
I will CC: everyone with commits to the memstick driver, I hope that's 
not too awkward.

So far, the Code of Conduct says to inform the maintainers about the bug.

BTW, the bug is confirmed as unfixed in 6.1-rc7:

# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff93e548ab1e90 (size 16):
   comm "kworker/u12:5", pid 405, jiffies 4294894087 (age 65919.068s)
   hex dump (first 16 bytes):
     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00  memstick0.......
   backtrace:
     [<00000000942f1553>] __kmem_cache_alloc_node+0x380/0x4e0
     [<00000000555b3e8a>] __kmalloc_node_track_caller+0x55/0x140
     [<000000000b60a98a>] kstrdup+0x36/0x70
     [<00000000f9a4a52a>] kstrdup_const+0x28/0x30
     [<000000005c5ca378>] kvasprintf_const+0x78/0xa0
     [<00000000b8f94e41>] kobject_set_name_vargs+0x23/0xa0
     [<00000000b7a2c8ea>] dev_set_name+0x53/0x70
     [<00000000291af717>] memstick_check+0xff/0x384 [memstick]
     [<000000007b776e48>] process_one_work+0x214/0x3f0
     [<000000005791f9b2>] worker_thread+0x34/0x3d0
     [<00000000df696ef8>] kthread+0xed/0x120
     [<0000000016f05dd5>] ret_from_fork+0x1f/0x30
#

Thanks,
Mirsad

-- 
Mirsad Todorovac
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb
Republic of Croatia, the European Union
--
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-29  9:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 10:40 BUG: kworker memory leak found in 6.1.0-rc3 Mirsad Goran Todorovac
2022-11-10  4:57 ` BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4 Mirsad Goran Todorovac
2022-11-10  8:28   ` Thorsten Leemhuis
2022-11-11  8:44     ` Mirsad Goran Todorovac
2022-11-11 10:09       ` Mirsad Goran Todorovac
2022-11-10  9:20   ` Greg KH
2022-11-17 15:34     ` Mirsad Goran Todorovac
2022-11-29  3:35     ` Mirsad Goran Todorovac
2022-11-29  8:36       ` Greg KH
2022-11-29  9:59         ` Mirsad Goran Todorovac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).