git error: corrupted loose reference file: FETCH_HEAD when trying to mirror crates.io

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start with the run_server:pull:fetch path and the clone_or_open_repository and ktra::index_manager entries shown in the log. Reproduce the crates.io mirror operation and investigate the corrupted FETCH_HEAD reference; done means the index fetch completes without the reported Git error.

Written by the indexing model from the issue text.

Description

Dec 25 19:12:08.256 INFO run_server: ktra: crates directory: "crates"
Dec 25 19:12:08.257 INFO run_server🆕 ktra::db_manager::sled_db_manager: create and/or open database: "db"
Dec 25 19:12:08.262 DEBUG sled::pagecache::iterator: ordering before clearing tears: {0: 0}, max_header_stable_lsn: 0
Dec 25 19:12:08.262 DEBUG sled::pagecache::iterator: in clean_tail_tears, found missing item in tail: None and we'll scan segments {0: 0} above lowest lsn 0
Dec 25 19:12:08.263 DEBUG sled::pagecache::iterator: filtering out segments after detected tear at (lsn, lid) 132
Dec 25 19:12:08.263 DEBUG sled::pagecache::iterator: hit max_lsn 132 in iterator, stopping
Dec 25 19:12:08.263 DEBUG sled::pagecache::snapshot: zeroing the end of the recovered segment at lsn 0 between lids 133 and 524287
Dec 25 19:12:08.282 DEBUG sled::pagecache::blob_io: gc_blobs removing any blob with an lsn above 133
Dec 25 19:12:08.282 DEBUG sled::pagecache::segment: SA starting with tip 524288 stable -1 free {}
Dec 25 19:12:08.282 DEBUG sled::pagecache::iobuf: starting log at recovered active offset 133, recovered lsn 133
Dec 25 19:12:08.282 DEBUG sled::pagecache::iobuf: starting IoBufs with next_lsn: 133 next_lid: 133
Dec 25 19:12:08.282 DEBUG sled::pagecache: load_snapshot loading pages from 0..4
Dec 25 19:12:08.285 INFO run_server🆕clone_or_open_repository: ktra::index_manager: open index repository: "index"
Dec 25 19:12:08.302 INFO run_server:pull:fetch: ktra::index_manager: fetches latest commit from origin/main
Dec 25 19:12:11.630 DEBUG run_server: sled::pagecache::logger: IoBufs dropped
Error: git error: corrupted loose reference file: FETCH_HEAD; class=Reference (4)

Dominant language
Rust
Stars
432
Forks
35
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from moriturus/ktra

All issues in moriturus/ktra

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.