Skip to content

[arch-updater][BUG] News timer fires every 10 s; health watchdog auto-disables the plugin when Arch news is enabled #382

Description

@UmedjonBA

Submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I am using the latest available version of Noctalia and of the plugin.
  • This is a bug in a community plugin, not in Noctalia itself.

Plugin

yuuto/arch-updater

Plugin version

1.1.0

Bug description

With check_arch_news enabled (the default), the Arch news check runs every ~10 seconds instead of once at startup and then every 6 hours. Each run is an HTTP request plus RSS parsing inside the service callback, and the repeated work eventually makes the callback exceed Noctalia's 25 ms CPU budget. After 5 errors/timeouts within 60 seconds the health watchdog auto-disables the whole plugin — on my machine reliably about 50 seconds after the shell starts, sometimes without any [ERR] lines in noctalia.log. From a user's point of view the plugin (and update checking with it) just silently stops working.

The cause is in service.luau, in update():

if sinceNewsCheck >= NEWS_RECHECK_HOURS * 3600 or sinceNewsCheck == AUTO_CHECK_DELAY then
    sinceNewsCheck = 0
    checkNews()
end

The == AUTO_CHECK_DELAY branch is meant to fire once, 10 ticks after startup. But the counter is reset to 0, so it climbs back to AUTO_CHECK_DELAY and the branch fires again every 10 seconds, forever.

Steps to reproduce

  1. Install and enable the plugin with default settings (check_arch_news on).
  2. Restart Noctalia.
  3. Wait about a minute: a critical notification appears and the plugin is auto-disabled by the health watchdog.

Expected behavior

The news feed is checked once shortly after startup and then every NEWS_RECHECK_HOURS; the plugin stays enabled.

Possible fix

Reset the counter back to AUTO_CHECK_DELAY instead of 0, so the startup branch can never re-fire:

if sinceNewsCheck == AUTO_CHECK_DELAY or sinceNewsCheck >= NEWS_RECHECK_HOURS * 3600 + AUTO_CHECK_DELAY then
    if sinceNewsCheck > AUTO_CHECK_DELAY then
        sinceNewsCheck = AUTO_CHECK_DELAY
    end
    checkNews()
end

I have been running the plugin with this fix for a while (news enabled) with no watchdog trips. I can send a PR with it.


A note on language: I don't speak English, so this issue was written with the help of AI translation. Sorry in advance for any awkward phrasing — the technical details above are verified on a real system.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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