Skip to content

A WARC abort can orphan a .tmp when back_finalize lazily reopens the writer #1060

Description

@xroche

Found during the review of #1046, and pre-existing rather than introduced by it.

warc_abort_opt nulls state.warc, but the teardown that follows (XH_uninitback_delete_allback_finalizewarc_write_backtransaction) can lazily reopen the writer at src/htswarc.c:1886, which orphans a .tmp. The normal teardown tail has the identical ordering (src/htswarc.c:2293 then :2298), which is what rules out #1046 as the cause.

Using a WARC_DISABLED sentinel instead of NULL closes both paths, since the lazy reopen cannot tell "never opened" from "deliberately abandoned".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions