home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   linux.debian.bugs.dist      Ohh some weird Debian bug report thing      28,835 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 28,607 of 28,835   
   Samuel Thibault to All   
   Bug#1128631: std::condition_variable::wa   
   22 Feb 26 23:50:01   
   
   XPost: linux.debian.ports.hurd   
   From: sthibault@debian.org   
      
   Control: reassign -1 libc0.3   
      
   Samuel Thibault, le dim. 22 févr. 2026 02:50:16 +0100, a ecrit:   
   > Control: severity -1 important   
   >   
   > Hello,   
   >   
   > Mattias Ellert, le dim. 22 févr. 2026 02:14:06 +0100, a ecrit:   
   > > Severity: serious   
   >   
   > Nope, serious bugs are only for release archs   
   >   
   > > int main() {   
   > >   std::condition_variable cv;   
   > >   std::mutex mx;   
   > >   std::unique_lock lk(mx);   
   > >   cv.wait_for(lk, std::chrono::seconds(2));   
   > > }   
   > >   
   > > $ g++ -o wait_for wait_for.cxx   
   > > $ time ./wait_for   
   > >   
   > > real	0m2,002s   
   > > user	0m0,001s   
   > > sys	0m0,001s   
   > >   
   > > However, when compiled on GNU/Hurd (Debian porterbox exodar.debian.net)   
   > > it hangs forever and must be forced to quit with ctrl-C.   
   > >   
   > > ellert@exodar:~$ g++ -o wait_for wait_for.cxx -pthread   
   > > ellert@exodar:~$ ./wait_for   
   >   
   > It looks like gcc is mixing monotonic and realtime clocks. Notably,   
   > /usr/include/i386-gnu/c++/15/bits/c++config.h   
   > shows   
   >   
   > /* Defined if clock_gettime has monotonic clock support. */   
   > /* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */   
   >   
   > /* Defined if clock_gettime has realtime clock support. */   
   > /* #undef _GLIBCXX_USE_CLOCK_REALTIME */   
   >   
   > These should get defined to 1.   
   >   
   > Possibly that's because _POSIX_TIMERS is still defined to 0, I haven't   
   > checked what we could be missing for defining it to 1, contribution   
   > welcome.   
      
   I have looked into the standards, AIUI it used to be missing only   
   monotonic vs realtime, and high-precision, which we both have now, so I   
   have commited setting _POSIX_TIMERS to 200809 now.   
      
   I have pushed to the debian glibc package, gcc will just need to be   
   rebuilt against version 2.42-14.   
      
   Thanks for the investigation and report,   
   Samuel   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca