[systemd-devel] [BUG] too many rfkill services

Łukasz Stelmach stlman at poczta.fm
Tue Nov 18 09:37:03 PST 2014


Hi.

Recently, after I had found an update for my BIOS, my desktop started to
resume properly (before I could only suspend it). Kernel and systemd do
their jobs fine. But they seem to have problem cooperating.

For the record I use systemd 215, which means that the issue I describe
here may have been fixed already.

After several suspend/resumes systemctl shows more than three dozens of
rfkill devices even though I've got only one BT and one WLAN.

--8<---------------cut here---------------start------------->8---
systemd-rfkill at rfkill0.service   loaded active exited    Load/Save RF Kill Switch Status of rfkill0
systemd-rfkill at rfkill1.service   loaded active exited    Load/Save RF Kill Switch Status of rfkill1
systemd-rfkill at rfkill2.service  loaded active exited    Load/Save RF Kill Switch Status of rfkill4
systemd-rfkill at rfkill3.service  loaded active exited    Load/Save RF Kill Switch Status of rfkill4

[...]

systemd-rfkill at rfkill37.service loaded active exited    Load/Save RF Kill Switch Status of rfkill37
--8<---------------cut here---------------end--------------->8---

Indeed currently available rfkill devices have rather high numbers.

--8<---------------cut here---------------start------------->8---
total 0
lrwxrwxrwx 1 root root 0 11-18 17:13 rfkill36 -> ../../devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/bluetooth/hci0/rfkill36
lrwxrwxrwx 1 root root 0 11-18 17:13 rfkill37 -> ../../devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3:1.0/ieee80211/phy13/rfkill37
--8<---------------cut here---------------end--------------->8---

State files in /var/lib/systemd/rfkill look a bit odd too.

--8<---------------cut here---------------start------------->8---
total 16
-rw-r--r-- 1 root root 2 11-07 17:36 pci-0000:00:1a.0-usb-0:1:1.0:hci0
-rw-r--r-- 1 root root 2 11-07 17:36 pci-0000:00:1a.7-usb-0:3:1.0:phy0
-rw-r--r-- 1 root root 2 11-02 13:00 pci-0000:00:1a.7-usb-0:3:1.0:phy1
-rw-r--r-- 1 root root 2 09-22 08:17 pci-0000:00:1a.7-usb-0:3:1.0:phy4
--8<---------------cut here---------------end--------------->8---

dmesg shows that upon each resume the wlan phy gets a new number every
resume.

--8<---------------cut here---------------start------------->8---
[221310.762273] ieee80211 phy11: Selected rate control algorithm 'minstrel_ht'
[221310.762451] ieee80211 phy11: hwaddr 00:15:af:64:2f:bf, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
[229361.374331] ieee80211 phy12: Selected rate control algorithm 'minstrel_ht'
[229361.374505] ieee80211 phy12: hwaddr 00:15:af:64:2f:bf, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
[243400.372585] ieee80211 phy13: Selected rate control algorithm 'minstrel_ht'
[243400.372761] ieee80211 phy13: hwaddr 00:15:af:64:2f:bf, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
--8<---------------cut here---------------end--------------->8---

Status of a stale rfkill service looks like this.

--8<---------------cut here---------------start------------->8---
* systemd-rfkill at rfkill9.service - Load/Save RF Kill Switch Status of rfkill9
   Loaded: loaded (/usr/lib64/systemd/system/systemd-rfkill at .service; static)
   Active: active (exited) since nie 2014-11-09 19:31:27 CET; 1 weeks 1 days ago
     Docs: man:systemd-rfkill at .service(8)
  Process: 12818 ExecStart=/usr/lib/systemd/systemd-rfkill load %I (code=exited, status=0/SUCCESS)
 Main PID: 12818 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/system-systemd\x2drfkill.slice/systemd-rfkill at rfkill9.service
--8<---------------cut here---------------end--------------->8---

and stopping it yields the following messages

--8<---------------cut here---------------start------------->8---
* systemd-rfkill at rfkill9.service - Load/Save RF Kill Switch Status of rfkill9
   Loaded: loaded (/usr/lib64/systemd/system/systemd-rfkill at .service; static)
   Active: failed (Result: exit-code) since Tue 2014-11-18 18:24:02 CET; 21s ago
     Docs: man:systemd-rfkill at .service(8)
  Process: 4860 ExecStop=/usr/lib/systemd/systemd-rfkill save %I (code=exited, status=1/FAILURE)
  Process: 12818 ExecStart=/usr/lib/systemd/systemd-rfkill load %I (code=exited, status=0/SUCCESS)
 Main PID: 12818 (code=exited, status=0/SUCCESS)

Nov 18 18:24:02 kotik systemd[1]: Stopping Load/Save RF Kill Switch Status of rfkill9...
Nov 18 18:24:02 kotik systemd[1]: systemd-rfkill at rfkill9.service: control process exited, code=exited status=1
Nov 18 18:24:02 kotik systemd[1]: Stopped Load/Save RF Kill Switch Status of rfkill9.
Nov 18 18:24:02 kotik systemd[1]: Unit systemd-rfkill at rfkill9.service entered failed state.
--8<---------------cut here---------------end--------------->8---

The actual issue as I see it is that systemd does not stop and remove
rfkill services that refer to nonexistent devices.

Kind regards,
-- 
Było mi bardzo miło.                   Twoje oczy lubią mnie
>Łukasz<                                     i to mnie zgubi  (c)SNL

REKLAMA: http://ars-fabrica.eu/ sklep z rękodziełem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141118/a7c5e880/attachment.sig>


More information about the systemd-devel mailing list