In my first attempt I didn't use --devmode. However, I can't seem to make the snap work in a xenial amd64 VM.
I tried the original snap with: $ sudo snap install --devmode ./snappy-tests_0.1_amd64.snap $ snappy-tests -check.f homeInterfaceSuite ... ... Error reading config: open integration-tests/data/output/testconfig.json: no such file or directory I then created a new snap with: $ sudo apt-get install snapcraft $ sudo unsquashfs /var/lib/snapd/snaps/snappy-tests_100001.snap $ sudo vi ./squashfs-root/command-snappy-tests.wrapper adjust to be: export GOPATH=$SNAP_USER_DATA/go mkdir "$GOPATH" $ adjust ./squashfs-root/snap.yaml adjust version to be: 0.1+jdstrand1 $ sudo snap install --devmode ./snappy-tests_0.1+jdstrand1_amd64.snap sudo systemctl stop snappy-autopilot.timer sudo: no tty present and no askpass program specified panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x53b74f] goroutine 1 [running]: panic(0x94a020, 0xc8200100e0) /usr/lib/go-1.6/src/runtime/panic.go:464 +0x3e6 gopkg.in/check%2ev1.(*methodType).PC(0x0, 0x5544e6) /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/check.go:60 +0x4f gopkg.in/check%2ev1.(*C).logCaller(0xc8200e61e0, 0x3) /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/check.go:284 +0xa1 gopkg.in/check%2ev1.(*C).internalCheck(0xc8200e61e0, 0x9f39b8, 0x6, 0x9cda80, 0xc8201970c0, 0x7feac3fb2568, 0xc820026028, 0xc82004fd88, 0x0, 0x1, ...) /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/helpers.go:216 +0xeaf gopkg.in/check%2ev1.(*C).Assert(0xc8200e61e0, 0x9cda80, 0xc8201970c0, 0x7feac3fb2568, 0xc820026028, 0xc82004fd88, 0x1, 0x1) /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/helpers.go:173 +0x8c github.com/ubuntu-core/snappy/integration-tests/testutils/cli.ExecCommand(0xc8200e61e0, 0xc820013b40, 0x4, 0x4, 0x0, 0x0) /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/github.com/ubuntu-core/snappy/integration-tests/testutils/cli/cli.go:42 +0x306 snappy/integration-tests/tests.init.1() /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/snappy/integration-tests/tests/base_test.go:55 +0x16d snappy/integration-tests/tests.init() /home/plars/work/snappy/snappy-tests/parts/snappy-tests/go/src/snappy/integration-tests/tests/writablePaths_test.go:107 +0x10c4 main.init() snappy/integration-tests/tests/_test/_testmain.go:56 +0x4a I then tried to build it myself: $ sudo apt-get install git snapcraft $ export GOPATH=$HOME/work $ mkdir $GOPATH $ export PATH=$PATH:$GOPATH $ git clone https://github.com/plars/snappy-tests.git $ cd snappy-tests $ snapcraft (this may fail; if it does, keep trying until it succeeds per IRC) ... $ sudo snap install --devmode ./snappy-tests_0.1_amd64.snap $ snappy-tests -check.f homeInterfaceSuite sudo systemctl stop snappy-autopilot.timer sudo: no tty present and no askpass program specified panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x531c3f] goroutine 1 [running]: panic(0x928e60, 0xc8200100f0) /usr/lib/go-1.6/src/runtime/panic.go:464 +0x3e6 gopkg.in/check%2ev1.(*methodType).PC(0x0, 0x52ab16) /home/jamie/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/check.go:60 +0x4f gopkg.in/check%2ev1.(*C).logCaller(0xc8200da000, 0x3) /home/jamie/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/check.go:284 +0xa1 gopkg.in/check%2ev1.(*C).internalCheck(0xc8200da000, 0x9cf2e0, 0x6, 0x9a9800, 0xc8201a0c00, 0x7f7be51ec590, 0xc820024028, 0xc82004dd70, 0x0, 0x1, ...) /home/jamie/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/helpers.go:216 +0xeaf gopkg.in/check%2ev1.(*C).Assert(0xc8200da000, 0x9a9800, 0xc8201a0c00, 0x7f7be51ec590, 0xc820024028, 0xc82004dd70, 0x1, 0x1) /home/jamie/snappy-tests/parts/snappy-tests/go/src/gopkg.in/check.v1/helpers.go:173 +0x8c github.com/ubuntu-core/snappy/integration-tests/testutils/cli.ExecCommand(0xc8200da000, 0xc820013840, 0x4, 0x4, 0x0, 0x0) /home/jamie/snappy-tests/parts/snappy-tests/go/src/github.com/ubuntu-core/snappy/integration-tests/testutils/cli/cli.go:42 +0x306 snappy/integration-tests/tests.init.1() /home/jamie/snappy-tests/parts/snappy-tests/go/src/snappy/integration-tests/tests/base_test.go:56 +0x16d snappy/integration-tests/tests.init() /home/jamie/snappy-tests/parts/snappy-tests/go/src/snappy/integration-tests/tests/writablePaths_test.go:107 +0xce8 main.init() snappy/integration-tests/tests/_test/_testmain.go:56 +0x4a I'm not sure what to do at this point. It seems like adjusting the GOPATH and creating the dir in your snap will resolve the first issue, but then run into the next issues. Paul, can you provide precise steps on how to reproduce? ** Changed in: apparmor (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apparmor in Ubuntu. https://bugs.launchpad.net/bugs/1579135 Title: kernel BUG on snap disconnect from within a snap Status in apparmor package in Ubuntu: Incomplete Bug description: First, a bit of background: I've built a go binary of the upstream snappy integration tests, and built them into a snap so that we can easily keep them up to date, and call them from other test suites. I'm running through the tests in qemu on a current 16 image (built yesteray), and hitting this most of the time with the homeInterface Suite tests in particular. The networkInterfaceSuite tests also seem to produce a similar problem: sudo snap connect home-consumer:home ubuntu-core:home [/] Connect home-consumer:home to ubuntu-core:home home-consumer.writer /home/ubuntu/snap/snappy-tests/100001/writable sudo snap disconnect home-consumer:home ubuntu-core:home [ 519.416354] BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 [ 519.417327] IP: [<ffffffff81388eef>] profile_cmp+0x2f/0x180 [ 519.417978] PGD 1f26a067 PUD 1aa4f067 PMD 0 [ 519.418574] Oops: 0000 [#1] SMP [ 519.419032] Modules linked in: kvm_intel joydev kvm ppdev snd_pcm snd_timer irqbypass snd soundcore parport_pc pcspkr input_leds floppy parport evbug psmouse e1000 8250_fintek i2c_piix4 mac_hid pata_acpi serio_raw autofs4 nls_iso8859_1 usb_storage ahci libahci squashfs [ 519.422747] CPU: 0 PID: 1915 Comm: apparmor_parser Tainted: G W 4.4.0-21-generic #37-Ubuntu [ 519.423689] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 519.424627] task: ffff88001d23cb00 ti: ffff88001b58c000 task.ti: ffff88001b58c000 [ 519.425385] RIP: 0010:[<ffffffff81388eef>] [<ffffffff81388eef>] profile_cmp+0x2f/0x180 [ 519.426242] RSP: 0018:ffff88001b58fcb0 EFLAGS: 00010086 [ 519.426791] RAX: 0000000000000000 RBX: ffff88001b1b1400 RCX: 0000000000000006 [ 519.427628] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009 [ 519.428405] RBP: ffff88001b58fcc0 R08: 000000000000000a R09: 0000000000000274 [ 519.429127] R10: ffff88001f236890 R11: 0000000000000274 R12: 0000000000000000 [ 519.429956] R13: 000000000000000b R14: 0000000000000000 R15: ffff88001abff950 [ 519.430957] FS: 00007f0c1609b740(0000) GS:ffff88001fc00000(0000) knlGS:0000000000000000 [ 519.432256] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 519.433030] CR2: 0000000000000038 CR3: 000000001b14b000 CR4: 00000000000006f0 [ 519.433868] Stack: [ 519.434204] 000000000000000c ffff88001abff9b0 ffff88001b58fd08 ffffffff8138a0c3 [ 519.435355] 000000011f2b9450 ffff88000000000c ffff88001abff950 ffff88001b1b1760 [ 519.436480] ffff88001f236848 ffff88001abff900 ffff88001f236840 ffff88001b58fd98 [ 519.437609] Call Trace: [ 519.438007] [<ffffffff8138a0c3>] aa_vec_unique+0x163/0x240 [ 519.438709] [<ffffffff8138e337>] __aa_labelset_update_subtree+0x687/0x820 [ 519.439537] [<ffffffff813811fb>] aa_replace_profiles+0x59b/0xb70 [ 519.440268] [<ffffffff811ec5ae>] ? __kmalloc+0x22e/0x250 [ 519.440944] [<ffffffff81375f1f>] policy_update+0x9f/0x1f0 [ 519.441617] [<ffffffff81376083>] profile_replace+0x13/0x20 [ 519.442299] [<ffffffff8120bf38>] __vfs_write+0x18/0x40 [ 519.443032] [<ffffffff8120c8c9>] vfs_write+0xa9/0x1a0 [ 519.443721] [<ffffffff8120b85f>] ? do_sys_open+0x1bf/0x2a0 [ 519.444416] [<ffffffff8120d585>] SyS_write+0x55/0xc0 [ 519.445042] [<ffffffff818244f2>] entry_SYSCALL_64_fastpath+0x16/0x71 [ 519.445802] Code: 00 55 48 85 ff 48 89 e5 41 54 53 49 89 f4 48 89 fb 0f 84 8b 00 00 00 4d 85 e4 0f 84 aa 00 00 00 48 83 7b 38 00 0f 84 c9 00 00 00 <49> 83 7c 24 38 00 0f 84 e8 00 00 00 48 83 7b 08 00 0f 84 07 01 [ 519.451336] RIP [<ffffffff81388eef>] profile_cmp+0x2f/0x180 [ 519.452088] RSP <ffff88001b58fcb0> [ 519.452570] CR2: 0000000000000038 [ 519.453032] ---[ end trace 65ff12ee2e7c26af ]--- The details of this test can be found at: https://github.com/ubuntu-core/snappy/tree/master/integration-tests/data/snaps/home-consumer Will follow up with more details To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1579135/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp