Specifying only the day in the timer string destabilizes snapd

Bug #1868007 reported by Mark M Evans on 2020-03-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Maciej Borzecki

Bug Description

   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

Mark M Evans (markmevans) wrote :
description: updated
Changed in snapd:
status: New → Triaged
Changed in snapd:
importance: Undecided → High

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers