Fork issue with timerfd

Ken Brown kbrown@cornell.edu
Tue Feb 26 03:12:00 GMT 2019


On 2/25/2019 3:20 PM, Corinna Vinschen wrote:
> On Feb 25 11:03, Corinna Vinschen wrote:
>> On Feb 25 03:21, Ken Brown wrote:
>>> On 2/24/2019 9:23 PM, Ken Brown wrote:
>>>> On 2/24/2019 2:52 PM, Corinna Vinschen wrote:
>>>>> On Feb 24 20:09, Corinna Vinschen wrote:
>>>>>> On Feb 24 19:55, Corinna Vinschen wrote:
>>>>>>> On Feb 24 17:27, Ken Brown wrote:
>>>>>>>> I'm seeing sporadic errors like this on 64-bit Cygwin when I first start emacs:
>>>>>>>>
>>>>>>>>           0 [main] emacs-X11 864 C:\cygwin64\bin\emacs-X11.exe: *** fatal error in
>>>>>>>> forked process - Can't recreate shared timerfd section during fork!
>>>>>>>>           0 [main] emacs 860 dofork: child 864 - died waiting for dll loading, errno 11
>>>>>>>>
>>>>>>>> If I exit and restart, everything will be fine almost every time.
>>>>>>>
>>>>>>> I think I see where the thinko was here.  Can you try this?
>>>>>>
>>>>>> No, better try this:
>>>>>> [...]
>>>>>
>>>>> Even if this doesn't fully fix your problem, the patch itself is
>>>>> certainly better than the former code, so I pushed it.  I also
>>>>> uploaded new developer snapshots to https://cygwin.com/snapshots/
>>>>> for testing.
>>>>
>>>> It's better, but not completely fixed.  At the moment I'm testing 32-bit only,
>>>> since that was the only arch on which I could produce the problem reliably.
>>>> Previously I got the error every time I ran emacs.  I just tried 5 times with
>>>> the new snapshot and only got the error twice.
>>>
>>> I withdraw that statement.  After further tries, it's back to happening every time.
>>>
>>>> I'll work on this some more tomorrow and see if I can modify the emacs code so
>>>> that it gives me the full error message from Cygwin.
>>
>> I had a late night inspiration, telling me that my timerfd
>> implementation has a design flaw in terms of fork/exec timer
>> sharing.  I guess I should fix that first.  Just ignore the
>> timerfd stuff for a bit, I'm working on that.
> 
> I pushed a patch and uploaded new developer snapshots to
> https://cygwin.com/snapshots/
> 
> Please try.

The x86 fork problem seems to be fixed.  I started emacs several times and 
listed directories without any failure.

I did get the following, however, during one of the trials (while emacs was idle):

1 [main] emacs 246 C:\Users\kbrown\src\emacs\i686-emacs26\src\emacs.exe: *** 
fatal error - CreateThread failed for pipesel - 0x0<0x0>, Win32 error 8

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РÐ


More information about the Cygwin mailing list