{"thread":{"id":"62682","subject":"[git] bugreport of a segmentation fault","startedAt":"2024-12-22T17:50:48Z","lastAt":"2024-12-22T20:31:16Z","messageCount":2,"participants":["Morten Bo Johansen","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"509503","messageId":"Z2hLG2xmO9KFRpY5@localhost.localdomain","threadId":"62682","inReplyTo":null,"subject":"[git] bugreport of a segmentation fault","fromName":"Morten Bo Johansen","fromEmail":"mbj@mbjnet.dk","sentAt":"2024-12-22T17:23:39Z","receivedAt":"2024-12-22T17:50:48Z","isPatch":false,"sender":{"key":"mbj@mbjnet.dk","avatar":null},"body":"In the attachment, I have reported a segmentation fault in git.\n\nRegards,\nMorten\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nI had first run the command\n\n   git difftool --no-symlinks --dir-diff\n\nto show a diff between a modified file I intended to commit. After the commit\nI ran the command again and git crashed.\n\nWhat did you expect to happen? (Expected behavior)\n\n  I expected git to show an empty output since the modified file had been\n  committed.\n\nWhat happened instead? (Actual behavior)\n\n  It crashed.\n\nWhat's different between what you expected and what actually happened?\n\n  The crash\n\nAnything else you want to add:\n\n  Here is the trace which I hope is useful:\n\n    ~/ % coredumpctl debug\n               PID: 220080 (git)\n               UID: 1000 (mojo)\n               GID: 1000 (mojo)\n            Signal: 11 (SEGV)\n         Timestamp: Sun 2024-12-22 17:55:51 CET (13min ago)\n      Command Line: git difftool --no-symlinks --dir-diff\n        Executable: /usr/bin/git\n     Control Group: /user.slice/user-1000.slice/user@1000.service/kitty-1421-3.scope\n              Unit: user@1000.service\n         User Unit: kitty-1421-3.scope\n             Slice: user-1000.slice\n         Owner UID: 1000 (mojo)\n           Boot ID: 22b76570d3a848bb9c8ab817b3f01126\n        Machine ID: 81a58827c2a04d8185f0370a425305ca\n          Hostname: gatsby\n           Storage: /var/lib/systemd/coredump/core.git.1000.22b76570d3a848bb9c8ab817b3f01126.220080.1734886551000000.zst (present)\n      Size on Disk: 46.4K\n           Message: Process 220080 (git) of user 1000 dumped core.\n    \n                    Stack trace of thread 220080:\n                    #0  0x000060193ce06513 n/a (n/a + 0x0)\n                    #1  0x000060193cc845c0 n/a (n/a + 0x0)\n                    #2  0x000060193cc2e454 n/a (n/a + 0x0)\n                    #3  0x000060193cc2ead9 n/a (n/a + 0x0)\n                    #4  0x000060193cc297eb n/a (n/a + 0x0)\n                    #5  0x00007a67eb5dee08 n/a (libc.so.6 + 0x25e08)\n                    #6  0x00007a67eb5deecc __libc_start_main (libc.so.6 + 0x25ecc)\n                    #7  0x000060193cc29cb5 n/a (n/a + 0x0)\n                    ELF object binary architecture: AMD x86-64\n    \n    GNU gdb (GDB) 15.2\n    Copyright (C) 2024 Free Software Foundation, Inc.\n    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n    This is free software: you are free to change and redistribute it.\n    There is NO WARRANTY, to the extent permitted by law.\n    Type \"show copying\" and \"show warranty\" for details.\n    This GDB was configured as \"x86_64-pc-linux-gnu\".\n    Type \"show configuration\" for configuration details.\n    For bug reporting instructions, please see:\n    <https://www.gnu.org/software/gdb/bugs/>.\n    Find the GDB manual and other documentation resources online at:\n        <http://www.gnu.org/software/gdb/documentation/>.\n\n    For help, type \"help\".\n    Type \"apropos word\" to search for commands related to \"word\"...\n    Reading symbols from /usr/bin/git...\n\n    This GDB supports auto-downloading debuginfo from the following URLs:\n      <https://debuginfod.archlinux.org>\n    Enable debuginfod for this session? (y or [n]) y\n    Debuginfod has been enabled.\n    To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.\n    Downloading 17.81 M separate debug info for /usr/bin/git\n    Reading symbols from /home/mojo/.cache/debuginfod_client/9b51ee185a3310bcbbdb7373865b42b912a1b10a/debuginfo...\n    [New LWP 220080]\n    Downloading 1.53 M separate debug info for /usr/lib/libpcre2-8.so.0\n    Downloading 194.53 K separate debug info for /usr/lib/libz.so.1\n    Downloading 9.36 M separate debug info for /usr/lib/libc.so.6\n    Downloading 1.07 M separate debug info for /lib64/ld-linux-x86-64.so.2\n    [Thread debugging using libthread_db enabled]\n    Using host libthread_db library \"/usr/lib/libthread_db.so.1\".\n    Core was generated by `git difftool --no-symlinks --dir-diff'.\n    Program terminated with signal SIGSEGV, Segmentation fault.\n    Downloading 8.42 K source file /usr/src/debug/git/git-2.47.1/hashmap.c\n    #0  hashmap_iter_next (iter=<synthetic pointer>) at /usr/src/debug/git/git-2.47.1/hashmap.c:299\n    299iter->next = current->next;\n    (gdb) bt\n    #0  hashmap_iter_next (iter=<synthetic pointer>) at /usr/src/debug/git/git-2.47.1/hashmap.c:299\n    #1  free_individual_entries (map=<optimized out>, entry_offset=<optimized out>) at /usr/src/debug/git/git-2.47.1/hashmap.c:183\n    #2  hashmap_clear_ (map=0x7fff638c6aa0, entry_offset=<optimized out>) at /usr/src/debug/git/git-2.47.1/hashmap.c:207\n    #3  0x000060193cc845c0 in hashmap_clear_ (map=0x7fff638c6aa0, entry_offset=0) at /usr/src/debug/git/git-2.47.1/hashmap.c:204\n    #4  run_dir_diff (extcmd=0x0, symlinks=0, prefix=<optimized out>, child=0x7fff638c6ad0) at builtin/difftool.c:666\n    #5  cmd_difftool (argc=<optimized out>, argv=<optimized out>, prefix=<optimized out>, repo=<optimized out>) at builtin/difftool.c:801\n    #6  0x000060193cc2e454 in run_builtin (p=0x60193d03ed30 <commands.lto_priv+912>, argc=3, argv=0x7fff638c7990, repo=0x60193d04de20 <the_repo.lto_priv>)\n        at /usr/src/debug/git/git-2.47.1/git.c:483\n    #7  handle_builtin (argc=3, argv=0x7fff638c7990) at /usr/src/debug/git/git-2.47.1/git.c:749\n    #8  0x000060193cc2ead9 in run_argv (argcp=0x7fff638c773c, argv=0x7fff638c7760) at /usr/src/debug/git/git-2.47.1/git.c:819\n    #9  0x000060193cc297eb in cmd_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/git/git-2.47.1/git.c:954\n    #10 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/git/git-2.47.1/common-main.c:64\n    (gdb)\n\n    Please review the rest of the bug report below.\n    You can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.47.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nlibcurl: 8.11.0\nOpenSSL: OpenSSL 3.4.0 22 Oct 2024\nzlib: 1.3.1\nuname: Linux 6.12.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 14:31:57 +0000 x86_64\ncompiler info: gnuc: 14.2\nlibc info: glibc: 2.40\n$SHELL (typically, interactive shell): /bin/zsh\n\n\n[Enabled Hooks]\n"},{"id":"509508","messageId":"78610da6-218d-4f41-9435-3e510d31aca2@app.fastmail.com","threadId":"62682","inReplyTo":"Z2hLG2xmO9KFRpY5@localhost.localdomain","subject":"Re: [git] bugreport of a segmentation fault","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2024-12-22T20:30:54Z","receivedAt":"2024-12-22T20:31:16Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Sun, Dec 22, 2024, at 18:23, Morten Bo Johansen wrote:\n> In the attachment, I have reported a segmentation fault in git.\n>\n> Regards,\n> Morten\n>\n> Attachments:\n> * git-bugreport-2024-12-22-1816.txt\n\nHi, it looks like this was fixed in 98e40155936 (builtin/difftool:\nintialize some hashmap variables, 2024-11-12).  That change will be part\nof the upcoming 2.48.0 release.\n\nIt does not look like that change will be part of a maintenance release,\ni.e. version 2.47.2 (based on Documentation/RelNotes/2.48.0.txt).\n\n-- \nKristoffer Haugsbakk\n\n"}]}