Correlating this with dmesg shows some kernel errors:

Jul 14 13:07:23 autopkgtest /usr/lib/snapd/snapd[2079]: taskrunner.go:238: 
DEBUG: Running task 17 on Do: Mount snap "basic-service"
Jul 14 13:07:23 autopkgtest systemd[1]: Mounting Mount unit for basic-service...
Jul 14 13:07:23 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:07:23 autopkgtest kernel: blk_update_request: I/O error, dev loop0, 
sector 0
Jul 14 13:07:23 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:07:23 autopkgtest kernel: blk_update_request: I/O error, dev loop0, 
sector 0
Jul 14 13:07:23 autopkgtest kernel: Buffer I/O error on dev loop0, logical 
block 0, async page read
Jul 14 13:07:23 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:07:23 autopkgtest kernel: blk_update_request: I/O error, dev loop0, 
sector 0
Jul 14 13:07:23 autopkgtest kernel: Buffer I/O error on dev loop0, logical 
block 0, async page read
Jul 14 13:07:23 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:07:23 autopkgtest kernel: blk_update_request: I/O error, dev loop0, 
sector 0
Jul 14 13:07:23 autopkgtest kernel: Buffer I/O error on dev loop0, logical 
block 0, async page read
Jul 14 13:07:23 autopkgtest systemd[1]: Mounted Mount unit for basic-service.
Jul 14 13:07:23 autopkgtest /usr/lib/snapd/snapd[2079]: taskrunner.go:238: 
DEBUG: Running task 18 on Do: Copy snap "basic-service" data
Jul 14 13:07:23 autopkgtest systemd[1]: Mounting Mount unit for 
basic-binaries...
Jul 14 13:07:23 autopkgtest /usr/lib/snapd/snapd[2079]: taskrunner.go:238: 
DEBUG: Running task 19 on Do: Setup snap "basic-service" secu
Jul 14 13:07:23 autopkgtest mount[2202]: mount: special device 
/var/lib/snapd/snaps/basic-binaries_x1.snap does not exist
Jul 14 13:07:23 autopkgtest systemd[1]: snap-basic\x2dbinaries-x1.mount: Mount 
process exited, code=exited status=32
Jul 14 13:07:23 autopkgtest systemd[1]: Failed to mount Mount unit for 
basic-binaries.
Jul 14 13:07:23 autopkgtest systemd[1]: snap-basic\x2dbinaries-x1.mount: Unit 
entered failed state.

this looks like the squashfs might be invalid, or not completely written
yet or similar? After the test run finishes, the snap is installed:

 $ snap list
Name         Version               Rev  Developer  Notes
basic        1.0                   x1              -

and mounted

relatime)
/var/lib/snapd/snaps/basic-service_x1.snap on /snap/basic-service/x1 type 
squashfs (ro,relatime)

and the unit succeeded:

$ systemctl status 'snap-basic\x2dservice-x1.mount'
● snap-basic\x2dservice-x1.mount - Mount unit for basic-service
   Loaded: loaded (/proc/self/mountinfo; enabled; vendor preset: enabled)
   Active: active (mounted) since Thu 2016-07-14 13:09:13 CEST; 7min ago
    Where: /snap/basic-service/x1
     What: /dev/loop2
   CGroup: /system.slice/snap-basic\x2dservice-x1.mount

Jul 14 13:09:13 autopkgtest systemd[1]: Mounting Mount unit for basic-service...
Jul 14 13:09:13 autopkgtest systemd[1]: Mounted Mount unit for basic-service.

so quite obviously a later test does this again. This is also reflected
in the journal:

Jul 14 13:09:12 autopkgtest systemd[1]: Mounting Mount unit for basic...
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest kernel: blk-mq: bad return on queue: -5
Jul 14 13:09:12 autopkgtest systemd[1]: Mounted Mount unit for basic.


This only affects the first run, re-running 
/tmp/autopkgtest.*/integrationtests-artifacts/build/src/github.com/snapcore/snapd/tests.test
 in the existing testbed works fine.

However, as I don't really have any idea what's going on here:

 * Where do you get this "basic.snap" from? It's not anywhere in the
store nor in /tmp/. This should be installed directly (without the
previous test suite stuff) in a fresh VM to  see if that reproduces the
bug. Or maybe that first mounting actually happens during *building* the
snap instead of installing. Please tell me what the test suite does
here.

 * How can you tell it to just run a single test, or immediately stop
after the first failure? tests.test has no --help, -help or anything,
and running it without arguments also just hangs. With that you could
reduce the problem to one test case that immediately stops after the
mount error, then the .snap/.squashfs can be inspected.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1599799

Title:
  snapd > 2.0.2 fails on yakkety

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1599799/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to