From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>, eggert@cs.ucla.edu
Cc: gerd.moellmann@gmail.com, 58960@debbugs.gnu.org, 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 17:09:45 +0200 [thread overview]
Message-ID: <83k04d9yva.fsf@gnu.org> (raw)
In-Reply-To: <87zgd9mpa8.fsf@gmail.com> (message from Robert Pluim on Wed, 02 Nov 2022 14:58:23 +0100)
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Paul Eggert <eggert@cs.ucla.edu>, tino.calancha@gmail.com,
> gerd.moellmann@gmail.com, 58960@debbugs.gnu.org
> Date: Wed, 02 Nov 2022 14:58:23 +0100
>
> >>>>> 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:
Ugh, xdg-open again...
> (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'?
Maybe we could. Assuming the signal stuff is already set so early, I
don't know exactly how posix_spawn works.
Paul, WDYT about this?
next prev parent reply other threads:[~2022-11-02 15:09 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
2022-11-02 15:09 ` Eli Zaretskii [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k04d9yva.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=58960@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=gerd.moellmann@gmail.com \
--cc=rpluim@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 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).