Skip to content

Stale .sync.lock after hard kill blocks future syncs #4

@kennethwolters

Description

@kennethwolters

If the ob process is hard-killed (SIGKILL, crash), a stale lock directory remains at <vault>/.obsidian/.sync.lock. Subsequent ob sync calls fail with "Another sync instance is already running" even though no instance is running. The lock does not self-expire.

Workaround

rmdir <vault>/.obsidian/.sync.lock

Running under systemd handles normal stop/restart (SIGTERM triggers clean shutdown which releases the lock). But unclean deaths still leave a stale lock.

Environment

  • OS: Linux (Ubuntu-based)
  • Node: 24.14.0
  • obsidian-headless: 0.0.3 (npm)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions