git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Bugreport: pack-objects died of signal 11

From
Derrick Stolee <derrickstolee@github.com>
Date
Aug 4, 2022, 20:14 UTC
Message-ID
<87d46db2-8e09-e5a7-b6bb-e94bf05df305@github.com>
In-Reply-To
<ecb6fa27-b918-4234-8e44-13c2a3e76e07@gmail.com>
On 8/4/2022 2:21 PM, Emily Noneman wrote:
Show 10 quoted lines
> The stack trace:
> Thread 2 received signal SIGSEGV, Segmentation fault.
> git_config_check_init (repo=0x0) at config.c:2538
> 2538        if (repo->config && repo->config->hash_initialized)
> (gdb) bt
> #0  git_config_check_init (repo=0x0) at config.c:2538
> #1  0x00000001001197a8 in repo_config_get_string (repo=0x0, key=0x1002a3c49 "status.showuntrackedfiles", dest=0x0, dest@entry=0x7ff7bfefc1f0) at config.c:2574
> #2  0x000000010014a85b in new_untracked_cache_flags (istate=0x0) at dir.c:2781
> #3  new_untracked_cache (istate=0x0, flags=-1) at dir.c:2797
> #4  0x00000001001d68f1 in tweak_untracked_cache (istate=0x7ff7bfefc7e0) at read-cache.c:1996
Here is where things are confusing:
* tweak_untracked_cache() takes an 'istate' that is non-NULL here.
* The next spot in the stack is new_untracked_cache() with a NULL 'istate'.

The only way these are connected is by a missing stack frame (probably optimized out) calling add_untracked_cache(). Still, it should be passing 'istate' throughout this process.

The repo_config_get_string() call must also be coming from new_untracked_cache_flags() which is again a missing stack frame, but is called from new_untracked_cache(). Strangely, it's using a NULL 'repo' here which should have come from 'istate->repo', so we should have had a segfault earlier.

Sorry for the drive-by commentary without any solution. This is just genuinely puzzling to me.

Thanks, -Stolee

Previous: Emily NonemanNext: Ævar Arnfjörð Bjarmason
Message 4 of 15 in “Bugreport: pack-objects died of signal 11”
  1. Paul HornJul 12, 2022
  2. Jeff KingJul 14, 2022
  3. Emily NonemanAug 4, 2022
  4. Derrick StoleeAug 4, 2022
  5. Ævar Arnfjörð BjarmasonAug 4, 2022
  6. Emily NonemanAug 4, 2022
  7. revision.c: set-up "index_state.repo", don't segfault in pack-objectsÆvar Arnfjörð Bjarmason, Aug 5, 2022
  8. Derrick StoleeAug 5, 2022
  9. Jeff KingAug 5, 2022
  10. Junio C HamanoAug 5, 2022
  11. Emily NonemanAug 8, 2022
  12. Jeff KingAug 9, 2022
  13. Junio C HamanoAug 9, 2022
  14. Jeff KingAug 9, 2022
  15. Junio C HamanoAug 9, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.