udev duplicates entries in 70-persistent-net.rules
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | systemd (Debian) |
Fix Released
|
Unknown
|
||
| | systemd (Ubuntu) |
High
|
Unassigned | ||
| | Trusty |
High
|
Unassigned | ||
Bug Description
[SRU justification]
Without this fix, duplicate entries may render the system unbootable
[Impact]
Under certain race condition, the file /etc/udev/
[Fix]
Verify the content of the file prior to re-writing the rule.
[Test Case]
$ rm /etc/udev/
$ typeset -i I=0 && while (( I <= 20));do echo add > /sys/class/
Without the patch, there will be 20 identical entries in the file.
[Regression]
None expected, the modification is already in Vivid, Wily and Debian
[Original description of the problem]
After a fresh installation of 14.04, I had various troubles with the ethernet NIC. Long story short, there were duplicate entries in /etc/udev/
The 70-persistent-
-----
# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=
# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=
# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=
# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=
# this last declaration was generated by udev but overrides prior command with same ATTR{address} value.
# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=
-----
lspci shows only 4 PCI devices.
-----
$ lspci -vn | grep -A 16 -F '14e4:165f'
01:00.0 0200: 14e4:165f
Subsystem: 1028:1f5b
Flags: bus master, fast devsel, latency 0, IRQ 41
Memory at 91b30000 (64-bit, prefetchable) [size=64K]
Memory at 91b40000 (64-bit, prefetchable) [size=64K]
Memory at 91b50000 (64-bit, prefetchable) [size=64K]
Expansion ROM at 91b80000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable+ Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-54-
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Kernel driver in use: tg3
--
01:00.1 0200: 14e4:165f
Subsystem: 1028:1f5b
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at 91b00000 (64-bit, prefetchable) [size=64K]
Memory at 91b10000 (64-bit, prefetchable) [size=64K]
Memory at 91b20000 (64-bit, prefetchable) [size=64K]
Expansion ROM at 91bc0000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable- Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-54-
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Kernel driver in use: tg3
--
02:00.0 0200: 14e4:165f
Subsystem: 1028:1f5b
Flags: bus master, fast devsel, latency 0, IRQ 40
Memory at 91a30000 (64-bit, prefetchable) [size=64K]
Memory at 91a40000 (64-bit, prefetchable) [size=64K]
Memory at 91a50000 (64-bit, prefetchable) [size=64K]
Expansion ROM at 91a80000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable- Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-54-
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Kernel driver in use: tg3
--
02:00.1 0200: 14e4:165f
Subsystem: 1028:1f5b
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at 91a00000 (64-bit, prefetchable) [size=64K]
Memory at 91a10000 (64-bit, prefetchable) [size=64K]
Memory at 91a20000 (64-bit, prefetchable) [size=64K]
Expansion ROM at 91ac0000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable- Count=17 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-54-
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Kernel driver in use: tg3
-----
Description: Ubuntu 14.04.2 LTS
Release: 14.04
| affects: | biosdevname (Ubuntu) → udev (Ubuntu) |
| Martin Pitt (pitti) wrote : | #3 |
This got fixed in 219-6, and thus in 15.04.
| affects: | udev (Ubuntu) → systemd (Ubuntu) |
| Changed in systemd (Ubuntu): | |
| status: | New → Fix Released |
| Changed in systemd (Debian): | |
| status: | Unknown → Fix Released |
| Changed in systemd (Ubuntu Trusty): | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| assignee: | nobody → Louis Bouchard (louis-bouchard) |
| Changed in systemd (Ubuntu Trusty): | |
| status: | Confirmed → In Progress |
| Louis Bouchard (louis) wrote : | #4 |
| description: | updated |
| Martin Pitt (pitti) wrote : | #5 |
Uploaded to SRU review queue.
Hello James, or anyone else affected,
Accepted systemd into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in systemd (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| tags: |
added: verification-done removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package systemd - 204-5ubuntu20.15
---------------
systemd (204-5ubuntu20.15) trusty; urgency=medium
* Avoid writing duplicate entries in 70-persistent-
checking if the new udev rule has already been written for the given
interface. This happens if multiple add events are generated before
the write_net_rules script returns and udevd renames the interface.
* write_net_rules: Escape '{' and '}' characters as well, to make this work
with busybox grep. (LP: #1470399)
-- Louis Bouchard <email address hidden> Mon, 05 Oct 2015 12:34:41 +0200
| Changed in systemd (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Chris J Arges (arges) wrote : Update Released | #8 |
The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
> Hello James, or anyone else affected,
> ...
> Please help us by testing this new package
I'm sorry, but the machine on which this occurred cannot be modified for this testing. And I don't have access to a machine with a similar NIC.
Thanks for fixing this. Sorry I can't help re-test this.
| Changed in systemd (Ubuntu): | |
| importance: | Undecided → High |
| Changed in systemd (Ubuntu Trusty): | |
| assignee: | Louis Bouchard (louis-bouchard) → nobody |


To clarify ahead of time, this bug is similar but not the same as https:/ /bugs.launchpad .net/ubuntu/ +source/ biosdevname/ +bug/1284043
This does appear to a form of this forum post observation http:// www.linuxquesti ons.org/ questions/ linux-networkin g-3/etc- udev-rules- d-70-persistent -net-rules- and-%27ip- link%27- rename- 946670/