You are not logged in.

#1 2023-12-24 08:52:59

gellyham
Member
Registered: 2023-12-24
Posts: 2

udev prevents pc shutdown, system unable to kill process [SOLVED]

Have experienced this 3 or 4 times now where I have to force shutdown pc. I started experiencing this issues when I started using a new keyboard that connects with bluetooth. I am uncertain what triggers this but my best guess is this happens when the system sleeps or is unable to sleep. After this I am unable to use my keyboard, keystrokes are not registered and when I disable bluetooth and re-enable it again, the keyboard responds for some seconds and then keystrokes aren't registered anymore, other times disabling and renabling bluetooth doesn't work at all. And whilst this is happening I am unable to switch to wired mode on the keyboard, in attempts to fix this I shutdown the pc which hangs forever because system is unable to kill a udev process.

checking journal from "2023-12-23" which was the last time I experienced this issue

 journalctl -S "2023-12-23" | grep "udev"

this is the output of above:

Dec 23 16:54:44 username systemd[1]: Listening on udev Control Socket.
Dec 23 16:54:44 username systemd[1]: Listening on udev Kernel Socket.
Dec 23 16:54:44 username systemd[1]: Starting Coldplug All udev Devices...
Dec 23 16:54:44 username systemd[1]: Finished Coldplug All udev Devices.
Dec 23 16:54:45 username systemd-udevd[413]: Using default interface naming scheme 'v255'.
Dec 23 16:54:45 username systemd-udevd[413]: /usr/lib/udev/rules.d/51-android.rules:1011 Unknown group 'adbusers', ignoring.
Dec 23 17:39:03 username systemd-udevd[413]: sda: Worker [460] processing SEQNUM=49240 is taking a long time
Dec 23 17:41:03 username systemd-udevd[413]: sda: Worker [460] processing SEQNUM=49240 killed
Dec 23 17:41:36 username kernel: INFO: task (udev-worker):460 blocked for more than 122 seconds.
Dec 23 17:41:36 username kernel: task:(udev-worker)   state:D stack:0     pid:460   ppid:413    flags:0x00004006
Dec 23 17:43:39 username kernel: INFO: task (udev-worker):460 blocked for more than 245 seconds.
Dec 23 17:43:39 username kernel: task:(udev-worker)   state:D stack:0     pid:460   ppid:413    flags:0x00004006
Dec 23 17:45:42 username kernel: INFO: task (udev-worker):460 blocked for more than 368 seconds.
Dec 23 17:45:42 username kernel: task:(udev-worker)   state:D stack:0     pid:460   ppid:413    flags:0x00004006
Dec 23 17:47:44 username kernel: INFO: task (udev-worker):460 blocked for more than 491 seconds.
Dec 23 17:47:45 username kernel: task:(udev-worker)   state:D stack:0     pid:460   ppid:413    flags:0x00004006
Dec 23 17:49:47 username kernel: INFO: task (udev-worker):460 blocked for more than 614 seconds.
Dec 23 17:49:47 username kernel: task:(udev-worker)   state:D stack:0     pid:460   ppid:413    flags:0x00004006

checking bluetooth journal output at the same time

journalctl -S "2023-12-23" | grep "bluetooth" 

yields

Dec 23 16:54:46 username NetworkManager[540]: <info>  [1703350486.2409] Loaded device plugin: NMBluezManager (/usr/lib/NetworkManager/1.44.2-3/libnm-device-plugin-bluetooth.so)
Dec 23 16:54:46 username bluetoothd[571]: Bluetooth daemon 5.71
Dec 23 16:54:46 username bluetoothd[571]: Starting SDP server
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support csip plugin
Dec 23 16:54:46 username bluetoothd[571]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support micp plugin
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support vcp plugin
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support mcp plugin
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support bass plugin
Dec 23 16:54:46 username bluetoothd[571]: src/plugin.c:plugin_init() System does not support bap plugin
Dec 23 16:54:46 username bluetoothd[571]: Bluetooth management interface 1.22 initialized
Dec 23 16:54:46 username bluetoothd[571]: Battery Provider Manager created
Dec 23 16:54:46 username bluetoothd[571]: src/device.c:device_set_wake_support() Unable to set wake_support without RPA resolution
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/sink/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/sink/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/source/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/sink/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/source/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/sink/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/source/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/source/1
Dec 23 16:54:47 username bluetoothd[571]: src/device.c:set_wake_allowed_complete() Set device flags return status: Invalid Parameters

