/usr/lib/snapd/snapd:11:runtime:runtime:runtime:runtime:runtime

Bug #1824162 reported by errors.ubuntu.com bug bridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
High
Paweł Stołowski
snapd (Ubuntu)
Triaged
High
Unassigned

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding snapd. This problem was most recently seen with package version 2.38+18.10, the problem page at https://errors.ubuntu.com/problem/5e58e04cdc647a1fd50f71f02724dd0b5b8c1f4b contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

It looks like an udev/netlink related panic in snapd

Changed in snapd:
status: New → Triaged
importance: Undecided → High
Changed in snapd:
assignee: nobody → Paweł Stołowski (stolowski)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

I think the bug is in the go-udev package (upstream). The Monitor() function returns a 'quit' channel that the caller uses to stop processing. Monitor() runs a backgroud goroutine that monitors/reads from netlink socket and stops if quit channel is written to. I think the problem is that the quit channel is a buffered/non-blocking channel - writing to it and calling Close() on the netlink object right afterwards (which we do when stopping snapd) means we might be closing the socket and disposing the object when the background routine is reading netlink events.

The fix should be simple, I'll look at fixing it in our source tree (conviniently this dependency is forked under our project) and will carry the fix upstream.

Michael Vogt (mvo)
Changed in snapd (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Paweł Stołowski (stolowski) wrote :

The bug may occur regardless of experimental hotplug flag, and may prevent clean shutdown of snapd - of course only if there is udev netlink activity, therefore setting to critical.

Changed in snapd:
importance: High → Critical
Changed in snapd (Ubuntu):
importance: Medium → Critical
Revision history for this message
Paweł Stołowski (stolowski) wrote :

My initial conclusion about go-udev being the culprit was premature, the socket closing & quit channel code looks fine after all, the problem lies somewhere else and may be something in the go runtime stack and it's very unclear for the time being.

Changed in snapd (Ubuntu):
importance: Critical → Undecided
Changed in snapd:
importance: Critical → Undecided
Changed in snapd (Ubuntu):
status: In Progress → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
Changed in snapd:
importance: Undecided → High
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.