From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 75292@debbugs.gnu.org
Subject: bug#75292: 31.0.50; igc: (file-error "Doing vfork" "Bad address")
Date: Fri, 03 Jan 2025 18:24:47 +0000 [thread overview]
Message-ID: <87bjwnkb81.fsf@protonmail.com> (raw)
In-Reply-To: <87y0zrg4om.fsf@localhost>
"Ihor Radchenko" <yantar92@posteo.net> writes:
> Pip Cet <pipcet@protonmail.com> writes:
>
>> After checking Eli's suggestion, an strace would be nice to find out
>> which of the pointers has gone bad.
>
> It can sometimes take one day to get the error. I am not sure if have
> enough disk space to record strace for so long. (I never used strace though)
Ouch. I didn't manage to reproduce it; maybe I didn't try for long
enough.
For the record, Emacs still defaults to -O if no optimization option is
specified. I fixed that in my tree a long time ago, and I forgot. You
are running with optimization so it's entirely possible an automatic
variable which should have kept alive the string disappeared.
My suggestion would be
(strace -ff ...emacs... 2>&1) | egrep -50 '(fork|clone|spawn|exec)'
(grep -e on most distros, but you use gentoo, right?)
Note that this will attach to all of emacs's child processes
recursively, so there still might be a lot of output.
You can also attach to a running emacs process with strace -p; this
should allow you to kill the strace and attach gdb to emacs afterwards
for inspection purposes.
However, we have three possible explanations for this bug that we
already know about; maybe it's best to fix those three and see whether
the bug went away?
I've opened bug#75322 for the almost definitely buggy usage of
SAFE_ALLOCA in process.c and callproc.c, which might explain this (but I
don't think it does, TBH, because SAFE_ALLOCA would use alloca on your
system in this case, I think).
I don't think it's the 64KB stack allocation of call_process, either,
but that's also something we shouldn't do and there is a tiny chance
we somehow fail to mark a large C stack.
The most likely candidate right now is make_environment_block, which
happily stuffs string data pointers into an xmalloc'd block and goes
about its merry way without letting GC know about them. I think it
would cause the problem you observed, but haven't managed to reproduce
it yet. If I manage to do so, I'll push a fix.
Pip
next prev parent reply other threads:[~2025-01-03 18:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 17:54 bug#75292: 31.0.50; igc: (file-error "Doing vfork" "Bad address") Ihor Radchenko
2025-01-02 18:37 ` Eli Zaretskii
2025-01-02 18:42 ` Ihor Radchenko
2025-01-02 19:29 ` Eli Zaretskii
2025-01-02 19:37 ` Ihor Radchenko
2025-01-02 20:22 ` Eli Zaretskii
2025-01-02 20:45 ` Ihor Radchenko
2025-01-02 21:07 ` Eli Zaretskii
2025-01-03 17:56 ` Ihor Radchenko
2025-01-03 19:33 ` Eli Zaretskii
2025-01-04 14:12 ` Ihor Radchenko
2025-01-04 14:20 ` Eli Zaretskii
2025-01-07 17:40 ` Ihor Radchenko
2025-01-07 17:50 ` Eli Zaretskii
2025-01-07 18:44 ` Ihor Radchenko
2025-01-07 19:28 ` Eli Zaretskii
2025-01-03 20:21 ` Eli Zaretskii
2025-01-04 14:13 ` Ihor Radchenko
2025-01-04 14:22 ` Eli Zaretskii
2025-01-04 15:21 ` Ihor Radchenko
2025-01-02 19:41 ` Paul Eggert
2025-01-02 20:35 ` Eli Zaretskii
2025-01-02 20:45 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 17:58 ` Ihor Radchenko
2025-01-03 18:24 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2025-01-03 19:47 ` Eli Zaretskii
2025-01-03 19:51 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 19:11 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=87bjwnkb81.fsf@protonmail.com \
--to=bug-gnu-emacs@gnu.org \
--cc=75292@debbugs.gnu.org \
--cc=pipcet@protonmail.com \
--cc=yantar92@posteo.net \
/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.