snap went boom

Bug #1828425 reported by Alan Pope 🍺🐧🐱 🦄
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Critical
John Lenton

Bug Description

The snap command line tool crashes when looking at the info for one specific snap, qtencodegui.

$ snap version
snap 2.38.1
snapd 2.38.1
series 16
neon 18.04
kernel 4.15.0-48-generic

$ snap info qtencodegui
name: qtencodegui
summary: NGC Gui Test Launch
publisher: Caleb Farrand (seefar)
contact: <email address hidden>
license: unset
description: |
  This is an application that helps utilize ffmpeg, specifically for the NGCodec IP. It provides you
  with widgets to change ffmpeg's settings in an intuitive manner, which it then reads and uses to
  build various shell scripts that call ffmpeg with the settings you want. Because NGCodec's codecs
  run on an FPGA, the application is not useful unless you have access to an FPGA with the necessary
  xclbin and properly configured ffmpeg executables. The app will, however, build the scripts
  regardless, so it can be useful if all you want to see is the ffmpeg syntax.

  The scripts are stored in /var/snap/qtencodegui/current/helper_dir/Scripts/
panic: runtime error: slice bounds out of range [recovered]
        panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.main.func1()
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:443 +0x95
panic(0x555f24a83a20, 0x555f24da1270)
        /usr/lib/go-1.10/src/runtime/panic.go:502 +0x22d
main.wrapGeneric(0x555f24b319a0, 0xc42013a900, 0xc42010e740, 0x7, 0x10, 0xc420114460, 0x92, 0xc420114460, 0x92, 0x64, ...)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_info.go:245 +0x4f9
main.wrapLine(0x555f24b319a0, 0xc42013a900, 0xc42010e500, 0x97, 0xa0, 0x555f246cfdca, 0x2, 0x64, 0x0, 0x0)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_info.go:212 +0x1cd
main.printDescr(0x555f24b319a0, 0xc42013a900, 0xc4202e8480, 0x453, 0x64, 0xf, 0x0)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_info.go:293 +0x156
main.(*infoCmd).Execute(0xc4200b3ea0, 0xc420249260, 0x0, 0x2, 0xc4200b3ea0, 0x1)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/cmd_info.go:497 +0x910
github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc420221ce0, 0xc42009c160, 0x2, 0x2, 0x555f24de2e00, 0xc42021f520, 0x5, 0x555f246d17cc, 0xc42021f520)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags/parser.go:333 +0x81a
github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags.(*Parser).Parse(0xc420221ce0, 0xc420221ce0, 0x7fcd407236c8, 0x0, 0xc42021f488, 0x0)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/vendor/github.com/jessevdk/go-flags/parser.go:190 +0x73
main.run(0xc400000000, 0x555f24b2c3a8)
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:481 +0x60
main.main()
        /build/snapd-h8EQrc/snapd-2.38.1/_build/src/github.com/snapcore/snapd/cmd/snap/main.go:448 +0x345

John Lenton (chipaca)
Changed in snapd:
importance: Undecided → Critical
assignee: nobody → John Lenton (chipaca)
status: New → In Progress
Revision history for this message
John Lenton (chipaca) wrote :

It's triggered by the description having a line with an indent of 140+ spaces, which is rather pathological and tickled a bug.

This detects the case and mangles the description appropriately:

https://github.com/snapcore/snapd/pull/6851

John Lenton (chipaca)
Changed in snapd:
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
Changed in snapd:
status: Fix Committed → Fix Released
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.