GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve Tutorial to warn about `GitDB` object database · Issue #2065 · gitpython-developers/GitPython

Improve Tutorial to warn about GitDB object database #2065

New issue
Copy link
New issue
Copy link
Closed
#2115
Closed
Improve Tutorial to warn about GitDB object database#2065
#2115
Copy link
Labels
acknowledgedhelp wanted

Description

@sukima
sukima
opened on Aug 6, 2025
Issue body actions

I get a this error in our repo specifically with one commit which has 2064 files changed, 3030969 insertions(+).

Python 3.10.12 (main, May 27 2025, 17:12:29) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import git
>>> repo = git.Repo('/path/to/my-repo', odbt=git.GitDB)
>>> commit = repo.head.commit
>>> iterator = commit.tree.traverse()
>>> while True:
...   next(iterator)
... 
                                                                   … lots of output …
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/username/.local/lib/python3.10/site-packages/git/objects/util.py", line 575, in _traverse
    addToStack(stack, item, branch_first, next_d)
  File "/home/username/.local/lib/python3.10/site-packages/git/objects/util.py", line 535, in addToStack
    lst = self._get_intermediate_items(item)
  File "/home/username/.local/lib/python3.10/site-packages/git/objects/tree.py", line 209, in _get_intermediate_items
    return tuple(index_object._iter_convert_to_object(index_object._cache))
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/util.py", line 253, in __getattr__
    self._set_cache_(attr)
  File "/home/username/.local/lib/python3.10/site-packages/git/objects/tree.py", line 215, in _set_cache_
    ostream = self.repo.odb.stream(self.binsha)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/db/base.py", line 213, in stream
    return self._db_query(sha).stream(sha)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/db/pack.py", line 103, in stream
    return entity.stream_at_index(index)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/pack.py", line 784, in stream_at_index
    return self._object(None, True, index)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/pack.py", line 737, in _object
    streams = self.collect_streams_at_offset(offset)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/pack.py", line 871, in collect_streams_at_offset
    streams = self._pack.collect_streams(offset)
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/pack.py", line 609, in collect_streams
    ostream = pack_object_at(c, offset, True)[1]
  File "/home/username/.local/lib/python3.10/site-packages/gitdb/pack.py", line 86, in pack_object_at
    data = cursor.use_region(offset).buffer()
  File "/home/username/.local/lib/python3.10/site-packages/smmap/mman.py", line 133, in use_region
    self._region = man._obtain_region(self._rlist, offset, size, flags, False)
  File "/home/username/.local/lib/python3.10/site-packages/smmap/mman.py", line 521, in _obtain_region
    self._collect_lru_region(window_size)
  File "/home/username/.local/lib/python3.10/site-packages/smmap/mman.py", line 338, in _collect_lru_region
    lru_region.increment_client_count(-1)
  File "/home/username/.local/lib/python3.10/site-packages/smmap/util.py", line 179, in increment_client_count
    self.release()
  File "/home/username/.local/lib/python3.10/site-packages/smmap/util.py", line 187, in release
    self._mf.close()
BufferError: cannot close exported pointers exist
>>> 
Reacted by Eliah Kagan

Activity

  1. Byron commented on Aug 7, 2025

    @Byron
    Byron
    on Aug 7, 2025
    Member
    More actions

    Do not use the GitDB, it cannot be trusted.
    One must use the GitCmdObjectDB which will have way better performance as a side-effect.

    A PR to put a warning label into the docs is very welcome.

    Reacted by Devin Weaver, Cao Yi and Eliah Kagan
  2. Byron
    closed this as not plannedon Aug 7, 2025
  3. Byron commented on Aug 7, 2025

    @Byron
    Byron
    on Aug 7, 2025
    Member
    More actions

    Actually, let's leave this open and solicit a PR to improve the docs.

    Reacted by Eliah Kagan
  4. Byron
    reopened this on Aug 7, 2025
  5. Byron
    added
    acknowledged
    on Aug 7, 2025
  6. Byron
    changed the title [-]"BufferError: cannot close exported pointers exist" with large commit[/-] [+]Improve Tutorial to warn about `GitDB` object database[/+] on Aug 7, 2025
  7. Byron
    added
    help wanted
    on Aug 7, 2025
  8. mvanhorn
    added a commit that references this issue on Mar 22, 2026

    docs: warn about GitDB performance with large commits

    This issue will close once commit 859ea95 is merged into the 'main' branch.
    859ea95
  9. Byron
    closed this as completedin #2115on Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.