FullConnectivityChecker rejects a reachable historical tree used only as a thin-pack delta base

オープン
#316 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, java
領域
backend, devtools

調査の方向性

Start with FullConnectivityChecker.checkObjects around lines 191–196 in org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java and read the reproduction in repro/README.md. Run the supplied fixture to confirm the historical-base case fails while the current-tip and full-pack controls pass. Done means strict connectivity checking accepts all three valid packs, with focused tests covering the historical tree used as an omitted delta base.

索引モデルが issue の本文から書いたものです。

説明

Version

7.7

Operating System

Linux/Unix

Bug description

A valid thin pack is rejected when its omitted REF_DELTA base is a tree that
exists and is reachable through an ancestor of an advertised commit. The same
incoming graph is accepted when the base is the advertised commit's own tree,
or when the new tree is sent in full.

The attached repro/ is self-contained apart from a JDK, Python 3 and public
JGit dependency jars. It creates only synthetic objects in temporary bare
repositories, opens no existing repository and makes no network connection.
See repro/README.md for dependency versions and runner details. From repro/,
with the JDK and jars available at these relative example paths, run:

python3 run.py --jdk deps/jdk \
  --jgit deps/jgit.jar \
  --slf4j deps/slf4j-api-2.0.18.jar \
  --javaewah deps/JavaEWAH-1.1.12.jar \
  --commons-codec deps/commons-codec-1.18.0.jar

The fixture constructs this history, where arrows show chronological order:

A (tree T) --> B (tree U) --> C (tree V)
              advertised     incoming
  1. The receiving repository contains A and B; its only branch points to B.
    Trees T, U and V are distinct and reference the same already-present blob.
  2. The incoming pack contains commit C, whose parent is B, and tree V. V is
    encoded as a REF_DELTA against T; T is omitted from the pack.
  3. Before checking the pack, an independent positive ObjectWalk from B proves
    that T is reachable, and an object-database lookup proves that T exists.
  4. A real PackParser parses the thin pack with base-object tracking enabled.
    FullConnectivityChecker.checkConnectivity then runs with strict object
    checking and B as the sole advertised have.
  5. Repeat with U as the omitted delta base, then with V sent in full. Both
    control cases are accepted.

The historical tree T is needed only as a compression base: neither C nor V
directly references it. All objects in the incoming graph are available.

The failing public code path is
FullConnectivityChecker.checkObjects, lines 191–196.
It parses the omitted base successfully, then throws because that object lacks
the walk's UNINTERESTING flag. The independent positive walk demonstrates
that lack of this flag does not establish that the base is unreachable.

Actual behavior

The historical-base case throws MissingObjectException: Missing tree from
FullConnectivityChecker.checkObjects, line 196, even though the tree exists
and is reachable from the advertised have. The current-tip-base and full-pack
controls both succeed. The runner exits successfully only after observing
this false rejection and both successful controls.

Expected behavior

Accept all three valid packs. An omitted compression base that exists and is
reachable from an advertised have should pass strict connectivity checking,
including when that reachability runs through an older commit's tree.

Relevant log output
The following is synthetic reproduction output, not server operational logs.
The complete sanitized run is in `run-output.txt`.


checker=compiled-public-source
case=historical-base base-present=true historical-T-reachable-from-B=true
result=FALSE_REJECTION Missing tree bcfda9886b1e923fbc812abb731bc52742412303
at org.eclipse.jgit.internal.transport.connectivity.FullConnectivityChecker.checkObjects(FullConnectivityChecker.java:196)
case=current-tip-base base-present=true historical-T-reachable-from-B=true
result=ACCEPT
case=full-pack base-present=true historical-T-reachable-from-B=true
result=ACCEPT
PASS: false rejection reproduced; current-tip and full-pack controls accepted
Other information

Version

Public Eclipse JGit revision 182a140566592276ac94146b26cd43242b03965c
(stable-7.7 history); implementation version
v7.7.1.202607240634-r-33-g182a14056.

The reproduction compiles the unchanged public FullConnectivityChecker.java
from that revision and verifies that this compiled class is used. Source SHA-256:
c394cf7e18934f1a0853ce02125a194e34ecbd97e9abf3fb0dfd79ae23c939f2.
No checker patch is applied.

Operating System

Linux/Unix, OpenJDK 21.0.12.1. The recorded run used an isolated, non-root,
network-disabled container with a 512 MiB memory limit and swap disabled.

More

jgit-historical-thin-base-repro.zip

The same connectivity check was also observed rejecting a blob (Missing blob
from FullConnectivityChecker.checkObjects), with no reduced reproduction yet.

Duplicate checks on 2026-11-07 found these GitHub matches for Missing tree:

  • #291 concerns concurrent
    multi-pack-index lookups. This reproduction is single-threaded and uses no
    multi-pack index.
  • #311 concerns resolving
    promised objects. This reproduction has no promisor or partial clone, and
    the rejected tree is already present.
  • #122 concerns working-tree
    add/index behavior, rather than receive connectivity.

I also checked public searches for Missing tree and FullConnectivityChecker
on the Gerrit issue tracker.
No matching indexed issue was identified; the tracker's dynamic search results
could not be inspected, so this is not a claim that no duplicate exists there.

The older Gerrit issue 1582 is related. The public
root-tree marking change
describes an incoming commit that directly references the same root tree as
an advertised commit, with that tree omitted from the pack. That change was
reverted for performance reasons.
Here the advertised, incoming and historical root trees are all different;
the historical tree is used only as an omitted delta base, and rejection is
in the final base-object loop at line 196. This is a different reproduction
in the same reachability-marking family, potentially a follow-up to that issue,
rather than a claim of an unrelated new mechanism.

The attachments contain only public source and synthetic objects/output. No
private repository history, credentials, account identifiers, operational logs,
hostnames or implementation patch are included. This is a bug report and
reproduction; a code contribution would be a separate decision.

主要言語
Java
スター
427
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-jgit/jgit のほかの issue

eclipse-jgit/jgit の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。