* bug#31214: hang in Faccept_process_output
@ 2018-04-19 0:37 Glenn Morris
2018-04-19 17:28 ` Glenn Morris
2018-12-25 23:35 ` Paul Eggert
0 siblings, 2 replies; 12+ messages in thread
From: Glenn Morris @ 2018-04-19 0:37 UTC (permalink / raw)
To: 31214
Package: emacs
Version: 27.0.50
Current master on RHEL7.4. If I do:
n=0
while : ; do
let n++; echo $n
rm -f test/src/process-tests.log
make -C test src/process-tests.log \
SELECTOR='\"make-process/mix-stderr$$\"' >& /dev/null
done
then eventually (after a few hundred loops), the spawned Emacs hangs in
Faccept_process_output. The associated external process is dead and
gone. gdb says:
#0 0x00007fe00d135879 in pselect () at /lib64/libc.so.6
#1 0x000000000068087e in really_call_select (arg=0x7ffda4c66e60)
at thread.c:572
#2 0x00000000005d6f13 in flush_stack_call_func (func=0x6807ed <really_call_select>, arg=0x7ffda4c66e60) at alloc.c:5213
#3 0x0000000000680933 in thread_select (func=0x413330 <pselect@plt>, max_fds=10, rfds=0x7ffda4c67390, wfds=0x7ffda4c67310, efds=0x0, timeout=0x7ffda4c67680, sigmask=0x0) at thread.c:602
#4 0x00000000006aa642 in xg_select (fds_lim=10, rfds=0x7ffda4c67720, wfds=0x7ffda4c676a0, efds=0x0, timeout=0x7ffda4c67680, sigmask=0x0) at xgselect.c:117
#5 0x0000000000656410 in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=0, do_display=false, wait_for_cell=..., wait_proc=0x140b6a0, just_wait_proc=0) at process.c:5384
#6 0x00000000006547cf in Faccept_process_output (process=..., seconds=..., millisec=..., just_this_one=...) at process.c:4672
Maybe resembles https://debbugs.gnu.org/24201 ?
But Emacs is sleeping using no CPU.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 0:37 bug#31214: hang in Faccept_process_output Glenn Morris
@ 2018-04-19 17:28 ` Glenn Morris
2018-04-19 17:34 ` Eli Zaretskii
2018-12-25 23:35 ` Paul Eggert
1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2018-04-19 17:28 UTC (permalink / raw)
To: 31214
Glenn Morris wrote:
> Current master on RHEL7.4.
Also reproduced on current Debian testing.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 17:28 ` Glenn Morris
@ 2018-04-19 17:34 ` Eli Zaretskii
2018-04-19 17:39 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-04-19 17:34 UTC (permalink / raw)
To: Glenn Morris; +Cc: 31214
> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 19 Apr 2018 13:28:33 -0400
>
> Glenn Morris wrote:
>
> > Current master on RHEL7.4.
>
> Also reproduced on current Debian testing.
If the emacs-26 branch doesn't have this problem, it could be due to
the changes in commit 4ba32858. Can you try backing out that
changeset?
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 17:34 ` Eli Zaretskii
@ 2018-04-19 17:39 ` Glenn Morris
2018-04-19 18:03 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2018-04-19 17:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31214
Eli Zaretskii wrote:
> If the emacs-26 branch doesn't have this problem
It does.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 17:39 ` Glenn Morris
@ 2018-04-19 18:03 ` Eli Zaretskii
2018-04-19 19:48 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-04-19 18:03 UTC (permalink / raw)
To: Glenn Morris; +Cc: 31214
> From: Glenn Morris <rgm@gnu.org>
> Cc: 31214@debbugs.gnu.org
> Date: Thu, 19 Apr 2018 13:39:45 -0400
>
> Eli Zaretskii wrote:
>
> > If the emacs-26 branch doesn't have this problem
>
> It does.
Then maybe we should pass a non-nil timeout to accept-process-output,
and/or a non-nil last argument.
IOW, I'm not sure the bug is not in the test itself.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 18:03 ` Eli Zaretskii
@ 2018-04-19 19:48 ` Glenn Morris
2018-04-19 19:53 ` Glenn Morris
2018-04-20 6:28 ` Eli Zaretskii
0 siblings, 2 replies; 12+ messages in thread
From: Glenn Morris @ 2018-04-19 19:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31214
Eli Zaretskii wrote:
> Then maybe we should pass a non-nil timeout to accept-process-output,
> and/or a non-nil last argument.
>
> IOW, I'm not sure the bug is not in the test itself.
Is it not a standard usage (start a process, and while it's live, accept
output from it)?
(Could the process by exiting part-way through accept-process-output?)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 19:48 ` Glenn Morris
@ 2018-04-19 19:53 ` Glenn Morris
2018-04-20 6:30 ` Eli Zaretskii
2018-04-20 6:28 ` Eli Zaretskii
1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2018-04-19 19:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31214
Glenn Morris wrote:
>> Then maybe we should pass a non-nil timeout to accept-process-output,
>> and/or a non-nil last argument.
>>
>> IOW, I'm not sure the bug is not in the test itself.
>
> Is it not a standard usage (start a process, and while it's live, accept
> output from it)?
In fact, doesn't this imply that any use of the form
(accept-process-output process) may hang Emacs forever, which seems bad?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 19:48 ` Glenn Morris
2018-04-19 19:53 ` Glenn Morris
@ 2018-04-20 6:28 ` Eli Zaretskii
2018-04-22 0:26 ` Glenn Morris
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2018-04-20 6:28 UTC (permalink / raw)
To: Glenn Morris; +Cc: 31214
> From: Glenn Morris <rgm@gnu.org>
> Cc: 31214@debbugs.gnu.org
> Date: Thu, 19 Apr 2018 15:48:33 -0400
>
> Eli Zaretskii wrote:
>
> > Then maybe we should pass a non-nil timeout to accept-process-output,
> > and/or a non-nil last argument.
> >
> > IOW, I'm not sure the bug is not in the test itself.
>
> Is it not a standard usage (start a process, and while it's live, accept
> output from it)?
When there are many processes lying around, I wouldn't trust the
defaults to produce the desired effect. Those arguments are there for
a reason, are they not?
> (Could the process by exiting part-way through accept-process-output?)
Which process?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 19:53 ` Glenn Morris
@ 2018-04-20 6:30 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2018-04-20 6:30 UTC (permalink / raw)
To: Glenn Morris; +Cc: 31214
> From: Glenn Morris <rgm@gnu.org>
> Cc: 31214@debbugs.gnu.org
> Date: Thu, 19 Apr 2018 15:53:52 -0400
>
> In fact, doesn't this imply that any use of the form
> (accept-process-output process) may hang Emacs forever, which seems bad?
Under very rare conditions, yes. That's what that commit on master
was about, and we have some evidence that it didn't solve all of the
problem, just a big chunk of it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-20 6:28 ` Eli Zaretskii
@ 2018-04-22 0:26 ` Glenn Morris
0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2018-04-22 0:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 31214
Eli Zaretskii wrote:
>> (Could the process by exiting part-way through accept-process-output?)
>
> Which process?
The 'process' argument in '(accept-process-output process)'.
BTW, this test not infrequently fails on hydra.nixos.org, with the
process output buffer being empty. I have no idea how that is possible.
Eg https://hydra.nixos.org/build/73055559
(equal "" "stdout
stderr
")
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-04-19 0:37 bug#31214: hang in Faccept_process_output Glenn Morris
2018-04-19 17:28 ` Glenn Morris
@ 2018-12-25 23:35 ` Paul Eggert
2019-01-08 1:48 ` Glenn Morris
1 sibling, 1 reply; 12+ messages in thread
From: Paul Eggert @ 2018-12-25 23:35 UTC (permalink / raw)
To: 31214
I ran Glenn's test case (Bug#31214#3) and could not reproduce the problem in
either Ubuntu 18.04 or Fedora 29 (both x86-64), using either the current
emacs-26 or the current master branch. I tried the test 10,000 times on all
platforms; the output always consisted of the numbers 1 through 10000, one per
line, and I typed ^C to exit the test case.
I don't know whether the bug is fixed or my platforms don't tickle the bug. I
don't see any change to src/process.c that would have obviously fixed the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#31214: hang in Faccept_process_output
2018-12-25 23:35 ` Paul Eggert
@ 2019-01-08 1:48 ` Glenn Morris
0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2019-01-08 1:48 UTC (permalink / raw)
To: Paul Eggert; +Cc: 31214
I can't reproduce it either any more (now on RHEL 7.6).
Oh well.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-01-08 1:48 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 0:37 bug#31214: hang in Faccept_process_output Glenn Morris
2018-04-19 17:28 ` Glenn Morris
2018-04-19 17:34 ` Eli Zaretskii
2018-04-19 17:39 ` Glenn Morris
2018-04-19 18:03 ` Eli Zaretskii
2018-04-19 19:48 ` Glenn Morris
2018-04-19 19:53 ` Glenn Morris
2018-04-20 6:30 ` Eli Zaretskii
2018-04-20 6:28 ` Eli Zaretskii
2018-04-22 0:26 ` Glenn Morris
2018-12-25 23:35 ` Paul Eggert
2019-01-08 1:48 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.