overlapping bool-files slot bricking device

Bug #1835572 reported by Ondrej Kubik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Undecided
Unassigned

Bug Description

snap version 2.39.3

After testing gadget snap with malformed bool-file slot overlapping with existing GPIO slot
e.g.
    gpio-426:
        interface: gpio
        number: 426
    bool-file-426:
        interface: bool-file
        path: /sys/class/gpio/gpio426/value

gadget install fails following change error:
Status Spawn Ready Summary
Done today at 15:01 UTC today at 15:01 UTC Ensure prerequisites for "gadget-1234" are available
Undone today at 15:01 UTC today at 15:01 UTC Prepare snap "/var/lib/snapd/snaps/.local-install-535988229" (unset)
Undone today at 15:01 UTC today at 15:01 UTC Mount snap "gadget-1234" (unset)
Undone today at 15:01 UTC today at 15:01 UTC Run pre-refresh hook of "gadget-1234" snap if present
Undone today at 15:01 UTC today at 15:01 UTC Stop snap "gadget-1234" services
Undone today at 15:01 UTC today at 15:01 UTC Remove aliases for snap "gadget-1234"
Undone today at 15:01 UTC today at 15:01 UTC Make current revision for snap "gadget-1234" unavailable
Done today at 15:01 UTC today at 15:01 UTC Update assets from gadget "gadget-1234" (unset)
Undone today at 15:01 UTC today at 15:01 UTC Copy snap "gadget-1234" data
Error today at 15:01 UTC today at 15:01 UTC Setup snap "gadget-1234" (unset) security profiles
Hold today at 15:01 UTC today at 15:01 UTC Make snap "gadget-1234" (unset) available to the system
Hold today at 15:01 UTC today at 15:01 UTC Automatically connect eligible plugs and slots of snap "gadget-1234"
Hold today at 15:01 UTC today at 15:01 UTC Set automatic aliases for snap "gadget-1234"
Hold today at 15:01 UTC today at 15:01 UTC Setup snap "gadget-1234" aliases
Hold today at 15:01 UTC today at 15:01 UTC Run post-refresh hook of "gadget-1234" snap if present
Hold today at 15:01 UTC today at 15:01 UTC Start snap "gadget-1234" (unset) services
Hold today at 15:01 UTC today at 15:01 UTC Clean up "gadget-1234" (unset) install
Hold today at 15:01 UTC today at 15:01 UTC Run configure hook of "gadget-1234" snap if present
Hold today at 15:01 UTC today at 15:01 UTC Run health check of "gadget-1234" snap

......................................................................
Setup snap "gadget-1234" (unset) security profiles

2019-07-05T15:01:15Z ERROR cannot setup systemd for snap "gadget-1234": cannot obtain systemd services for snap "gadget-1234": interface requires conflicting system needs
2019-07-05T15:01:16Z ERROR cannot obtain systemd services for snap "gadget-1234": interface requires conflicting system needs

Consequently also refresh of app snap using gpio plug fails for same reason

change error: snap change 105
Status Spawn Ready Summary
Done today at 15:11 UTC today at 15:11 UTC Ensure prerequisites for "shb-zigbee-host" are available
Undone today at 15:11 UTC today at 15:11 UTC Prepare snap "/var/lib/snapd/snaps/.local-install-333395958" (unset)
Undone today at 15:11 UTC today at 15:11 UTC Mount snap "shb-zigbee-host" (unset)
Undone today at 15:11 UTC today at 15:11 UTC Run pre-refresh hook of "shb-zigbee-host" snap if present
Undone today at 15:11 UTC today at 15:11 UTC Stop snap "shb-zigbee-host" services
Undone today at 15:11 UTC today at 15:11 UTC Remove aliases for snap "shb-zigbee-host"
Undone today at 15:11 UTC today at 15:11 UTC Make current revision for snap "shb-zigbee-host" unavailable
Undone today at 15:11 UTC today at 15:11 UTC Copy snap "shb-zigbee-host" data
Error today at 15:11 UTC today at 15:11 UTC Setup snap "shb-zigbee-host" (unset) security profiles
Hold today at 15:11 UTC today at 15:11 UTC Make snap "shb-zigbee-host" (unset) available to the system
Hold today at 15:11 UTC today at 15:11 UTC Automatically connect eligible plugs and slots of snap "shb-zigbee-host"
Hold today at 15:11 UTC today at 15:11 UTC Set automatic aliases for snap "shb-zigbee-host"
Hold today at 15:11 UTC today at 15:11 UTC Setup snap "shb-zigbee-host" aliases
Hold today at 15:11 UTC today at 15:11 UTC Run post-refresh hook of "shb-zigbee-host" snap if present
Hold today at 15:11 UTC today at 15:11 UTC Start snap "shb-zigbee-host" (unset) services
Hold today at 15:11 UTC today at 15:11 UTC Clean up "shb-zigbee-host" (unset) install
Hold today at 15:11 UTC today at 15:11 UTC Run configure hook of "shb-zigbee-host" snap if present
Hold today at 15:11 UTC today at 15:11 UTC Run health check of "shb-zigbee-host" snap

......................................................................
Setup snap "shb-zigbee-host" (unset) security profiles

2019-07-05T15:11:34Z ERROR cannot setup systemd for snap "gadget-1234": cannot obtain systemd services for snap "gadget-1234": interface requires conflicting system needs
2019-07-05T15:11:35Z ERROR cannot obtain systemd services for snap "gadget-1234": interface requires conflicting system needs

Problem is persistent over reboot

Revision history for this message
Samuele Pedroni (pedronis) wrote :

What behavior do you expect here? this to work? the device to work not brick but not have those slots? to detect this somehow when building the gadget?

Changed in snappy:
status: New → Confirmed
Revision history for this message
Ondrej Kubik (ondrak) wrote :

@pedronis
I think flagging at image build time is enough.
Admittedly this is silly bug on gadget snap side.
Usually pain to debug those errors is when device refuses to boot first time, so there is no user to look around. For this we should run some sanity check at image build time

Regardless this is not critical or high priority bug

Michael Vogt (mvo)
affects: snappy → snapd
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.