From: Mike Hommey <mh@glandium.org>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Gerrit Pape <pape@smarden.org>, git@vger.kernel.org
Subject: Re: git-http-fetch segfault, curl 7.18.0
Date: Sun, 2 Mar 2008 21:33:44 +0100 [thread overview]
Message-ID: <20080302203344.GA8760@glandium.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0803021508340.19665@iabervon.org>
On Sun, Mar 02, 2008 at 03:20:17PM -0500, Daniel Barkalow wrote:
> > And the problem lies in the fact we run_active_slot() during cleanup,
> > which can end up going through all the slots starting at
> > active_queue_head, while we have freed the first slots...
> >
> > Now, why do we need to run slots when cleaning up ?
>
> AFAICT, it's always been that way. I assume there was code that set up all
> of the remaining transfers and then just called http_cleanup, relying on
> the callbacks to handle the receipt of the remaining data, but I'm not
> sure if that's still the case.
It doesn't look like it is stil the case.
> On the other hand, I think that code is
> supposed to remove slots from the active queue as they get processed, so
> that run_active_slot() is always safe to call and just won't do anything
> if it's not needed in cleanup.
>
> So I'm guessing that we have list corruption due to code getting careless
> in error cases, in addition to cleanup code that possibly cares too much
> about finishing everything it can.
That's in fill_active_slots that it's trying to go through all slots
starting at active_queue_head, which is likely to be freed at this
point. The fix I sent earlier just throws all active slots, which should
just be fine now.
Mike
next prev parent reply other threads:[~2008-03-02 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-02 19:08 git-http-fetch segfault, curl 7.18.0 Gerrit Pape
2008-03-02 19:23 ` Mike Hommey
2008-03-02 20:03 ` Mike Hommey
2008-03-02 20:20 ` Daniel Barkalow
2008-03-02 20:33 ` Mike Hommey [this message]
2008-03-02 20:28 ` [PATCH] Fix random crashes in http_cleanup() Mike Hommey
2008-03-03 10:01 ` Gerrit Pape
2008-03-03 19:30 ` [PATCH v2] " Mike Hommey
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=20080302203344.GA8760@glandium.org \
--to=mh@glandium.org \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=pape@smarden.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).