all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
@ 2021-12-04  1:12 Hongyi Zhao
  2021-12-04  2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 10+ messages in thread
From: Hongyi Zhao @ 2021-12-04  1:12 UTC (permalink / raw)
  To: help-gnu-emacs

Today, when I exit Emacs, I noticed the following message on terminal:

werner@X10DAi-00:~$ emacs
/usr/local/bin/emacs: writing to child signal FD: Bad file descriptor

Any hints for this?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04  1:12 /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor Hongyi Zhao
@ 2021-12-04  2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-12-04  3:26   ` Hongyi Zhao
  0 siblings, 1 reply; 10+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-04  2:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> werner@X10DAi-00:~$ emacs
> /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor

That's often buffer overflow ... ha, old school!

What did you do?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04  2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-04  3:26   ` Hongyi Zhao
  2021-12-04  3:32     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-12-04 12:05     ` Tomas Hlavaty
  0 siblings, 2 replies; 10+ messages in thread
From: Hongyi Zhao @ 2021-12-04  3:26 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Sat, Dec 4, 2021 at 10:33 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > werner@X10DAi-00:~$ emacs
> > /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
>
> That's often buffer overflow ... ha, old school!
>
> What did you do?

I try to compile vterm module with `M-x vterm-module-compile RET`, but
Emacs freezes. Then I killed the process by hitting `C-g` twice, at
this moment the message reported here occured.

HZ



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04  3:26   ` Hongyi Zhao
@ 2021-12-04  3:32     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-12-04 12:05     ` Tomas Hlavaty
  1 sibling, 0 replies; 10+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-12-04  3:32 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

>>> werner@X10DAi-00:~$ emacs /usr/local/bin/emacs: writing to
>>> child signal FD: Bad file descriptor
>>
>> That's often buffer overflow ... ha, old school!
>>
>> What did you do?
>
> I try to compile vterm module with `M-x vterm-module-compile
> RET`, but Emacs freezes. Then I killed the process by
> hitting `C-g` twice, at this moment the message reported
> here occured.

Likely: Buffer overflow in C code.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04  3:26   ` Hongyi Zhao
  2021-12-04  3:32     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-12-04 12:05     ` Tomas Hlavaty
  2021-12-04 12:16       ` Po Lu
  2021-12-04 13:28       ` Eli Zaretskii
  1 sibling, 2 replies; 10+ messages in thread
From: Tomas Hlavaty @ 2021-12-04 12:05 UTC (permalink / raw)
  To: Hongyi Zhao, Emanuel Berg, help-gnu-emacs

On Sat 04 Dec 2021 at 11:26, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> I try to compile vterm module with `M-x vterm-module-compile RET`, but
> Emacs freezes. Then I killed the process by hitting `C-g` twice, at
> this moment the message reported here occured.

There is something seriously wrong with C-g.
It is very dangerous.

Emacs often crashes for me after trying to break blocking operation
using C-g twice.
It just prints a list of threads and crashes.
This has been happening for a long time;
I guess since introduction of threads.
It probably has something to do with disruption of blocking
network operations or garbage collection.

Two weeks ago, it even truncated ~/.emacs to 0 size.  This happened once
so far.

All with emacs -nw.

Tomas



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04 12:05     ` Tomas Hlavaty
@ 2021-12-04 12:16       ` Po Lu
  2021-12-04 13:28       ` Eli Zaretskii
  1 sibling, 0 replies; 10+ messages in thread
From: Po Lu @ 2021-12-04 12:16 UTC (permalink / raw)
  To: Tomas Hlavaty; +Cc: Hongyi Zhao, Emanuel Berg, help-gnu-emacs

Tomas Hlavaty <tom@logand.com> writes:

> There is something seriously wrong with C-g.  It is very dangerous.
>
> Emacs often crashes for me after trying to break blocking operation
> using C-g twice.  It just prints a list of threads and crashes.  This
> has been happening for a long time; I guess since introduction of
> threads.  It probably has something to do with disruption of blocking
> network operations or garbage collection.
>
> Two weeks ago, it even truncated ~/.emacs to 0 size.  This happened
> once so far.
>
> All with emacs -nw.
>
> Tomas

This is a very serious problem.  Have you reported a bug?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04 12:05     ` Tomas Hlavaty
  2021-12-04 12:16       ` Po Lu
@ 2021-12-04 13:28       ` Eli Zaretskii
  2021-12-04 20:37         ` Tomas Hlavaty
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-12-04 13:28 UTC (permalink / raw)
  To: help-gnu-emacs

