Assertion failure: e->refcount.val == 0 · Issue #4023 · libgit2/libgit2 · GitHub
Skip to content

Assertion failure: e->refcount.val == 0 #4023

Description

@alexcrichton

Reproduction steps

Unfortunately there's not a list of concrete steps for reproduction for this. I'm filing this to track a Cargo bug (rust-lang/cargo#3042) where libgit2 appears to be segfaulting. There's a few layers of indirection here to actually get to libgit2 itself, but I'm hoping that this is perhaps enough information to at least get started debugging! I can always ask for more info from the original source to explore reproduction steps as well if that'd be helpful.

It looks like the bug here though is that when Cargo has a git dependency and attempts to work with it over an NFS mount it appears to cause a segfault. The specific operation here seems to be freeing a repository causes a segfault. I'm unfortunately unsure, though, from the report what actually led up to that point.

cc @asomers, perhaps you can help provide more info here as well?

Expected behavior

No segfaults

Actual behavior

Segfaults! A stack trace from a segfault is here: rust-lang/cargo#3042 (comment)

Version of libgit2 (release number or SHA1)

I've asked to clarify what version of Cargo to learn specifically what sha we're using, but if it's a recent-ish Cargo I believe it's very close to c9e967a.

Operating system(s) tested

Looks like the error happens on both FreeBSD and Linux, but it specifically NFS related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions