LFS checksum bug #1119

Closed
opened 2025-11-02 03:49:15 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @TheRealPowerCoder on GitHub (Oct 4, 2017).

  • Gitea version (or commit ref): 339d7de409
  • Git version: 2.14.1
  • Operating system: Linux Alpine (Gitea Docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant
  • Log gist:

Description

Hello,

I was about to push our source code into our new repos (all clean) with LFS enabled. All except one repo could be pushed. The one repo returned an i/o timeout when uploading one specific LFS File.

I was able to recreate the problem by creating a completly new repo with .gitignore, .gitattributes and the problematic file. LFS wont upload the file to the server. Afterwards I shrunk the file size down to 17 bytes that still wont be pushed (see Client Side).

Server Side (Gitea, Docker)

[Macaron] 2017-10-04 14:21:17: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:21:18: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 138.252134ms
[Macaron] 2017-10-04 14:21:28: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:21:28: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 81.95643ms
[Macaron] 2017-10-04 14:21:38: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:21:38: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 86.223643ms
[Macaron] 2017-10-04 14:21:48: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:21:48: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 42.738494ms
[Macaron] 2017-10-04 14:21:58: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:21:58: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.895199ms
[Macaron] 2017-10-04 14:22:08: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:22:08: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 8.244827ms
[Macaron] 2017-10-04 14:22:18: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:22:18: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 6.07595ms
[Macaron] 2017-10-04 14:22:28: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:22:28: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.537536ms
[Macaron] 2017-10-04 14:22:38: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22
[Macaron] 2017-10-04 14:22:38: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.709606ms`

Client Side (Windows LFS 1.3.1)

$ git lfs push --all origin master
Git LFS: (0 of 1 files, 36 skipped) 153 B / 17 B, 1.36 MB skipped
LFS: Put http://192.168.254.191:3000/powercoder/test-
lfs/info/lfs/objects/f8051d7550d50d1ea25ad9f972055c43e67cae7e654ae3488ef40dcffa9141d4: read tcp 192.168.162.22:61993->192.168.254.191:3000: i/o timeout

with the file in question being test.ttf (17 Bytes; it once was a ttf file):

$ git lfs ls-files
f8051d7550 * test.ttf

test.ttf (Hex dump):

00 00 02 00 00 F0 00 00 00 01 00 00 00 00 00 00 00

test.zip

When changing any of the non-zero values to some different hex value, the files gets uploaded and the push completes successfully.

Expected output
The file being pushed. Tested with the https://github.com/git-lfs/lfs-test-server which accepts the file as-is, no questions asked. Gitea on the otherhand seems to bug out.

As I don't know how Gitea handles LFS files internally I can only guess it to be some sort of checksum error. My current workaround is not adding the file to LFS which is not a viable solution in the long run.

I tried https://try.gitea.io but there is no LFS to test my issue.
https://try.gitea.io/TheRealPowerCoder/lfs-test

Thanks.

Screenshots

Originally created by @TheRealPowerCoder on GitHub (Oct 4, 2017). - Gitea version (or commit ref): 339d7de409fae0502f970e1ddd73c2a046236407 - Git version: 2.14.1 - Operating system: Linux Alpine (Gitea Docker) - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes - [x] No - [ ] Not relevant - Log gist: ## Description Hello, I was about to push our source code into our new repos (all clean) with LFS enabled. All except one repo could be pushed. The one repo returned an _i/o timeout_ when uploading one specific LFS File. I was able to recreate the problem by creating a completly new repo with .gitignore, .gitattributes and the problematic file. LFS wont upload the file to the server. Afterwards I shrunk the file size down to 17 bytes that still wont be pushed (see Client Side). **Server Side (Gitea, Docker)** >[Macaron] 2017-10-04 14:21:17: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:21:18: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 138.252134ms > [Macaron] 2017-10-04 14:21:28: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:21:28: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 81.95643ms > [Macaron] 2017-10-04 14:21:38: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:21:38: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 86.223643ms > [Macaron] 2017-10-04 14:21:48: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:21:48: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 42.738494ms > [Macaron] 2017-10-04 14:21:58: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:21:58: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.895199ms > [Macaron] 2017-10-04 14:22:08: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:22:08: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 8.244827ms > [Macaron] 2017-10-04 14:22:18: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:22:18: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 6.07595ms > [Macaron] 2017-10-04 14:22:28: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:22:28: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.537536ms > [Macaron] 2017-10-04 14:22:38: Started POST /powercoder/test-lfs.git/info/lfs/objects/batch for 192.168.162.22 > [Macaron] 2017-10-04 14:22:38: Completed /powercoder/test-lfs.git/info/lfs/objects/batch 200 OK in 5.709606ms` **Client Side (Windows LFS 1.3.1)** > $ git lfs push --all origin master > Git LFS: (0 of 1 files, 36 skipped) 153 B / 17 B, 1.36 MB skipped > LFS: Put http://192.168.254.191:3000/powercoder/test- > lfs/info/lfs/objects/f8051d7550d50d1ea25ad9f972055c43e67cae7e654ae3488ef40dcffa9141d4: read tcp 192.168.162.22:61993->192.168.254.191:3000: i/o timeout with the file in question being test.ttf (17 Bytes; it once was a ttf file): > $ git lfs ls-files > f8051d7550 * test.ttf test.ttf (Hex dump): > 00 00 02 00 00 F0 00 00 00 01 00 00 00 00 00 00 00 [test.zip](https://github.com/go-gitea/gitea/files/1356476/test.zip) When changing any of the non-zero values to some different hex value, the files gets uploaded and the push completes successfully. **Expected output** The file being pushed. Tested with the [https://github.com/git-lfs/lfs-test-server](https://github.com/git-lfs/lfs-test-server) which accepts the file as-is, no questions asked. Gitea on the otherhand seems to bug out. As I don't know how Gitea handles LFS files internally I can only guess it to be some sort of checksum error. My current workaround is not adding the file to LFS which is not a viable solution in the long run. I tried [https://try.gitea.io](https://try.gitea.io) but there is no LFS to test my issue. [https://try.gitea.io/TheRealPowerCoder/lfs-test](https://try.gitea.io/TheRealPowerCoder/lfs-test) Thanks. ## Screenshots
GiteaMirror added the issue/criticaltype/bug labels 2025-11-02 03:49:15 -06:00
Author
Owner

@lafriks commented on GitHub (Nov 6, 2017):

Can not reproduce it with latest master version. File is accepted and uploaded successfully

@lafriks commented on GitHub (Nov 6, 2017): Can not reproduce it with latest master version. File is accepted and uploaded successfully
Author
Owner

@lafriks commented on GitHub (Jan 14, 2018):

Can this be closed as I see no way to fix such data in easy way and issue that produced them was fixed already in 1.3?

@lafriks commented on GitHub (Jan 14, 2018): Can this be closed as I see no way to fix such data in easy way and issue that produced them was fixed already in 1.3?
Author
Owner

@TheRealPowerCoder commented on GitHub (Jan 20, 2018):

As I am no longer able to reproduce this error because we since moved on from Gitea, this Issue can be closed as nobody else seems to be affected by this error (potentially fixed).

@TheRealPowerCoder commented on GitHub (Jan 20, 2018): As I am no longer able to reproduce this error because we since moved on from Gitea, this Issue can be closed as nobody else seems to be affected by this error (potentially fixed).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1119