On December 4, 2021 2:05:44 PM GMT+02:00, Tomas Hlavaty <tom@logand.com> wrote:
> On Sat 04 Dec 2021 at 11:26, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> > I try to compile vterm module with `M-x vterm-module-compile RET`, but
> > Emacs freezes. Then I killed the process by hitting `C-g` twice, at
> > this moment the message reported here occured.
> 
> There is something seriously wrong with C-g.
> It is very dangerous.
> 
> Emacs often crashes for me after trying to break blocking operation
> using C-g twice.
> It just prints a list of threads and crashes.
> This has been happening for a long time;
> I guess since introduction of threads.
> It probably has something to do with disruption of blocking
> network operations or garbage collection.
> 
> Two weeks ago, it even truncated ~/.emacs to 0 size.  This happened once
> so far.
> 
> All with emacs -nw.

What version of Emacs is that, and on what OS?

In general, typing C-g twice invokes "emergency exit", but that is supposed to ask you a question before it ends the session.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04 13:28       ` Eli Zaretskii
@ 2021-12-04 20:37         ` Tomas Hlavaty
  2021-12-04 20:44           ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Tomas Hlavaty @ 2021-12-04 20:37 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

On Sat 04 Dec 2021 at 15:28, Eli Zaretskii <eliz@gnu.org> wrote:
> What version of Emacs is that, and on what OS?

GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,
cairo version 1.16.0)

nixos 21.05

but printing long list of threads and crashing has been happening for a
long time

> In general, typing C-g twice invokes "emergency exit", but that is
> supposed to ask you a question before it ends the session.

Mostly it does ask two questions iirc, save stuff? and then abort?
But sometimes it crashes without questions.

Is there some non-emergency way of interrupting blocking behaviour like
network connections?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04 20:37         ` Tomas Hlavaty
@ 2021-12-04 20:44           ` Eli Zaretskii
  2021-12-04 21:32             ` Tomas Hlavaty
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2021-12-04 20:44 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Tomas Hlavaty <tom@logand.com>
> Date: Sat, 04 Dec 2021 21:37:57 +0100
> 
> > What version of Emacs is that, and on what OS?
> 
> GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,
> cairo version 1.16.0)

You may wish trying the pretest of Emacs 28.  Some problems in this
area were fixed after 27.2 was released, I think.

> > In general, typing C-g twice invokes "emergency exit", but that is
> > supposed to ask you a question before it ends the session.
> 
> Mostly it does ask two questions iirc, save stuff? and then abort?
> But sometimes it crashes without questions.

The two questions it asks are the intended behavior.  And if you tell
it to abort, then it does, and you may think it's a crash.

But it shouldn't crash without asking first.

> Is there some non-emergency way of interrupting blocking behaviour like
> network connections?

You can deliver a SIGUSR1 signal.  But it doesn't necessarily help in
all situations.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor
  2021-12-04 20:44           ` Eli Zaretskii
@ 2021-12-04 21:32             ` Tomas Hlavaty
  0 siblings, 0 replies; 10+ messages in thread
From: Tomas Hlavaty @ 2021-12-04 21:32 UTC (permalink / raw)
  To: Eli Zaretskii, help-gnu-emacs

On Sat 04 Dec 2021 at 22:44, Eli Zaretskii <eliz@gnu.org> wrote:
> You may wish trying the pretest of Emacs 28.  Some problems in this
> area were fixed after 27.2 was released, I think.

that is good news!

>> Is there some non-emergency way of interrupting blocking behaviour like
>> network connections?
>
> You can deliver a SIGUSR1 signal.  But it doesn't necessarily help in
> all situations.

Interesting but inconvenient.

I'll see if it gets better with the new emacs after upgrading to nixos
21.11.

Thank you for your help!



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-12-04 21:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-04  1:12 /usr/local/bin/emacs: writing to child signal FD: Bad file descriptor Hongyi Zhao
2021-12-04  2:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-04  3:26   ` Hongyi Zhao
2021-12-04  3:32     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-12-04 12:05     ` Tomas Hlavaty
2021-12-04 12:16       ` Po Lu
2021-12-04 13:28       ` Eli Zaretskii
2021-12-04 20:37         ` Tomas Hlavaty
2021-12-04 20:44           ` Eli Zaretskii
2021-12-04 21:32             ` Tomas Hlavaty

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.