libgit2 / libgit2/pygit2

Bugs in python backend

Open
#1,004 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
408
Avg merge
2d 57m
Merged PRs (30d)
7

Description

I am creating an issue rather than a PR because I have not been able to create a working Odb or Refdb backend, but I have found several bugs. Please let me know if I am completely misunderstanding this code.

I believe the issues I cannot get past come from threading in libgit2. I have found that, at times, calling threading.get_ident will cause a segfault. I have tried wrapping all C->python code in PyGILState_Ensure and PyGILState_Release, but this did not work.

I have found the following possible errors:

In my experience, problems like this mean that I am misusing something. Let me know if these appear to be real bugs and I will see if I can at least create test cases to expose them. I don't seem to have a good grasp on the threading segfaults though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the cited sections of src/odb_backend.c and src/refdb_backend.c, then reproduce the Odb and Refdb backend problems, including the reported libgit2 threading and GIL-related segfault. Done means each suspected bug is confirmed or ruled out with reproducible coverage and the findings are resolved or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.