Title Fatal I/O Error 11 (includes fix)
Type defect Module core code 21.4
Severity crash Platform x86, unix
Keywords Nosy List stephen
These controls should only be changed by committers and tracker administrators.
Status assigned   Reason
Priority normal   Assigned To

Created on 2008-12-06.11:47:38 by anonymous, last changed 2009-09-25.02:25:57 by stephen.

File name Uploaded Type Edit Remove
callproc.c.diff anonymous, 2008-12-06.11:47:38 application/octet-stream
msg894 [hidden] ([hidden]) Date: 2008-12-06.12:19:51
This may be a duplicate of Issue437.  I've seen this problem
when invoking ediff (which uses call-process).

msg893 [hidden] ([hidden]) Date: 2008-12-06.11:47:38
I've started using a minor mode which ends up invoking
call-process a lot and at about the same time I started seeing
xemacs (21.4.21) crash with errors like the following: 
    xemacs: Fatal I/O Error 11 (Resource temporarily
unavailable) on display connection ":0.0" 
      after 2531260 requests (2531257 known processed) with 0
events remaining. 
      Autosaving and exiting... 
    Program exited with code 0106. 

These errors are intermittent and difficult to trigger reliably.

After staring at this for a while time, I happened to notice
that begin_dont_check_for_quit is called in the child process
after forking in unix_create_process, but not in the
corresponding part of Fold_call_process_internal.  A bit of
poking around with the debugger shows that check_quit can also
be called from this context: 
#0  check_quit () at
#1  0x000000000048a261 in unbind_to_hairy (count=19) 
    at /scratch/phelps/devel/xemacs-21.4.21/src/eval.c:4973 
#2  0x000000000048a1fb in unbind_to (count=19,
    at /scratch/phelps/devel/xemacs-21.4.21/src/eval.c:4959 
#3  0x0000000000450cf9 in dfc_convert_to_external_format ( 
    source_type=DFC_TYPE_LISP_STRING, source=0x7fff9f9195c0,  
    coding_system=140387800737424, sink_type=DFC_TYPE_DATA,  
    at /scratch/phelps/devel/xemacs-21.4.21/src/buffer.c:1970 
#4  0x000000000045d2c3 in child_setup (in=6, out=8, err=8,  
    at /scratch/phelps/devel/xemacs-21.4.21/src/callproc.c:725 
#5  0x000000000045cc10 in Fold_call_process_internal (nargs=5, 
    at /scratch/phelps/devel/xemacs-21.4.21/src/callproc.c:424
[stack frames #6-#52 elided] 
Since check_quit can muck around with the Xlib socket, we
clearly don't want it to be called from this context without
first setting dont_check_for_quit to a non-zero value.

I've copied the call to begin_dont_check_for_quit from
unix_create_process into Fold_call_process_internal and
haven't seen the problem in the last 5 days, so I reckon it's
working.  I've attached this trivial patch in the hopes that
you find it useful.

Date User Action Args
2009-09-25 02:25:57stephensetnosy: - anonymous
2009-09-25 02:25:38stephensetstatus: assigned
assignedto: stephen
nosy: + stephen
2008-12-06 12:19:51phelpssetmessages: + msg894
2008-12-06 11:47:38anonymouscreate