running

journalctl -S "2023-12-23" | grep "hci0"

also yields

Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: examining hci_ver=0b hci_rev=000a lmp_ver=0b lmp_subver=8852
Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1
Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8852au_fw.bin
Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8852au_config.bin
Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: cfg_sz 6, total sz 64891
Dec 23 16:54:46 username kernel: Bluetooth: hci0: RTL: fw version 0xdfc8145f
Dec 23 16:54:46 username kernel: Bluetooth: hci0: AOSP extensions version v1.00
Dec 23 16:54:46 username kernel: Bluetooth: hci0: AOSP quality report is supported
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/sink/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/sink/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/source/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/sink/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/SBC/source/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/sink/1
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/source/2
Dec 23 16:54:46 username bluetoothd[571]: Endpoint registered: sender=:1.6 path=/org/bluez/hci0/A2DP/AAC/source/1
Dec 23 16:54:47 username kernel: Bluetooth: hci0: Bad flag given (0x1) vs supported (0x0)

Last edited by gellyham (2024-01-03 07:50:31)

Offline

#2 2023-12-24 14:54:49

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 42

Re: udev prevents pc shutdown, system unable to kill process [SOLVED]

Me too, "sudo killall '(udev-worker)'" does not work; "sudo rmmod -f hid_sensor_magn_3d" does not work either; and cannot shutdown the computer.

$ sudo rmmod -f hid_sensor_magn_3d
rmmod: ERROR: could not remove 'hid_sensor_magn_3d': Device or resource busy
rmmod: ERROR: could not remove module hid_sensor_magn_3d: Device or resource busy

$ sudo killall -9 '(udev-worker)'
$ sudo killall -9 '(udev-worker)'

$ sudo journalctl -fu systemd-udevd
Dec 24 21:35:08 cottage systemd[1]: Starting Rule-based Manager for Device Events and Files...
Dec 24 21:35:08 cottage systemd-udevd[442]: Using default interface naming scheme 'v255'.
Dec 24 21:35:08 cottage systemd[1]: Started Rule-based Manager for Device Events and Files.
Dec 24 21:35:09 cottage systemd-udevd[442]: HID-SENSOR-200083.2.auto: Worker [473] terminated by signal 9 (KILL).
Dec 24 21:36:09 cottage systemd-udevd[442]: 0000:e5:00.7: Worker [490] processing SEQNUM=3592 is taking a long time
Dec 24 21:38:09 cottage systemd-udevd[442]: 0000:e5:00.7: Worker [490] processing SEQNUM=3592 killed

Note: it says "Worker [490] processing SEQNUM=3592 killed"; but that '490' process is actually not kiiled. The shutdown process waits forever, thus required a cold boot.

Last edited by triplc (2023-12-24 15:05:17)

Offline

#3 2024-01-02 03:44:36

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 42

Re: udev prevents pc shutdown, system unable to kill process [SOLVED]

At last I blacklist those 'troublesome' device (drivers) and it seems OK, no more unable shutdown because of udev process waiting forever.

$  cat /etc/modprobe.d/nohidsensors3d.conf
blacklist hid_sensor_gyro_3d
blacklist hid_sensor_accel_3d
blacklist hid_sensor_magn_3d

Offline

#4 2024-01-02 23:43:50

gellyham
Member
Registered: 2023-12-24
Posts: 2

Re: udev prevents pc shutdown, system unable to kill process [SOLVED]

After checking the logs after this happened again with the others, it seems that watchdog was the true culprit. Turns out after my bluetooth malfunctions that is when /dev/watchdog0 is unable to stop. Further more I have followed the instructions to disable/blacklist watchdog I am currently observing if my bluetooth malfunctions again to see if the problem still exists or not.

Last edited by gellyham (2024-01-02 23:45:46)

Offline

Board footer

Powered by FluxBB