From: "Lukas Sandström" <lukass@etek.chalmers.se>
To: git@vger.kernel.org
Cc: Alex Riesen <raa.lkml@gmail.com>, junkio@cox.net
Subject: Re: fix git-pack-redundant crashing sometimes
Date: Wed, 16 Nov 2005 00:13:14 +0100 [thread overview]
Message-ID: <437A6B8A.8060905@etek.chalmers.se> (raw)
In-Reply-To: <20051115223340.GA3951@steel.home>
Alex Riesen wrote:
> Lukas Sandström, Tue, Nov 15, 2005 22:41:34 +0100:
>
>>>>llist_sorted_difference_inplace didn't handle the match in the first
>>>>sha1 correctly and the lists went wild everywhere.
>>>
>>>This wasn't enough. It never (>5 min on 2.4GHz PIV) finishes on
>>>my local mirror of git, which has 22 packs by now.
>>
>>If the patch I just sent out doesn't fix the problem, and you don't
>
>
> Sorry, it doesn't. The code loops here:
>
> 401 /* find the permutations which contain all missing objects */
> 402 perm_all = perm = get_all_permutations(non_unique);
> 403 while (perm) {
> 404 if (is_superset(perm->pl, missing)) {
> 405 new_perm = xmalloc(sizeof(struct pll));
> 406 new_perm->pl = perm->pl;
> 407 new_perm->next = perm_ok;
> 408 perm_ok = new_perm;
> (gdb)
> 409 }
> 410 perm = perm->next;
> 411 }
> 412
> 413 if (perm_ok == NULL)
>
>
>
>>want to debug it yourself, could you please publish the .idx files
>>so I could have a look at them?
>
>
> Of course: http://home.arcor.de/fork0/download/idx.tar.gz
>
After giving it a quick look, I don't think it locks up. It is just horribly
slow. get_all_permutations returns (nice ASCII-art follows)
___n___
\
\ ____1____
n! * / k!(n-k)!
/______
k=1
permutations, which for your case (22 packs) adds up to 4194303.
I'll look into an optimization so we won't have to call is_superset
for every one of them.
OTOH, I might be wrong and it could very well be an infinite loop.
Mind running it over the night? I won't look further into this in
20 hours or so anyway.
next prev parent reply other threads:[~2005-11-15 23:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 23:09 git-pack-redundant returns the most containing pack Alex Riesen
2005-11-16 23:23 ` Lukas Sandström
2005-11-15 15:49 ` fix git-pack-redundant crashing sometimes Alex Riesen
2005-11-15 16:08 ` Timo Hirvonen
2005-11-15 16:11 ` Alex Riesen
2005-11-15 17:28 ` Linus Torvalds
2005-11-15 21:38 ` Lukas Sandström
2005-11-15 21:24 ` [PATCH] Fix llist_sorted_difference_inplace in git-pack-redundant Lukas Sandström
2005-11-15 21:34 ` fix git-pack-redundant crashing sometimes Alex Riesen
2005-11-15 21:41 ` Lukas Sandström
2005-11-15 22:33 ` Alex Riesen
2005-11-15 23:13 ` Lukas Sandström [this message]
2005-11-16 7:01 ` Alex Riesen
2005-11-16 21:11 ` Alex Riesen
2005-11-15 23:58 ` Linus Torvalds
2005-11-16 20:13 ` Junio C Hamano
2005-11-16 21:37 ` Lukas Sandström
2005-11-16 23:59 ` Lukas Sandström
2005-11-17 16:56 ` Matthias Urlichs
2005-11-17 7:08 ` Fredrik Kuivinen
2005-11-17 13:11 ` [PATCH] Make git-pack-redundant non-horribly slow on large sets of packs Lukas Sandström
2005-11-17 20:39 ` Alex Riesen
2005-11-18 16:30 ` [PATCH] Fix bug introduced by the latest changes to git-pack-redundant Lukas Sandström
2005-11-18 21:53 ` [PATCH] Fix a bug in get_all_permutations Lukas Sandström
2005-11-17 7:45 ` git-pack-redundant returns the most containing pack Alex Riesen
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=437A6B8A.8060905@etek.chalmers.se \
--to=lukass@etek.chalmers.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
/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).