#7136·libgit2

mmap with MAP_SHARED fails on GPFS, causing packed backend to fail

Author: HAOCHENYECreated Sep 21, 2025Updated Jul 18, 2026

mmap with MAP_SHARED fails on IBM GPFS, causing packed backend to fail

Summary

When using libgit2 on IBM GPFS (General Parallel File System), repositories with packed objects fail to load because the packed backend uses mmap with MAP_SHARED flag, which is not supported by GPFS.

Root Cause

The packed backend in libgit2 uses mmap with MAP_SHARED flag to map packed object files. However, IBM GPFS does not support the MAP_SHARED flag, causing mmap to fail.

Impact

This issue was discovered through the following call chain:

  • powerlevel10k zsh theme → gitstatus → libgit2 → packed backend → mmap with MAP_SHARED

The same repositories work perfectly fine on other file systems like local disk