Comment 0 for bug 2060310

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

On UC24 (noble based) I see warnings like this on boot:

Apr 05 14:36:55 qemuname systemd[1]: snapd.service: Got notification message from PID 1002, but reception only permitted for main PID 917
Apr 05 14:36:56 qemuname systemd[1]: snapd.service: Got notification message from PID 1039, but reception only permitted for main PID 917
Apr 05 14:36:56 qemuname systemd[1]: snapd.service: Got notification message from PID 1040, but reception only permitted for main PID 917

where PID XXXX is the snapd pid. This seems to happen because some process is sending requests to the systemd-notify socket while not being the main snapd PID. This can be reproduced in scenarios where snapd is reexeced, but not for instance if we stop snapd and socket and launch snapd from the command line.

On installation, quite a few of these happen, but they are seen also in run mode.

Adding "NotifyAccess=all" in snapd.service "fixes" the issue, but it is not clear if that is the right approach as we might be sending wrong notifications (like notifying a stop when snapd exits because another snapd process is already running).

So the right fix might be more in the direction of avoiding systemd notifications if not running as a service.

References:

[1] systemd-notify(1)
[2]