Skip to content

aa/eventlog: fix WAL crash recovery#1567

Open
mmahut wants to merge 1 commit into
confidential-containers:mainfrom
mmahut:mmahut/wal
Open

aa/eventlog: fix WAL crash recovery#1567
mmahut wants to merge 1 commit into
confidential-containers:mainfrom
mmahut:mmahut/wal

Conversation

@mmahut

@mmahut mmahut commented Jul 18, 2026

Copy link
Copy Markdown

Crash recovery for the eventlog didn't work:

  • The WAL offset was written big-endian but read back little-endian,
    so recovery seeked to a wrong position.
  • The eventlog file was opened with O_APPEND, so the recovery seek did
    nothing and a half-written entry was never overwritten.
  • After reopening an existing log, the writer position started at 0
    instead of the end of the file.

Also use write_all() so short writes are not silently dropped, and
serialize the recovered entry the same way as the normal write path.

Fixes: #1566

@mmahut
mmahut requested a review from a team as a code owner July 18, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AA eventlog WAL crash recovery is broken

1 participant