* Can we apply this patch for bug 84 and 425?
@ 2008-10-07 17:37 joakim
2008-10-07 18:23 ` Chong Yidong
2008-10-07 20:45 ` Stefan Monnier
0 siblings, 2 replies; 7+ messages in thread
From: joakim @ 2008-10-07 17:37 UTC (permalink / raw)
To: Emacs Development
These bugs are both about hangs when emacs deals with external processes:
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84
http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425
Markus Triska has a patch which reduces my experiences of the hang from
about once a day to not at all so far.
How can we proceed with this patch?
diff --git a/src/process.c b/src/process.c
index e8d0090..0cf04bc 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4791,6 +4791,10 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
else if (nread == -1 && EWOULDBLOCK == errno)
break;
#endif
+#ifdef EBADF
+ else if (nread == -1 && EBADF == errno)
+ break;
+#endif
}
if (total_nread > 0 && do_display)
redisplay_preserve_echo_area (10);
--
Joakim Verona
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
2008-10-07 17:37 Can we apply this patch for bug 84 and 425? joakim
@ 2008-10-07 18:23 ` Chong Yidong
[not found] ` <m3fxn8uoza.fsf@verona.se>
2008-10-07 20:45 ` Stefan Monnier
1 sibling, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2008-10-07 18:23 UTC (permalink / raw)
To: joakim; +Cc: Emacs Development
joakim@verona.se writes:
> These bugs are both about hangs when emacs deals with external processes:
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425
>
> Markus Triska has a patch which reduces my experiences of the hang
> from about once a day to not at all so far.
>
> How can we proceed with this patch?
According to Markus in the discussion in #425, these two bugs were due
to #562, which was fixed by undefining HAVE_RES_INIT on darwin. Is this
patch still necessary?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
2008-10-07 17:37 Can we apply this patch for bug 84 and 425? joakim
2008-10-07 18:23 ` Chong Yidong
@ 2008-10-07 20:45 ` Stefan Monnier
2008-10-07 21:10 ` Chong Yidong
2008-10-08 8:59 ` joakim
1 sibling, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2008-10-07 20:45 UTC (permalink / raw)
To: joakim; +Cc: Emacs Development
> These bugs are both about hangs when emacs deals with external processes:
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425
> Markus Triska has a patch which reduces my experiences of the hang from
> about once a day to not at all so far.
> How can we proceed with this patch?
> diff --git a/src/process.c b/src/process.c
> index e8d0090..0cf04bc 100644
> --- a/src/process.c
> +++ b/src/process.c
> @@ -4791,6 +4791,10 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
> else if (nread == -1 && EWOULDBLOCK == errno)
> break;
> #endif
> +#ifdef EBADF
> + else if (nread == -1 && EBADF == errno)
> + break;
> +#endif
> }
> if (total_nread > 0 && do_display)
> redisplay_preserve_echo_area (10);
This patch is not acceptable as-is: EBADF should normally be a symptom
of another bug in Emacs (we should never pass a bad descriptor), so
rather than ignore it, we should figure out where it comes from and fix
it there.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
[not found] ` <m3fxn8uoza.fsf@verona.se>
@ 2008-10-07 21:05 ` Chong Yidong
0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2008-10-07 21:05 UTC (permalink / raw)
To: joakim; +Cc: emacs-devel
joakim@verona.se writes:
> Chong Yidong <cyd@stupidchicken.com> writes:
>
>> joakim@verona.se writes:
>>
>>> These bugs are both about hangs when emacs deals with external processes:
>>> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84
>>> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425
>>> Markus Triska has a patch which reduces my experiences of the hang
>>> from about once a day to not at all so far.
>>>
>>> How can we proceed with this patch?
>>
>> According to Markus in the discussion in #425, these two bugs were due
>> to #562, which was fixed by undefining HAVE_RES_INIT on darwin. Is this
>> patch still necessary?
>
> Well I still experience the problem without Marcus patch, on Fedora core
> 9, i686 GNU/Linux.
I see.
The patch looks fairly safe; I think it can be checked in.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
2008-10-07 20:45 ` Stefan Monnier
@ 2008-10-07 21:10 ` Chong Yidong
2008-10-08 8:59 ` joakim
1 sibling, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2008-10-07 21:10 UTC (permalink / raw)
To: joakim; +Cc: Stefan Monnier, Emacs Development
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> This patch is not acceptable as-is: EBADF should normally be a symptom
> of another bug in Emacs (we should never pass a bad descriptor), so
> rather than ignore it, we should figure out where it comes from and
> fix it there.
Hmm, the bug seen by Joakim happens on GNU/Linux, so it can't be related
to the RES_INIT issues leading to #84 and #425. Joakim, could you try
to debug where the bad descriptor comes from?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
2008-10-07 20:45 ` Stefan Monnier
2008-10-07 21:10 ` Chong Yidong
@ 2008-10-08 8:59 ` joakim
2008-10-08 15:55 ` Chong Yidong
1 sibling, 1 reply; 7+ messages in thread
From: joakim @ 2008-10-08 8:59 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Emacs Development
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> These bugs are both about hangs when emacs deals with external processes:
>> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=84> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=425
>
>> Markus Triska has a patch which reduces my experiences of the hang from
>> about once a day to not at all so far.
>
>> How can we proceed with this patch?
>
>> diff --git a/src/process.c b/src/process.c
>> index e8d0090..0cf04bc 100644
>> --- a/src/process.c
>> +++ b/src/process.c
>> @@ -4791,6 +4791,10 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
>> else if (nread == -1 && EWOULDBLOCK == errno)
>> break;
>> #endif
>> +#ifdef EBADF
>> + else if (nread == -1 && EBADF == errno)
>> + break;
>> +#endif
>> }
>> if (total_nread > 0 && do_display)
>> redisplay_preserve_echo_area (10);
>
> This patch is not acceptable as-is: EBADF should normally be a symptom
> of another bug in Emacs (we should never pass a bad descriptor), so
> rather than ignore it, we should figure out where it comes from and fix
> it there.
Just to be fair to Marcus, he also said it needed further debugging to
determine the actual cause of the bug. OTOH I've tried to debug it and I
cant find a reproducible test-case. The bug just manifests sometimes.
>
>
> Stefan
>
--
Joakim Verona
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can we apply this patch for bug 84 and 425?
2008-10-08 8:59 ` joakim
@ 2008-10-08 15:55 ` Chong Yidong
0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2008-10-08 15:55 UTC (permalink / raw)
To: joakim; +Cc: Stefan Monnier, Emacs Development
joakim@verona.se writes:
> Just to be fair to Marcus, he also said it needed further debugging to
> determine the actual cause of the bug. OTOH I've tried to debug it and I
> cant find a reproducible test-case. The bug just manifests sometimes.
Have you applying the patch in question to Emacs, running Emacs under
GDB, and setting the breakpoint at the `break;' line?
>>> +#ifdef EBADF
>>> + else if (nread == -1 && EBADF == errno)
>>> + break;
>>> +#endif
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-08 15:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 17:37 Can we apply this patch for bug 84 and 425? joakim
2008-10-07 18:23 ` Chong Yidong
[not found] ` <m3fxn8uoza.fsf@verona.se>
2008-10-07 21:05 ` Chong Yidong
2008-10-07 20:45 ` Stefan Monnier
2008-10-07 21:10 ` Chong Yidong
2008-10-08 8:59 ` joakim
2008-10-08 15:55 ` Chong Yidong
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).