I downgraded libnl3 to 3.2.21-1 and network-manager to 0.9.8.8-0ubuntu7.1 in order to test the upgrade procedure.
When I hold network-manager, libnl3 doesn't get installed. $ sudo apt-mark hold network-manager network-manager set on hold. $ sudo apt install libnl-3-200 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help resolve the situation: The following packages have unmet dependencies: libnl-3-200 : Breaks: network-manager (< 0.9.8.8-0ubuntu7.3~) but 0.9.8.8-0ubuntu7.1 is to be installed E: Unable to correct problems, you have held broken packages. Without the hold, libnl3 properly brings in the new version of network- manager. $ sudo apt-mark unhold network-manager Canceled hold on network-manager. $ sudo apt install libnl-3-200 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libnl-genl-3-200 libnl-route-3-200 network-manager Recommended packages: modemmanager The following packages will be upgraded: libnl-3-200 libnl-genl-3-200 libnl-route-3-200 network-manager 4 upgraded, 0 newly installed, 0 to remove and 24 not upgraded. Need to get 10.2 kB/652 kB of archives. After this operation, 4,096 B of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://ca.archive.ubuntu.com/ubuntu/ trusty-proposed/main libnl-genl-3-200 amd64 3.2.21-1ubuntu3 [10.2 kB] Fetched 10.2 kB in 0s (31.1 kB/s) (Reading database ... 170772 files and directories currently installed.) Preparing to unpack .../libnl-genl-3-200_3.2.21-1ubuntu3_amd64.deb ... Unpacking libnl-genl-3-200:amd64 (3.2.21-1ubuntu3) over (3.2.21-1) ... Preparing to unpack .../libnl-route-3-200_3.2.21-1ubuntu3_amd64.deb ... Unpacking libnl-route-3-200:amd64 (3.2.21-1ubuntu3) over (3.2.21-1) ... Preparing to unpack .../network-manager_0.9.8.8-0ubuntu7.3_amd64.deb ... Unpacking network-manager (0.9.8.8-0ubuntu7.3) over (0.9.8.8-0ubuntu7.1) ... Preparing to unpack .../libnl-3-200_3.2.21-1ubuntu3_amd64.deb ... Unpacking libnl-3-200:amd64 (3.2.21-1ubuntu3) over (3.2.21-1) ... Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up libnl-3-200:amd64 (3.2.21-1ubuntu3) ... Setting up libnl-genl-3-200:amd64 (3.2.21-1ubuntu3) ... Setting up libnl-route-3-200:amd64 (3.2.21-1ubuntu3) ... Setting up network-manager (0.9.8.8-0ubuntu7.3) ... Processing triggers for libc-bin (2.19-0ubuntu6.9) ... ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libnl3 in Ubuntu. https://bugs.launchpad.net/bugs/1511735 Title: libnl: fail to bind() netlink sockets Status in libnl3 package in Ubuntu: Fix Released Status in libnl3 source package in Trusty: Fix Committed Status in libnl3 package in Debian: Fix Released Bug description: [Triage Notes] The proposed fix for this bug in libnl3 caused a regression in trusty- proposed, tracked in bug 1539634. The regression is caused by a latent bug in Network Manager. We expect to fix this by landing a fix for the bug in Network Manager in trusty-updates at the same time as this fix. [Impact] * Applications in Trusty using libnl-3-200 which frequently open and close netlink sockets can easily fail when attempting to bind the local socket. The problem happens when libnl choose a port id already used by another application and subsequently libnl fails instead of trying another port id. The original bug was discovered when attempting to start a virtual machine under libvirt, which is a user of this library. * Backporting fixes from upstream release fixes a real bug in the current version of the library in Trusty. The alternative is for all applications to manually manage their local port allocation, or as upstream has accepted allowing libnl to attempt to try for other local ports. * All patches applied are already accepted upstream and newer Ubuntu releases are not affected. [Test Case] * On a Trusty 14.04 system 1. sudo apt-get install libnl-3-200 libnl-3-dev libnl-3-dev \ libnl-genl-3-dev libnl-route-3-200 \ make gcc build-essential libnl1 2. download and unpack attachment: lp_1511735_test.tar 3. Run testcases: % if ./example.sh; then echo "libnl OK"; else echo "libnl FAILED"; fi gcc -o example -I/usr/include/libnl3 example.c -lnl-3 -lnl-genl-3 set manually the local port to 6975 (pid: 6974) local port has been set by the libnl to 6975 (pid: 6975) ERROR: genl_connect(): Object exists (local port: 6975, pid: 6975) libnl FAILED % python libnl3-test-rh1249158.py a b c d ulimit(NOFILE) = (2048, 4096) Test: PID=6978 TEST (a)... Traceback (most recent call last): File "libnl3-test-rh1249158.py", line 226, in <module> locals()["TEST_" + arg]() File "libnl3-test-rh1249158.py", line 140, in TEST_a sk = nl_get_socket() File "libnl3-test-rh1249158.py", line 115, in nl_get_socket raise IOError(-err, _nl_geterror()) OSError: [Errno 6] b'Unspecific failure' 4. After applying the updated packages: % if ./example.sh; then echo "libnl OK"; else echo "libnl FAILED"; fi gcc -o example -I/usr/include/libnl3 example.c -lnl-3 -lnl-genl-3 set manually the local port to 11295 (pid: 11294) local port has been set by the libnl to 2894081055 (pid: 11295) libnl OK % python libnl3-test-rh1249158.py a b c d ulimit(NOFILE) = (2048, 4096) Test: PID=11296 TEST (a)... ...done TEST (b)... ...done TEST (c)... ...done TEST (d)... ...done [Regression Potential] * There are quite a few high profile packages that depend on this package, notably libvirt and network-manager. The complete list is here: # on Trusty % apt-rdepends -r libnl-3-200 | head -n 33 libnl-3-200 Reverse Depends: batctl (>= 2013.4.0-2) Reverse Depends: bmon (>= 1:3.1-1) Reverse Depends: crda (>= 1.1.2-1ubuntu2) Reverse Depends: hostapd (>= 1:2.1-0ubuntu1) Reverse Depends: ipvsadm (>= 1:1.26-2ubuntu1) Reverse Depends: iw (>= 3.4-1) Reverse Depends: keepalived (>= 1:1.2.7-1ubuntu1) Reverse Depends: kismet (>= 2013.03.R1b-3) Reverse Depends: knemo (>= 0.7.6-2) Reverse Depends: libfsobasics3 (>= 0.12.0-4) Reverse Depends: libnetcf1 (>= 1:0.2.3-4ubuntu1) Reverse Depends: libnl-3-200-dbg (= 3.2.21-1) Reverse Depends: libnl-3-dev (= 3.2.21-1) Reverse Depends: libnl-cli-3-200 (= 3.2.21-1) Reverse Depends: libnl-genl-3-200 (= 3.2.21-1) Reverse Depends: libnl-nf-3-200 (= 3.2.21-1) Reverse Depends: libnl-route-3-200 (= 3.2.21-1) Reverse Depends: libnl-utils (>= 3.2.21-1) Reverse Depends: libnss-gw-name (>= 0.3-2) Reverse Depends: libvirt-bin (>= 1.2.2-0ubuntu13) Reverse Depends: libvirt0 (>= 1.2.2-0ubuntu13) Reverse Depends: lowpan-test-tools (>= 0.3-1) Reverse Depends: lowpan-tools (>= 0.3-1) Reverse Depends: neard (>= 0.11-1) Reverse Depends: neard-tools (>= 0.11-1) Reverse Depends: network-manager (>= 0.9.8.8-0ubuntu7) Reverse Depends: ntrack-module-libnl-0 (>= 016-1.2ubuntu2) Reverse Depends: plainbox-provider-resource-generic (>= 0.3-1) Reverse Depends: powertop (>= 2.5-1ubuntu1) Reverse Depends: quota (>= 4.01-3) Reverse Depends: sssd-common (>= 1.11.5-1ubuntu3) Reverse Depends: wpasupplicant (>= 2.1-0ubuntu1) * This patch does change the default behavoir when asking libnl-3-200 to generate local ports. Applications (or libraries) may already have retry code in-place and it's not clear if those applications would break. [Original Description] The following upstream patches are needed in order to avoid failures when binding a netlink socket: 1f734a8f892a lib/socket: randomize the generated local port http://git.infradead.org/users/tgr/libnl.git/commitdiff/1f734a8f892a 4dd5fdd0af2c lib/socket: retry generate local port in nl_connect on ADDRINUSE http://git.infradead.org/users/tgr/libnl.git/commitdiff/4dd5fdd0af2c 027157898708 lib/socket: don't fail if no more local ports can be assigned in nl_socket_alloc http://git.infradead.org/users/tgr/libnl.git/commitdiff/027157898708 0fd510b3673f lib/socket: use proper typed constant UINT32_MAX for uint32_t typed port http://git.infradead.org/users/tgr/libnl.git/commitdiff/0fd510b3673f Without these patches, an application which opens and closes regularly netlink sockets can easily fails to bind them. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libnl3/+bug/1511735/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp