Skip to content

Daemon: event loop ignores POLLERR/POLLHUP #119

Description

@kavau

The daemon's event loop dispatches on POLLIN only and never examines POLLERR, POLLHUP or POLLNVAL. poll() reports those regardless, they never get cleared, so once a descriptor enters an error state the loop spins at 100% CPU. This can happen e.g. on a D-Bus restart or on a stale seat timer fd.

Fix: check and handle the above error conditions. In most cases disabling the fd will be good enough; on a D-Bus failure shutdown and rely on restart via systemd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:daemonDaemon core: event loop, signal handling, main.c wiringbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions