[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
This bug was fixed in the package glibc - 2.27-3ubuntu1.3 --- glibc (2.27-3ubuntu1.3) bionic; urgency=medium [ Balint Reczey ] * debian/gbp.conf: Add initial configuration * debian/control.in/main: Add Vcs-* pointing to Ubuntu packaging repository * arm64: Enable searching shared libraries in atomics/ on LSE HW * Ship arm64 variant with LSE support in libc6-lse (LP: #1885012) * Run tests of libc6-lse on HW supporting LSE * debian/patches/git-updates.diff: update from upstream stable branch - pthread_cond_broadcast: Fix waiters-after-spinning case - Fix SSe2-based memmove corrupting memory (CVE-2017-18269) - Fix strstr() performance regression on Haswell processors - Support Japanese new era "令和 (Reiwa)" - io: Remove copy_file_range emulation (LP: #1851263, #1858203, #1838327, #1797335, #1756209, #1853193) * XFAIL stdlib/tst-getrandom (LP: #1891403) * debian/testsuite-xfail-debian.mk: XFAIL new tst-support_descriptors [ Thadeu Lima de Souza Cascardo ] * tests: Make preadwritev2 invalid flags tests unsupported (LP: #1770480) [ Andreas Hasenack ] * branch-pthread_rwlock_trywrlock-hang-23844.patch: nptl: Fix pthread_rwlock_try*lock stalls (Bug 23844) (LP: #1864864) -- Balint Reczey Wed, 02 Sep 2020 11:18:37 +0200 ** Changed in: glibc (Ubuntu Bionic) Status: Fix Committed => Fix Released ** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2017-18269 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Bionic verification First, reproducing the bug with the current glibc: ubuntu@bionic-glibc-1864864:~$ apt-cache policy libc6 libc6: Installed: 2.27-3ubuntu1.2 Candidate: 2.27-3ubuntu1.2 Version table: *** 2.27-3ubuntu1.2 500 500 http://br.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages 500 http://br.archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages 100 /var/lib/dpkg/status It hung immediately: ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr (stuck) Second run worked, third run got stuck again: ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr (stuck) With updated glibc: ubuntu@bionic-glibc-1864864:~$ apt-cache policy libc6 libc6: Installed: 2.27-3ubuntu1.3 Candidate: 2.27-3ubuntu1.3 Version table: *** 2.27-3ubuntu1.3 500 500 http://br.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages 100 /var/lib/dpkg/status Sample program doesn't hang anymore, after multiple tries, and no need to rebuild it: ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 ubuntu@bionic-glibc-1864864:~$ ./bug23844wr trylock_wr 50 bionic verification succeeded ** Tags removed: verification-needed-bionic ** Tags added: verification-done-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Description changed: [Impact] * pthread_rwlock_trywrlock and pthread_rwlock_tryrdlock before glibc 2.30 could hang: https://sourceware.org/bugzilla/show_bug.cgi?id=23844#c14 * We are especially able to reproduce the problem with BIND 9.16.x when --with-pthread-rwlock configure option enabled * But the impact is not limited to BIND 9.16, but any multithreaded application using phtread rwlocks [Test Case] * Fetch the source program and build it: + $ sudo apt install build-essential -y $ wget https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+attachment/5333068/+files/bug23844.wr.c $ gcc bug23844.wr.c -lpthread -o bug23844wr * Run the resulting binary a few times. On affected systems, it should hang in less then 10 attempts. $ ./bug23844rw trylock_wr 50 (...) $ ./bug23844.wr trylock_wr [Regression Potential] - * The upstream fix has been in glibc 2.30 and later - * Debian has the fix in 2.28-8 as part of "git-updates.diff" from February 2019 + * The upstream fix has been in glibc 2.30 and later + * Debian has the fix in 2.28-8 as part of "git-updates.diff" from February 2019 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Hello Ondřej, or anyone else affected, Accepted glibc into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.27-3ubuntu1.3 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed- bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed-bionic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: glibc (Ubuntu Bionic) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
I'm preparing the SRU in https://launchpad.net/~ci-train-ppa- service/+archive/ubuntu/4242/+packages with the fix in. ** Changed in: glibc (Ubuntu Bionic) Status: Triaged => In Progress ** Changed in: glibc (Ubuntu Bionic) Assignee: (unassigned) => Balint Reczey (rbalint) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Yes your ppa and an affected bind package build no longer hang. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Can someone who is affected by this bug, and able to reproduce it in a test/controlled environment, please try the glibc packages from my PPA? Note you will have to restart services after the update (or better yet, reboot if you can): https://launchpad.net/~ahasenack/+archive/ubuntu/glibc-pthread- lock-1864864 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
@nish pointed out in the MP that I had the incorrect packaging version for an SRU. Since the correct version is lower than what I uploaded before, I created a new ppa: https://launchpad.net/~ahasenack/+archive/ubuntu/glibc-pthread- lock-1864864 Packages are still building there, but other than the version, they are the same. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Changed in: glibc (Debian) Status: Unknown => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Also affects: glibc (Ubuntu Bionic) Importance: Undecided Status: New ** Changed in: glibc (Ubuntu Bionic) Status: New => Triaged ** Changed in: glibc (Ubuntu) Status: Triaged => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/glibc/+git/glibc/+merge/380381 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Changed in: glibc (Ubuntu) Status: New => Triaged ** Changed in: glibc (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Git branch: https://code.launchpad.net/~ahasenack/ubuntu/+source/glibc/+git/glibc/+ref /bionic-glibc-thread-lock-23844 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
I created a ppa with the fix for bionic: https://launchpad.net/~ahasenack/+archive/ubuntu/glibc-pthread- lock-23844/ After updating to that package, the test case program no longer hangs (counted 75 runs, whereas before it would hang in at most 5). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
** Description changed: [Impact] * pthread_rwlock_trywrlock and pthread_rwlock_tryrdlock before glibc 2.30 could hang: https://sourceware.org/bugzilla/show_bug.cgi?id=23844#c14 * We are especially able to reproduce the problem with BIND 9.16.x when --with-pthread-rwlock configure option enabled * But the impact is not limited to BIND 9.16, but any multithreaded application using phtread rwlocks [Test Case] * Fetch the source program and build it: $ wget https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+attachment/5333068/+files/bug23844.wr.c $ gcc bug23844.wr.c -lpthread -o bug23844wr * Run the resulting binary a few times. On affected systems, it should hang in less then 10 attempts. $ ./bug23844rw trylock_wr 50 (...) - $ ./bug23844.wr + $ ./bug23844.wr trylock_wr [Regression Potential] - * I don't believe there's a chance for regressions here + * The upstream fix has been in glibc 2.30 and later + * Debian has the fix in 2.28-8 as part of "git-updates.diff" from February 2019 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Test case. Build with: gcc bug23844.wr.c -lpthread -o bug23844wr ** Attachment added: "bug23844.wr.c" https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+attachment/5333068/+files/bug23844.wr.c ** Description changed: [Impact] - * pthread_rwlock_trywrlock and pthread_rwlock_tryrdlock before glibc + * pthread_rwlock_trywrlock and pthread_rwlock_tryrdlock before glibc 2.30 could hang: https://sourceware.org/bugzilla/show_bug.cgi?id=23844#c14 - * We are especially able to reproduce the problem with BIND 9.16.x when + * We are especially able to reproduce the problem with BIND 9.16.x when --with-pthread-rwlock configure option enabled - * But the impact is not limited to BIND 9.16, but any multithreaded + * But the impact is not limited to BIND 9.16, but any multithreaded application using phtread rwlocks [Test Case] - * There's three test cases included in the upstream bugzilla + * Fetch the source program and build it: + $ wget https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+attachment/5333068/+files/bug23844.wr.c + $ gcc bug23844.wr.c -lpthread -o bug23844wr + + * Run the resulting binary a few times. On affected systems, it should + hang in less then 10 attempts. + + $ ./bug23844rw + trylock_wr + 50 + + (...) + + $ ./bug23844.wr + trylock_wr + [Regression Potential] - * I don't believe there's a chance for regressions here + * I don't believe there's a chance for regressions here -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
JFTR Debian 2.28-8 has already the fix applied. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
According to upstream, the issue first appeared in 2.26, so only bionic is affected. ** Bug watch added: Debian Bug tracker #952609 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952609 ** Also affects: glibc (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952609 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
JFTR RHEL 8 and FC30 has already pulled the fix into their glibc, so it's really only Ubuntu and Debian affected by this. ** Package changed: ubuntu => glibc (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1864864] Re: [SRU] pthread_rwlock_trywrlock results in hang
Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode. To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1864864/+editstatus and add the package name in the text box next to the word Package. [This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.] ** Tags added: bot-comment -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1864864 Title: [SRU] pthread_rwlock_trywrlock results in hang To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1864864/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs