From: Morten Bo Johansen <mbj@mbjnet.dk>
To: git@vger.kernel.org
Subject: [git] bugreport of a segmentation fault
Date: Sun, 22 Dec 2024 18:23:39 +0100 [thread overview]
Message-ID: <Z2hLG2xmO9KFRpY5@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 81 bytes --]
In the attachment, I have reported a segmentation fault in git.
Regards,
Morten
[-- Attachment #2: git-bugreport-2024-12-22-1816.txt --]
[-- Type: text/plain, Size: 6241 bytes --]
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
I had first run the command
git difftool --no-symlinks --dir-diff
to show a diff between a modified file I intended to commit. After the commit
I ran the command again and git crashed.
What did you expect to happen? (Expected behavior)
I expected git to show an empty output since the modified file had been
committed.
What happened instead? (Actual behavior)
It crashed.
What's different between what you expected and what actually happened?
The crash
Anything else you want to add:
Here is the trace which I hope is useful:
~/ % coredumpctl debug
PID: 220080 (git)
UID: 1000 (mojo)
GID: 1000 (mojo)
Signal: 11 (SEGV)
Timestamp: Sun 2024-12-22 17:55:51 CET (13min ago)
Command Line: git difftool --no-symlinks --dir-diff
Executable: /usr/bin/git
Control Group: /user.slice/user-1000.slice/user@1000.service/kitty-1421-3.scope
Unit: user@1000.service
User Unit: kitty-1421-3.scope
Slice: user-1000.slice
Owner UID: 1000 (mojo)
Boot ID: 22b76570d3a848bb9c8ab817b3f01126
Machine ID: 81a58827c2a04d8185f0370a425305ca
Hostname: gatsby
Storage: /var/lib/systemd/coredump/core.git.1000.22b76570d3a848bb9c8ab817b3f01126.220080.1734886551000000.zst (present)
Size on Disk: 46.4K
Message: Process 220080 (git) of user 1000 dumped core.
Stack trace of thread 220080:
#0 0x000060193ce06513 n/a (n/a + 0x0)
#1 0x000060193cc845c0 n/a (n/a + 0x0)
#2 0x000060193cc2e454 n/a (n/a + 0x0)
#3 0x000060193cc2ead9 n/a (n/a + 0x0)
#4 0x000060193cc297eb n/a (n/a + 0x0)
#5 0x00007a67eb5dee08 n/a (libc.so.6 + 0x25e08)
#6 0x00007a67eb5deecc __libc_start_main (libc.so.6 + 0x25ecc)
#7 0x000060193cc29cb5 n/a (n/a + 0x0)
ELF object binary architecture: AMD x86-64
GNU gdb (GDB) 15.2
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/git...
This GDB supports auto-downloading debuginfo from the following URLs:
<https://debuginfod.archlinux.org>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
Downloading 17.81 M separate debug info for /usr/bin/git
Reading symbols from /home/mojo/.cache/debuginfod_client/9b51ee185a3310bcbbdb7373865b42b912a1b10a/debuginfo...
[New LWP 220080]
Downloading 1.53 M separate debug info for /usr/lib/libpcre2-8.so.0
Downloading 194.53 K separate debug info for /usr/lib/libz.so.1
Downloading 9.36 M separate debug info for /usr/lib/libc.so.6
Downloading 1.07 M separate debug info for /lib64/ld-linux-x86-64.so.2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `git difftool --no-symlinks --dir-diff'.
Program terminated with signal SIGSEGV, Segmentation fault.
Downloading 8.42 K source file /usr/src/debug/git/git-2.47.1/hashmap.c
#0 hashmap_iter_next (iter=<synthetic pointer>) at /usr/src/debug/git/git-2.47.1/hashmap.c:299
299iter->next = current->next;
(gdb) bt
#0 hashmap_iter_next (iter=<synthetic pointer>) at /usr/src/debug/git/git-2.47.1/hashmap.c:299
#1 free_individual_entries (map=<optimized out>, entry_offset=<optimized out>) at /usr/src/debug/git/git-2.47.1/hashmap.c:183
#2 hashmap_clear_ (map=0x7fff638c6aa0, entry_offset=<optimized out>) at /usr/src/debug/git/git-2.47.1/hashmap.c:207
#3 0x000060193cc845c0 in hashmap_clear_ (map=0x7fff638c6aa0, entry_offset=0) at /usr/src/debug/git/git-2.47.1/hashmap.c:204
#4 run_dir_diff (extcmd=0x0, symlinks=0, prefix=<optimized out>, child=0x7fff638c6ad0) at builtin/difftool.c:666
#5 cmd_difftool (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>, repo=<optimized out>) at builtin/difftool.c:801
#6 0x000060193cc2e454 in run_builtin (p=0x60193d03ed30 <commands.lto_priv+912>, argc=3, argv=0x7fff638c7990, repo=0x60193d04de20 <the_repo.lto_priv>)
at /usr/src/debug/git/git-2.47.1/git.c:483
#7 handle_builtin (argc=3, argv=0x7fff638c7990) at /usr/src/debug/git/git-2.47.1/git.c:749
#8 0x000060193cc2ead9 in run_argv (argcp=0x7fff638c773c, argv=0x7fff638c7760) at /usr/src/debug/git/git-2.47.1/git.c:819
#9 0x000060193cc297eb in cmd_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/git/git-2.47.1/git.c:954
#10 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/git/git-2.47.1/common-main.c:64
(gdb)
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.
[System Info]
git version:
git version 2.47.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
libcurl: 8.11.0
OpenSSL: OpenSSL 3.4.0 22 Oct 2024
zlib: 1.3.1
uname: Linux 6.12.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 14:31:57 +0000 x86_64
compiler info: gnuc: 14.2
libc info: glibc: 2.40
$SHELL (typically, interactive shell): /bin/zsh
[Enabled Hooks]
next reply other threads:[~2024-12-22 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-22 17:23 Morten Bo Johansen [this message]
2024-12-22 20:30 ` [git] bugreport of a segmentation fault Kristoffer Haugsbakk
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=Z2hLG2xmO9KFRpY5@localhost.localdomain \
--to=mbj@mbjnet.dk \
--cc=git@vger.kernel.org \
/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.
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 NNTP newsgroup(s).