[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.2
[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 Thomas Rodgers changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Thomas Rodgers --- I believe this has been fully resolved.
[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 --- Comment #4 from CVS Commits --- The releases/gcc-11 branch has been updated by Thomas Rodgers : https://gcc.gnu.org/g:c24384efbbaeeca3dbc53e7d1226a57bc16e9ad5 commit r11-8638-gc24384efbbaeeca3dbc53e7d1226a57bc16e9ad5 Author: Thomas Rodgers Date: Tue Jun 22 10:59:07 2021 -0700 libstdc++: Fix for deadlock in std::counting_semaphore [PR100806] libstdc++-v3/ChangeLog: PR libstdc++/100806 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release): Force _M_release() to wake all waiting threads. * testsuite/30_threads/semaphore/100806.cc: New test. (cherry picked from commit e02840c1a92abecd211ffaf05b28329bcb534583)
[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 --- Comment #3 from CVS Commits --- The master branch has been updated by Thomas Rodgers : https://gcc.gnu.org/g:e02840c1a92abecd211ffaf05b28329bcb534583 commit r12-1732-ge02840c1a92abecd211ffaf05b28329bcb534583 Author: Thomas Rodgers Date: Tue Jun 22 10:59:07 2021 -0700 libstdc++: Fix for deadlock in std::counting_semaphore [PR100806] libstdc++-v3/ChangeLog: PR libstdc++/100806 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release): Force _M_release() to wake all waiting threads. * testsuite/30_threads/semaphore/100806.cc: New test.
[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 --- Comment #2 from Thomas Rodgers --- I have confirmed that this is new issue, not related to PR100334. When there are waiting threads and the semaphore attempts to release one of the waiting threads, the FUTEX_WAKE syscall's return indicates that 1 thread is woken, as expected, but it is unclear to me why there is no forward progress at that point. I have replaced the algorithm with a simplified version (similar to what is in libc++) and observe the same result. Further investigation is required. I have submitted an interim patch that forces wake all which appears to address the issue.
[Bug libstdc++/100806] deadlock in std::counting_semaphore
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100806 Thomas Rodgers changed: What|Removed |Added Last reconfirmed||2021-05-28 Assignee|unassigned at gcc dot gnu.org |rodgertq at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #1 from Thomas Rodgers --- This is almost certainly a duplicate of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100334 Which is fixed on master with a backport to releases/gcc-11 but was broken in GCC 11.1 Will confirm, thanks!