all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, 58960@debbugs.gnu.org,
	Paul Eggert <eggert@cs.ucla.edu>,
	tino.calancha@gmail.com
Subject: bug#58960: 29.0.50; Assert fails when browsing an URL, bug#58960: 29.0.50; Assert fails when browsing an URL
Date: Wed, 02 Nov 2022 14:58:23 +0100	[thread overview]
Message-ID: <87zgd9mpa8.fsf@gmail.com> (raw)
In-Reply-To: <83wn8da4eo.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Nov 2022 15:10:07 +0200")

>>>>> On Wed, 02 Nov 2022 15:10:07 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> Cc: Gerd Möllmann <gerd.moellmann@gmail.com>,
    >> 58960@debbugs.gnu.org
    >> From: Robert Pluim <rpluim@gmail.com>
    >> Date: Wed, 02 Nov 2022 11:20:31 +0100
    >> 
    >> Looks like `call-process' needs to ensure the child signal fdʼs are
    >> set up before calling `emacs_spawn'.

    Eli> Why do we need this?  IOW, do you understand how did SIGCHLD cause
    Eli> this?

`browse-url' does `call-process' for `xdg-open' by default. `xdg-open'
exits almost immediately, we get SIGCHLD:

(gdb) bt
#0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:421
#1  0x00005555555b489e in die
    (msg=msg@entry=0x5555558d938f "0 <= fd", file=file@entry=0x5555558d9354 "process.c", line=line@entry=7386) at alloc.c:7692
#2  0x00005555555bfec9 in child_signal_notify () at process.c:7386
#3  handle_child_signal (sig=<optimized out>) at process.c:7493
#4  0x000055555574e992 in deliver_process_signal
    (sig=17, handler=0x555555831b40 <handle_child_signal>) at sysdep.c:1741
#5  0x00007ffff5752140 in <signal handler called> ()

`child_signal_notify' does this:

  int fd = child_signal_write_fd;
  eassert (0 <= fd);

and if `child_signal_init' hasnʼt been called, then this is still
true:

/* The write end thereof.  The SIGCHLD handler writes to this file
   descriptor to notify `wait_reading_process_output' of process
   status changes.  */
static int child_signal_write_fd = -1;

so the assert fails.

Why canʼt we just call `child_signal_init' from `init_process_emacs'
instead of `create_process'?

Robert
-- 





  reply	other threads:[~2022-11-02 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  4:48 bug#58960: 29.0.50; Assert fails when browsing an URL Tino Calancha
2022-11-02  5:14 ` Gerd Möllmann
2022-11-02 10:20 ` bug#58960: 29.0.50; Assert fails when browsing an URL, " Robert Pluim
2022-11-02 13:10   ` Eli Zaretskii
2022-11-02 13:58     ` Robert Pluim [this message]
2022-11-02 15:09       ` Eli Zaretskii
2022-11-02 20:29         ` Paul Eggert
2022-11-03  3:00           ` Tino Calancha
2022-11-03  8:41             ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgd9mpa8.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=58960@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=tino.calancha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.