Skip to content

🐛 Bug Report — Runtime APIs: alarm-scheduler fails for inscrutable reason #1386

Closed
@huw

Description

@huw

Sometimes when I schedule alarms in a Durable Object, I get the following error:

workerd/server/alarm-scheduler.c++:203: warning: exception = kj/filesystem.c++:304: failed: expected strlen(part.begin()) == part.size() [6 == 71]; NUL character in path component; part = ��zUdc5238b9�$�v$7559429.sqlite

I tried looking through the source code, but it’s very hard to determine why this is occurring, especially because I don’t think KJ is open source. The behaviour appears inconsistently (restarting usually fixes it), but if it helps the kinds of calls I’m making are:

  • Schedule around 500ms in the future
  • Schedule at the current date (via Temporal.Now.instant(), which uses Date.now() under the hood)

For both, I sometimes check for the presence of an existing alarm first, but not always. Any hints?

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