Skip to content

hosts stuck in refresh when inotify limit is reached #143

@stbuehler

Description

@stbuehler

When the system inotify limit is reached hosts are stuck in the refresh state.

Some node based applications are known to trigger the inotify limit (see microsoft/vscode#7950).

I see no real need for apt-dater to rely on inotify. The internal event system ("refresh finished") should not rely on it at all.

For the record, you see something like this in strace for one thread over and over:

inotify_add_watch(7, "/home/XXX/.cache/apt-dater/stats", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOSPC (No space left on device)
inotify_add_watch(7, "/home/XXX/.cache/apt-dater/tmux", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOSPC (No space left on device)
[...]
inotify_add_watch(7, "/home/XXX/.cache/apt-dater/stats", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOSPC (No space left on device)
inotify_add_watch(7, "/home/XXX/.cache/apt-dater/tmux", IN_MODIFY|IN_ATTRIB|IN_CLOSE_WRITE|IN_MOVED_FROM|IN_MOVED_TO|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_ONLYDIR) = -1 ENOSPC (No space left on device)
poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}], 2, 3997) = 0 (Timeout)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions