Hello, I have a odd behaviour using a snap in a ubuntu core image… I can show you what happens using this barebone snap (I started from a more complex snap but it behaves in the same way):
name: pleasedonthang
base: core20
version: '0.1'
summary: shows a possible bug
description: this snap does nothing, but...
type: app
confinement: devmode
grade: devel
parts:
scripts:
plugin: nil
This snap compiles using “snapcraft” with no errors or warning, it gets installed fine in a ubuntu core 20, and as expected it does nothing at all.
Second step, I create a ubuntu core image with this standard model:
{
"type": "model",
"authority-id": "my id",
"brand-id": "my id",
"series": "16",
"model": "testmodel-amd64",
"architecture": "amd64",
"grade": "dangerous",
"snaps":
[
{
"default-channel": "20/beta",
"id": "UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH",
"name": "pc",
"type": "gadget"
},
{
"default-channel": "20/beta",
"id": "pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza",
"name": "pc-kernel",
"type": "kernel"
},
{
"default-channel": "latest/beta",
"id": "DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q",
"name": "core20",
"type": "base"
},
{
"default-channel": "latest/beta",
"id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4",
"name": "snapd",
"type": "snapd"
}
],
"base": "core20",
"timestamp": "2020-09-25T10:13:50+00:00"
}
everything works as expected.
But, if I add the snap to the image like this:
{
"type": "model",
"authority-id": "my id",
"brand-id": "my id",
"series": "16",
"model": "testmodel-amd64",
"architecture": "amd64",
"grade": "dangerous",
"snaps":
[
{
"default-channel": "20/beta",
"id": "UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH",
"name": "pc",
"type": "gadget"
},
{
"default-channel": "20/beta",
"id": "pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza",
"name": "pc-kernel",
"type": "kernel"
},
{
"default-channel": "latest/beta",
"id": "DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q",
"name": "core20",
"type": "base"
},
{
"default-channel": "latest/beta",
"id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4",
"name": "snapd",
"type": "snapd"
},
{
"name": "pleasedonthang",
"type": "app"
}
],
"base": "core20",
"timestamp": "2020-09-25T10:13:50+00:00"
}
… the system installs, but then it completely hangs with no information, only a cursor blinking.
My questions are:
- how can I debug a similar issue? There is no errors, no warnings, no login prompt, no network, no information on the console, only a blinking cursor; debugging looks very challenging
- why does it hang?
Thank you, Sandro