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,475 of 28,835   
   Mattias Ellert to All   
   Bug#1128631: std::condition_variable::wa   
   22 Feb 26 02:20:01   
   
   XPost: linux.debian.ports.hurd   
   From: mattias.ellert@physics.uu.se   
      
   --=-AK5Jx0T6LjOAU/zBjmba   
   Content-Type: text/plain; charset="UTF-8"   
   Content-Transfer-Encoding: quoted-printable   
      
   Package: src:gcc-15   
   Version: 15.2.0-13   
   Severity: serious   
   User: debian-hurd@lists.debian.org   
   Usertags: hurd-i386   
   X-Debbugs-CC: debian-hurd@lists.debian.org    
      
   When the following code is compiled on Linux, it behaves as expected   
   and returns after 2 seconds.   
      
   #include    
   #include    
      
   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    
   ^C   
      
   Replacing   
     cv.wait_for(lk, std::chrono::seconds(2));   
   with   
     cv.wait_until(lk, std::chrono::steady_clock::now() + std::chro   
   o::seconds(2));   
      
   Gives the same result -- which is expected since these should be   
   equivalent according to the standard.   
      
   If   the system clock is used instead of the steady clock it works also   
   on GNU/Hurd:   
     cv.wait_until(lk, std::chrono::system_clock::now() + std::chro   
   o::seconds(2));   
      
   But this is not the proper fix for the problem.   
      
   This behaviour causes test failures during package builds on GNU/Hurd.   
      
   Mattias Ellert   
      
   --=-AK5Jx0T6LjOAU/zBjmba   
   Content-Disposition: attachment; filename="wait_for.cxx"   
   Content-Type: text/x-c++src; name="wait_for.cxx"; charset="UTF-8"   
   Content-Transfer-Encoding: base64   
   [SoupGate killed MIME-encoded file wait_for.cxx (364 bytes)]   
      
      
      
   --=-AK5Jx0T6LjOAU/zBjmba--   
      
   -----BEGIN PGP SIGNATURE-----   
      
   iQIzBAABCgAdFiEE6hgwr99NQxrZ4RRS6K7C/zvhqUsFAmmaWF4ACgkQ6K7C/zvh   
   qUtk4xAAjX1stNNES5v/a2mDZUyyKRCvfTxY8evbDS4P0Lo37b3Ex8udauxNaWzy   
   aCbz/KrDZjzmO68NrwZMJTUEHNkVNA/HY4Tpz4PXF2bO39FsuB9g12f9Ee1PFnhj   
   7t6glVFV5dmSK+CSo0Ov+zAHeDcbTRIsgCOJUhxQp/9Ndoipr81enT8ccybMHONT   
   my2Zk5S4hT/krDx+c4hMH2+XhbsVB8jXcKh58sPErwQTXYw6kJBb3SFEXwM2XgfV   
   0muDJG2BJ5YeV3XsS9fZoT3aPjTKd83a5GqbmDkBLSxE1H4Ipd2YJemD/Zm7wNAd   
   NfI1ryw07uQSUhK+/tK/xGdfbrp/qAvYonarTrjt374f3/q0EtStYtLLdVJ3KsP4   
   AlmkSM0ttBYF1LkdhPH4qh9TMzlIYciIn1WzFG6wFhAOMoc+V/zqBoDbWex33nTU   
   EDf/EEymbPbCT68VQE9gY5WytwU2SF2JAUK21KuluWU3gdg7CQqagAGMqx9I18dp   
   YXbHMQc2n9nWSdwXACz6RFCz1WoycBDq8/LRO4vWX6yZJekiuRQCs0jaDtTks9y2   
   USzxbCKz6/caKKVTJqlnb/3o5C7kpQKLZS/nyuadeFULdp6anK+owhEdzb6p2noe   
   XSawb1Id9jd4jqq966mC2KHi3cfV+AeouiXjDsM1we1y0S6aS8U=   
   =iOXZ   
   -----END PGP SIGNATURE-----   
      
   --- 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