[systemd-bugs] [Bug 63189] New: systemd gets abort or segv by udev rule with $devpath or %p
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Apr 5 13:52:16 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=63189
Priority: medium
Bug ID: 63189
Assignee: systemd-bugs at lists.freedesktop.org
Summary: systemd gets abort or segv by udev rule with $devpath
or %p
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: muneda.takahiro at jp.fujitsu.com
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: systemd
Desription of Problem:
systemd dies as abort or segv, then a command like reboot does not work.
There are two behaviors of following command.
1. A command returns immediately.
# reboot
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.
#
2. A command does not return forever.
# reboot
<does not return forever>
Versions:
systemd-200-3.fc19.x86_64
kernel-3.9.0-0.rc4.git0.1.fc19.x86_64
How reproducible:
Always
Step to Reproduce:
1. Place a udev rule file which have $devpath or %p
The udev rule I used is following.
localhost% cat /etc/udev/rules.d/muneda.rules
#ACTION=="online|offline", TAG+="systemd",
ENV{SYSTEMD_WANTS}="muneda@$devpath.service"
ACTION=="online|offline", TAG+="systemd",
ENV{SYSTEMD_WANTS}="muneda@%p.service"
Note: ABRT happens with both $devpath and %p, but SEGV happens with
$devpath only so far.
2. Generate a uevent to match the rule
I used a following command.
# echo online > /sys/bus/acpi/uevent
3. systemd gets abort or segv
abort:
Apr 5 15:56:16 localhost systemd[1]: Failed to load device unit: Invalid
argument
Apr 5 15:56:16 localhost systemd[1]: Assertion 'os <
_UNIT_ACTIVE_STATE_MAX' failed at src/core/unit.c:1323, function unit_notify().
Aborting.
Apr 5 15:56:16 localhost systemd[1]: Caught <ABRT>, dumped core as pid
548.
Apr 5 15:56:16 localhost systemd[1]: Freezing execution.
Apr 5 15:56:22 localhost systemd-cgroups-agent[549]: Failed to get D-Bus
connection: Failed to connect to socket /org/freedesktop/systemd1/private:
Connection refused
segv:
Apr 5 15:39:08 localhost systemd[1]: Failed to load device unit: Invalid
argument
Apr 5 15:39:08 localhost kernel: [ 184.640812] systemd[1]: segfault at
7fc4ee0b58e0 ip 00007fc7aa321fa0 sp 00007fff5e3dff58 error 4 in
systemd[7fc7aa296000+f3000]
Apr 5 15:39:08 localhost systemd[1]: Caught <SEGV>, dumped core as pid
633.
Apr 5 15:39:08 localhost systemd[1]: Freezing execution.
Additional Info:
When I tried following command, if returns successfully.
# udevadm test --action=online /bus/acpi
And the result contains following lines.
read rules file: /etc/udev/rules.d/muneda.rules
...
ACTION=online
DEVPATH=/bus/acpi
SUBSYSTEM=subsystem
SYSTEMD_WANTS=muneda@/bus/acpi.service
TAGS=:systemd:
USEC_INITIALIZED=87854780
unload module index
[root at localhost ~]#
So I suppose both reading a udev rule and replacing $devpath or %p work fine.
The problem happens beyond those points.
Thanks,
Takahiro
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130405/2bf523d6/attachment.html>
More information about the systemd-bugs
mailing list