Bug 1338823 - certain udev properties getting bad data (the data starts with a '\n' among other things)
Summary: certain udev properties getting bad data (the data starts with a '\n' among o...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-23 13:34 UTC by mulhern
Modified: 2016-12-20 20:39 UTC (History)
9 users (show)

Fixed In Version: systemd-229-8.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 20:39:16 UTC


Attachments (Terms of Use)

Description mulhern 2016-05-23 13:34:19 UTC
Description of problem:

In some cases, the output of udevadm info --export-db has an unexpected format.

Version-Release number of selected component (if applicable):

[mulhern@dhcp-25-209 ~]$ udevadm --version
222

How reproducible:

Always, on my machine.

Steps to Reproduce:
1. Update to f23 (this was not happening on f22).
2. Run udevadm info --export-db.
3. Expect that all entries will begin with an identifying letter followed by
a colon, e.g., "E: MODALIAS=usb:v0458p0137d0100dc00dsc00dp00ic03isc01ip02in00
".
4. Notice that some entries do not have this format, e.g., "MODALIAS=hid:b0003g0001v00000458p00000137".
5. Notice that there seems to be something wrong with the preceding entry in this case, e.g.,

"""
E: HID_UNIQ=
MODALIAS=hid:b0003g0001v00000458p00000137
"""

Actual results:

Funky formatting for some entries in output of udevadm info --export-db.

Expected results:

No funky formatting.

Additional info:

Occurs with particular devices:

E: HID_UNIQ=
MODALIAS=hid:b0003g0001v00000458p00000137

E: MEI_CL_NAME=
MODALIAS=mei::12f80028-b4b7-4b2d-aca8-46e0ff65814c:01:

but not w/ any others that I have observed on my machine.

Looks like the problem originates in the database entry as libudev, via pyudev, think that the value of HID_UNIQ is
"u'\nMODALIAS=hid:b0003g0001v00000458p00000137'", which has to be wrong.

So, that's where to fix it.

"""
[mulhern@dhcp-25-209 pyudev]$ udevadm info /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:0458:0137.0001
P: /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:0458:0137.0001
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/0003:0458:0137.0001
E: DRIVER=hid-generic
E: HID_ID=0003:00000458:00000137
E: HID_NAME=PixArt USB Optical Mouse
E: HID_PHYS=usb-0000:00:14.0-4/input0
E: HID_UNIQ=
MODALIAS=hid:b0003g0001v00000458p00000137
E: SUBSYSTEM=hid
"""

Comment 1 mulhern 2016-05-23 14:46:33 UTC
Odd fact:

libudev (pyudev) doesn't seem to be able to obtain a value for MODALIAS (makes sense, pudev directly calls the udev get_property method) , but udevadm sort of can:

[mulhern@dhcp-25-209 udev]$ udevadm info --root --path /sys/devices/pci0000:00/0000:00:16.0/mei::12f80028-b4b7-4b2d-aca8-46e0ff65814c:01 --query property
DEVPATH=/devices/pci0000:00/0000:00:16.0/mei::12f80028-b4b7-4b2d-aca8-46e0ff65814c:01
MEI_CL_NAME=
MODALIAS=mei::12f80028-b4b7-4b2d-aca8-46e0ff65814c:01:
MEI_CL_UUID=12f80028-b4b7-4b2d-aca8-46e0ff65814c
MEI_CL_VERSION=1
SUBSYSTEM=mei

Also, and I'm not sure if this is correct or not, sometimes MODALIAS looks surprising:

P: /devices/system/cpu/cpu7
E: DEVPATH=/devices/system/cpu/cpu7
E: DRIVER=processor
E: MODALIAS=cpu:type:x86,ven0000fam0006mod003A:feature:,0000,0001,0002,0003,0004
,0005,0006,0007,0008,0009,000B,000C,000D,000E,000F,0010,0011,0013,0015,0016,0017
,0018,0019,001A,001B,001C,001D,001F,002B,0034,003B,003D,0068,006B,006C,006D,006F
,0070,0072,0074,0075,0076,0078,007C,007D,0080,0081,0082,0083,0084,0085,0086,0087
,0088,0089,008D,008E,008F,0091,0093,0094,0095,0097,0098,0099,009A,009B,009C,009D
,009E,00C0,00E0,00E1,00E3,00E5,00E6,00E7,0100,0101,0102,0103,0104,0120,0127,0129
,0140
E: SUBSYSTEM=cpu

Comment 2 Zbigniew Jędrzejewski-Szmek 2016-05-23 14:48:00 UTC
It's some sort of db corruption, I'm looking into it:

#0  device_add_property_aux (device=0x555555688be0, _key=0x55555568c123 "HID_UNIQ", _value=0x55555568c12c "\nMODALIAS=hid:b0003g0001v00000C76p00001607", db=false) at src/libsystemd/sd-device/sd-device.c:102
#1  0x00005555555e6ed9 in device_add_property_internal (device=0x555555688be0, key=0x55555568c123 "HID_UNIQ", value=0x55555568c12c "\nMODALIAS=hid:b0003g0001v00000C76p00001607") at src/libsystemd/sd-device/sd-device.c:149

Comment 3 Tom Gundersen 2016-05-23 22:07:15 UTC
Thanks for the report. This fixes it for me: https://github.com/systemd/systemd/pull/3330

Comment 4 Fedora Update System 2016-05-30 05:37:59 UTC
systemd-229-8.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5f8a34340d

Comment 5 Fedora Update System 2016-05-31 03:54:12 UTC
systemd-229-8.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5f8a34340d

Comment 6 Fedora Update System 2016-06-01 19:53:58 UTC
systemd-229-8.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Zbigniew Jędrzejewski-Szmek 2016-06-03 04:04:35 UTC
Reopening for F23.

Comment 8 Fedora End Of Life 2016-11-25 09:06:53 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 mulhern 2016-11-25 14:16:30 UTC
This seems to be fixed in F24.

Comment 10 Fedora End Of Life 2016-12-20 20:39:16 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.