Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/exp/service/activity/{github,gerrit}: walkSegMail can fail with EOF #44

Open
dmitshur opened this issue Feb 2, 2021 · 1 comment

Comments

@dmitshur
Copy link
Member

dmitshur commented Feb 2, 2021

The following error was observed on 2021-02-02 11:15:

GitHub Activity Service: walkSegMail(github.fileSeg{file:"/2021-02.reclog", skip:0, size:4096}): truncated record at offset 0: EOF
Gerrit Activity Service: ok

Restarting fixed the issue.

It's looks like a possible race condition: the file length was determined to be 4096 bytes yet reading at offset 0 returned EOF. Maybe the file was still being written after being created, and the buffers weren't flushed?

@dmitshur
Copy link
Member Author

dmitshur commented Mar 1, 2023

This was observed again on 2023-03-01 12:38 AM UTC:

GitHub Activity Service: ok
Gerrit Activity Service: walkSegMail(gerrit.fileSeg{file:"/2023-03.reclog", skip:0, size:4096}): truncated record at offset 0: EOF

Like the last time, it happened at the very beginning of a new month. Perhaps this race can only happen under conditions when a new file is being created.

@dmitshur dmitshur changed the title internal/exp/service/activity/github: walkSegMail can fail with EOF internal/exp/service/activity/{github,gerrit}: walkSegMail can fail with EOF Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant