Skip to content

git clone always fails in proot (Android) guest — "remote did not send all necessary objects" (suspected Ubuntu 24.04 rseq regression) #112

Description

@zo-sol

Symptom

Inside the AgentNet app's proot guest (Android), every git clone fails. Not just our repo — an arbitrary public repo (octocat/Hello-World) fails the same way.

fatal: bad object <tip-commit-sha>
fatal: remote did not send all necessary objects

<tip-commit-sha> is always the HEAD commit SHA of the target branch. In other words, the pack is received, but at the connectivity-check stage git cannot find the tip object it should have just received.

Environment

Item Value
Guest Ubuntu 24.04.4 LTS (Noble) — proot-distro
rootfs /data/data/com.iqlabs.agentnet/files/rootfs
Host kernel Linux 6.1.162-android14 aarch64
git 2.43.0
arch arm64 / linux

Reproduction

git clone https://github.com/octocat/Hello-World.git    # ❌ bad object 7fd1a60b...
git clone --depth 1 https://github.com/IQCoreTeam/AgentNet.git   # ❌ bad object <head>

What it is NOT (ruled out empirically)

  • Not GitHub-side corruption / not a repo-specific problem — the unrelated octocat/Hello-World fails identically.
  • Not a transport (HTTP) problem — downloading the same repo as a tarball works fine (gh api repos/.../tarball/main → 1.2M extracts cleanly). HTTP is healthy; only the git smart-pack path is broken.
  • Not solved by multithreading/protocol-version tweakspack.threads=1, single branch / --depth 1, http.version=HTTP/1.1, filter=blob:none, protocol v0, etc. all fail the same way.

Likely cause — the upgrade to Ubuntu 24.04

The symptom lines up with when we recently switched the base image to Ubuntu 24.04. 24.04 ships glibc 2.39, where threads use the rseq (restartable sequences) syscall by default, and this is a known 24.04 regression that misbehaves under proot's ptrace emulation combined with the Android kernel. Since git index-pack uses threads for delta resolution, pack processing silently breaks → surfacing as "did not send all necessary objects". This exactly matches the tarball (a single HTTP stream) working fine.

Reference (one line): In the Termux / proot-distro community, the established workaround for this same family of breakage in Ubuntu 24.04 guests (random crashes, pack corruption) is GLIBC_TUNABLES=glibc.pthread.rseq=0 (disabling restartable sequences) — repeatedly confirmed in termux-packages / proot-distro issues.

Candidate fix to verify

# In the proot guest, disable rseq and retry the clone
GLIBC_TUNABLES=glibc.pthread.rseq=0 git clone https://github.com/octocat/Hello-World.git

If this works, add export GLIBC_TUNABLES=glibc.pthread.rseq=0 to the app image's shell profile (~/.profile / /etc/profile.d) so it applies by default to all mobile guests. (If it doesn't, roll the base image back to 22.04, or consider a native git path.)

Current workaround

git clone is blocked, but the source can still be obtained as a tarball — reading/building works. However, without .git, committing/pushing is impossible.

gh api repos/IQCoreTeam/AgentNet/tarball/main > /tmp/an.tar.gz
mkdir -p ~/AgentNet && tar xzf /tmp/an.tar.gz -C ~/AgentNet --strip-components=1

Impact

  • The source clone / contribution flow on phones (proot) is fully blocked (tarball read-only).
  • Affects all mobile users — the problem ships with the base image, so individual users cannot fix it. Requires an app-image-level fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions