emacs hangs when a sub-process goes defunct

Ken Brown kbrown@cornell.edu
Thu Dec 6 16:49:00 GMT 2012


On 12/6/2012 10:04 AM, Ken Brown wrote:
> On 12/6/2012 9:08 AM, Jonas J Linde wrote:
>> Hello!
>>
>> And Ken Brown spoke unto the world. And said:
>>> On 11/14/2012 11:07 AM, Rockefeller, Harry wrote:
>>>> Emacs often hangs when I save a buffer which is also tied to an svn
>>>> repository.
>>>> When I run ps I see the emacs child process 'svn' <defunct>.
>>>> I just had a very similar situation while running ediffs. But this
>>>> time emacs hung up
>>>> with the child process 'diff' <defunct>.
>>>
>>> When you say the buffer is tied to an svn repository, do you mean
>>> you're using emacs as your commit editor as in the following report?
>>>
>>>   http://cygwin.com/ml/cygwin/2012-10/msg00375.html
>>
>> That report is about how emacs crashes when hitting Ctrl-G. This report
>> is about how emacs doesn't crash but hangs apparently waiting for a
>> defunct child process.
>>
>> I've recently (since a few weeks) started to experience this same
>> problem several times per day. The only option I have found is to send a
>> SIGKILL to emacs and start over.
>
> Can you think of anything that's changed in the last few week?
>
>> It happens when running for example cleartool in a sub shell or when
>> saving files over ssh or scp with tramp. When doing a 'ps -ef' I always
>> find a <defunct> child process of emacs - eg.:
>>
>>     liejj    4968    7748 ?        14:30:47 /usr/bin/cygpath <defunct>
>>     liejj    7748       1 pty1     11:33:32 /usr/bin/emacs-X11
>> or
>>     liejj    5064    3976 pty1     10:10:20 /usr/bin/emacs-X11
>>     liejj    2024    5064 pty11    10:28:56 /usr/bin/ssh
>>     liejj    6300    5064 ?        11:30:58 /cygdrive/c/Program
>> Files/IBM/RationalSDLC/ClearCase/bin/cleartool <defunct>
>>
>>> If so, it's a bug in emacs-24.2 that has been fixed upstream for
>>> emacs-24.3.  If not, more details would be helpful.
>>
>> I'll attach the cygcheck output. Is there anything else I should do?
>
> Your cygcheck output shows multiple cygwin1.dlls in your path.  The
> first thing you should do is fix that.
>
> If that doesn't solve the problem, please try the recently released
> (test version) emacs-24.2.90-1.  And be sue to read the release
> announcement, because there have been some changes:
>
>    http://cygwin.com/ml/cygwin/2012-12/msg00004.html
>
> If that doesn't help either, try to come up with a simple recipe for
> reproducing the problem that doesn't require the use of non-Cygwin
> programs like cleartool.

BTW, can you explain why emacs had started a cygpath process?  There are 
very few places in the emacs code where this happens, and I don't see 
any connection with tramp.  But maybe I'm missing something.

And here's one other thing you can try.  Install the emacs-debuginfo 
package.  Then when emacs hangs, you can attach gdb and see if you can 
get a backtrace that might show where emacs is stuck.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list