git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Potential bug in pack-objects.c
@ 2019-01-21 22:10 Alex Netkachov
  2019-01-22  7:29 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Netkachov @ 2019-01-21 22:10 UTC (permalink / raw)
  To: git

Hi,

The most recent version of git crashes on gc command on my repository.
I've tracked it down to the segmentation fault in pack-objects.c while
running this command in the debugger:
gdb --args /usr/src/git/git-pack-objects.exe --local
--delta-base-offset .git/objects/pack/.tmp-14368-pack
--keep-true-parents --honor-pack-keep --non-empty --all --reflog
--indexed-objects --unpack-unreachable=2.weeks.ago --threads=1

It stops here:

#0  0x00007ff88b11de0e in ntdll!RtlLockHeap ()

   from C:\Windows\SYSTEM32\ntdll.dll

#1  0x00007ff88b11b7e4 in ntdll!RtlEnterCriticalSection ()

   from C:\Windows\SYSTEM32\ntdll.dll

#2  0x000000000047027c in oe_get_size_slow (pack=0x73fc20 <to_pack>,

    e=0x7ff5f7b03428) at builtin/pack-objects.c:1996

#3  0x000000000046ba27 in oe_set_size (pack=0x73fc20 <to_pack>,

    e=0x7ff5f7b03428, size=2987958784) at ./pack-objects.h:362

#4  0x000000000046f556 in check_object (entry=0x7ff5f7b03428)

    at builtin/pack-objects.c:1564

#5  0x000000000046ff63 in get_object_details () at builtin/pack-objects.c:1873

#6  0x0000000000471c11 in prepare_pack (window=10, depth=50)

    at builtin/pack-objects.c:2615

#7  0x0000000000474705 in cmd_pack_objects (argc=0, argv=0x2e30a48,

    prefix=0x0) at builtin/pack-objects.c:3491

#8  0x0000000000402e3b in run_builtin (p=0x680700 <commands+1728>, argc=12,

    argv=0x2e30a48) at git.c:421

#9  0x00000000004031f6 in handle_builtin (argc=12, argv=0x2e30a48)

    at git.c:653

#10 0x000000000040376b in cmd_main (argc=12, argv=0x2e30a48) at git.c:799

#11 0x00000000004bfb2f in main (argc=12, argv=0x2e30a48) at common-main.c:45


On the location builtin/pack-objects.c:1996 the code tries to set
read_lock (pthread_mutex_lock(&read_mutex)) and fails. I suspect that
read_mutex is not initialised yet. It is initialised in
init_threaded_search, which is called later in prepare_pack (through
ll_find_deltas).


Kind Regards,
Alex Netkachov

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Potential bug in pack-objects.c
  2019-01-21 22:10 Potential bug in pack-objects.c Alex Netkachov
@ 2019-01-22  7:29 ` Jeff King
  2019-01-22 15:33   ` Alex Netkachov
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2019-01-22  7:29 UTC (permalink / raw)
  To: Alex Netkachov; +Cc: git

On Mon, Jan 21, 2019 at 10:10:16PM +0000, Alex Netkachov wrote:

> On the location builtin/pack-objects.c:1996 the code tries to set
> read_lock (pthread_mutex_lock(&read_mutex)) and fails. I suspect that
> read_mutex is not initialised yet. It is initialised in
> init_threaded_search, which is called later in prepare_pack (through
> ll_find_deltas).

This sounds like the same bug being discussed in:

  http://public-inbox.org/git/20190118022736.36832-1-phogg@novamoon.net/

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Potential bug in pack-objects.c
  2019-01-22  7:29 ` Jeff King
@ 2019-01-22 15:33   ` Alex Netkachov
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Netkachov @ 2019-01-22 15:33 UTC (permalink / raw)
  To: Jeff King; +Cc: git

On Tue, 22 Jan 2019 at 07:29, Jeff King <peff@peff.net> wrote:
>
> On Mon, Jan 21, 2019 at 10:10:16PM +0000, Alex Netkachov wrote:
>
> > On the location builtin/pack-objects.c:1996 the code tries to set
> > read_lock (pthread_mutex_lock(&read_mutex)) and fails. I suspect that
> > read_mutex is not initialised yet. It is initialised in
> > init_threaded_search, which is called later in prepare_pack (through
> > ll_find_deltas).
>
> This sounds like the same bug being discussed in:
>
>   http://public-inbox.org/git/20190118022736.36832-1-phogg@novamoon.net/

It is exactly the same thing. Thank you. Hope it will be applied soon
and released.

Kind regards,
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-22 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 22:10 Potential bug in pack-objects.c Alex Netkachov
2019-01-22  7:29 ` Jeff King
2019-01-22 15:33   ` Alex Netkachov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).