GNU bug report logs - #58960
29.0.50; Assert fails when browsing an URL

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Wed, 2 Nov 2022 04:49:01 UTC

Severity: normal

Found in version 29.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>, eggert <at> cs.ucla.edu
Cc: gerd.moellmann <at> gmail.com, 58960 <at> debbugs.gnu.org, tino.calancha <at> 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
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: Paul Eggert <eggert <at> cs.ucla.edu>,  tino.calancha <at> gmail.com,
>   gerd.moellmann <at> gmail.com,  58960 <at> debbugs.gnu.org
> Date: Wed, 02 Nov 2022 14:58:23 +0100
> 
> >>>>> On Wed, 02 Nov 2022 15:10:07 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
> 
>     >> Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
>     >> 58960 <at> debbugs.gnu.org
>     >> From: Robert Pluim <rpluim <at> 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 <at> entry=0x5555558d938f "0 <= fd", file=file <at> entry=0x5555558d9354 "process.c", line=line <at> 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?




This bug report was last modified 2 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.