Error "failed to update size for mirror repository: updateSize: lstat [...] no such file or directory" #11551

Closed
opened 2025-11-02 09:40:49 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @pboguslawski on GitHub (Aug 28, 2023).

Description

Errors like

2023/08/27 17:07:40 ...irror/mirror_pull.go:308:runSync() [E] [64eb66a8-2] SyncMirrors [repo: 2:someorg/somerepo]: failed to update size for mirror repository: updateSize: lstat /path/to/repo/someorg/somerepo.git/objects/05/tmp_obj_Y5itXx: no such file or directory

rarely occur in gitea 1.19 while syncing mirror. No such problem on next mirror sync.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Compiled from source.

Database

MySQL

Originally created by @pboguslawski on GitHub (Aug 28, 2023). ### Description Errors like ``` 2023/08/27 17:07:40 ...irror/mirror_pull.go:308:runSync() [E] [64eb66a8-2] SyncMirrors [repo: 2:someorg/somerepo]: failed to update size for mirror repository: updateSize: lstat /path/to/repo/someorg/somerepo.git/objects/05/tmp_obj_Y5itXx: no such file or directory ``` rarely occur in gitea 1.19 while syncing mirror. No such problem on next mirror sync. ### Gitea Version 1.19.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Compiled from source. ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 09:40:49 -06:00
Author
Owner

@CaiCandong commented on GitHub (Aug 28, 2023):

Weird, the code already handles this situation
1e76a824bc/modules/repository/create.go (L300-L304)

@CaiCandong commented on GitHub (Aug 28, 2023): Weird, the code already handles this situation https://github.com/go-gitea/gitea/blob/1e76a824bcd71acd59cdfb2c4547806bc34b3d86/modules/repository/create.go#L300-L304
Author
Owner

@wxiaoguang commented on GitHub (Aug 28, 2023):

Because, the fix is incomplete

image

@wxiaoguang commented on GitHub (Aug 28, 2023): Because, the fix is incomplete ![image](https://github.com/go-gitea/gitea/assets/2114189/d5eeb62b-cfca-4a9f-8015-157405ab982a)
Author
Owner

@CaiCandong commented on GitHub (Aug 28, 2023):

But the message he got is the file doesn't exist

lstat /path/to/repo/someorg/somerepo.git/objects/05/tmp_obj_Y5itXx: no such file or directory

@CaiCandong commented on GitHub (Aug 28, 2023): But the message he got is the file doesn't exist > lstat /path/to/repo/someorg/somerepo.git/objects/05/tmp_obj_Y5itXx: no such file or directory
Author
Owner

@wxiaoguang commented on GitHub (Aug 28, 2023):

Yes, info.Info() calls lstat

@wxiaoguang commented on GitHub (Aug 28, 2023): Yes, `info.Info()` calls `lstat`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11551