Specifying only the day in the timer string destabilizes snapd

Bug #1868007 reported by Mark M Evans
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Maciej Borzecki

Bug Description

apps:
  destroy-snapd:
   daemon: oneshot
   command: bin/do-nothing
   timer: sat # <------ Totally borks snapd

Attempting to install a snap with the above timer string will cause snapd to quickly run out of memory. The install will fail but snapd will now be stuck in a cycle of consuming all memory and restarting. Rebooting does not resolve the problem.

# Tested Build Environment

## MacOS
 * Catalina (10.15.3 (19D76))
 * snapcraft (3.9.1)
 * multipass (1.1.0+mac)

## Tested Runtime Environment

 Ubuntu Core 16

    caracalla 16.04-1.38 52 stable canonical✓ gadget
    caracalla-kernel 4.4.0-176.206 127 stable canonical✓ kernel
    core 16-2.43.3 8689 stable canonical✓ core

Example project: https://github.com/markmevans/day-only-timer-bug

Revision history for this message
Mark M Evans (markmevans) wrote :
description: updated
Changed in snapd:
status: New → Triaged
Changed in snapd:
importance: Undecided → High
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

This is likely a bug in snapd. We cover plenty of edge cases for the timer schedules, but obviously missed the simplest one for the service times. In this particular case, the systemd timer snapd wrote did not have any `OnCalendar` entries. Systemd 245 rejects such unit, but older versions might have done something weird.

Opened a PR with a fix to snapd: https://github.com/snapcore/snapd/pull/8333

Changed in snapd:
status: Triaged → In Progress
assignee: nobody → Maciej Borzecki (maciek-borzecki)
Changed in snapd:
status: In Progress → Fix Committed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This was fixed in snapd 2.44.2, marking as such.

Changed in snapd:
milestone: none → 2.44
status: Fix Committed → Fix Released
milestone: 2.44 → 2.44.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.