** Description changed: + [SRU justification] + Without this fix, duplicate entries may render the system unbootable + + [Impact] + Under certain race condition, the file /etc/udev/rules.d/70-persistent-net.rules may contain duplicate entries. + + [Fix] + Verify the content of the file prior to re-writing the rule. + + [Test Case] + $ rm /etc/udev/rules.d/70-persistent-net.rules + $ typeset -i I=0 && while (( I <= 20));do echo add > /sys/class/net/eth0/uevent ;((I+=1));done + + 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/rules.d/70-persistent-net.rules . The 70-persistent-net.rules file has 5 entries for a 4 port NIC (Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe). ----- - # PCI device 0x14e4:0x165f (tg3) - SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:69", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" + # PCI device 0x14e4:0x165f (tg3) + SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:69", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" - # PCI device 0x14e4:0x165f (tg3) - SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:6b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3" + # PCI device 0x14e4:0x165f (tg3) + SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:6b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3" - # PCI device 0x14e4:0x165f (tg3) - SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" + # PCI device 0x14e4:0x165f (tg3) + SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" - # PCI device 0x14e4:0x165f (tg3) - SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:6a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2" + # PCI device 0x14e4:0x165f (tg3) + SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:6a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2" - # this last declaration was generated by udev but overrides prior command with same ATTR{address} value. - # PCI device 0x14e4:0x165f (tg3) - SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4" - + # this last declaration was generated by udev but overrides prior command with same ATTR{address} value. + # PCI device 0x14e4:0x165f (tg3) + SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="54:9f:35:09:8f:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4" ----- 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-9f-35-09-8f-68 - 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-9f-35-09-8f-69 - 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-9f-35-09-8f-6a - 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-9f-35-09-8f-6b - Capabilities: [150] Power Budgeting <?> - Capabilities: [160] Virtual Channel - Kernel driver in use: tg3 - + 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-9f-35-09-8f-68 + 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-9f-35-09-8f-69 + 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-9f-35-09-8f-6a + 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-9f-35-09-8f-6b + Capabilities: [150] Power Budgeting <?> + Capabilities: [160] Virtual Channel + Kernel driver in use: tg3 ----- Description: Ubuntu 14.04.2 LTS Release: 14.04
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1470399 Title: udev duplicates entries in 70-persistent-net.rules To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1470399/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs