On 6/11/2019 4:52 AM, Corinna Vinschen wrote: > On Jun 7 12:10, Ken Brown wrote: >> While testing some new pipe code, I'm occasionally seeing a timerfd deadlock: >> The main thread is stuck in timerfd_tracker::dtor at timerfd.cc:354, waiting for >> the timerfd thread to close; and the timerfd thread is stuck at timerfd.cc:140, >> waiting to acquire a mutex that's held by timerfd_tracker::dtor. > > Hmm, I had hoped my current code does not have a deadlock situation > anymore, but I was wrong, apparently. > > Is there any chance to create an STC? I haven't been able to create an STC. The deadlock seems to depend on a rare timing fluke, and I've only seen it when running a parallel make on a clean emacs tree, with my new pipe code installed. On the other hand, I think I have a simple fix, which I'll send to cygwin-patches. With this patch, I ran the parallel make 15 times without getting the deadlock. After reverting the patch, I got the deadlock on the 4th run. Ken ТÒÐÐ¥&ö&ÆVÒ&W÷'G3¢‡GG¢òö7–wv–âæ6öÒ÷&ö&ÆV×2æ‡FÖÀФd¢‡GG¢òö7–wv–âæ6öÒöfðФFö7VÖVçFF–ö㢇GG¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R–æfó¢‡GG¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×ÆPРÐ