isenkram-lookup crashed with SIGSEGV in g_type_check_instance_cast()

Bug #1903574 reported by Gunnar Hjalmarsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GObject Introspection
New
Unknown
appstream (Debian)
Fix Released
Unknown
appstream (Ubuntu)
Fix Released
Medium
Unassigned
gobject-introspection (Ubuntu)
Confirmed
Undecided
Unassigned
isenkram (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

[Impact]

An attempt to run the isenkram-lookup command from the isenkram-cli package results in a segfault/crash. The proposed appstream upload in <https://launchpad.net/~gunnarhj/+archive/ubuntu/appstream> fixes the issue.

[Test case]

1. Install the isenkram package

2. Run the isenkram-lookup command

-> Find that it segfaults

3. Install the packages built by the appstream source
   package from groovy-proposed

-> Find that the command succeeds and possibly lists a few
   suggested packages.

[Where problems could occur]

TBH this fix is far above my head. Only code comments are changed, i.e. some occurrences of "full" are replaced with "container", but it still has proved to be it.

The reasoning in the commit message sounds plausible:

https://github.com/ximion/appstream/commit/b52858bf

[Original description]

I just run the isenkram-lookup command.

The crash may be related to this autopkgtest failure (which current blocks migration of gtk+3.0):

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-hirsute/hirsute/amd64/i/isenkram/20201108_141822_ee8c4@/log.gz

This is the script which fails:

https://salsa.debian.org/debian/isenkram/-/blob/master/debian/tests/test-command-line

and it includes the isenkram-lookup command.

ProblemType: Crash
DistroRelease: Ubuntu 21.04
Package: isenkram-cli 0.44
ProcVersionSignature: Ubuntu 5.8.0-25.26-generic 5.8.14
Uname: Linux 5.8.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu51
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Mon Nov 9 18:07:47 2020
ExecutablePath: /usr/bin/isenkram-lookup
ExecutableTimestamp: 1595665183
InstallationDate: Installed on 2019-11-10 (365 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
InterpreterPath: /usr/bin/python3.8
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/isenkram-lookup
ProcCwd: /home/gunnar
Python3Details: /usr/bin/python3.8, Python 3.8.6, python3-minimal, 3.8.6-0ubuntu1
PythonDetails: N/A
SegvAnalysis:
 Segfault happened at: 0x7f27ae221cca <g_type_check_instance_cast+26>: mov (%rdi),%rax
 PC (0x7f27ae221cca) ok
 source "(%rdi)" (0x6465737500000000) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: isenkram
StacktraceTop:
 g_type_check_instance_cast () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
 as_component_get_provided_for_kind () at /lib/x86_64-linux-gnu/libappstream.so.4
 () at /lib/x86_64-linux-gnu/libffi.so.8
 () at /lib/x86_64-linux-gnu/libffi.so.8
 () at /usr/lib/python3/dist-packages/gi/_gi.cpython-38-x86_64-linux-gnu.so
Title: isenkram-lookup crashed with SIGSEGV in g_type_check_instance_cast()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lp lpadmin lxd plugdev sambashare sudo
separator:

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
information type: Private → Public
tags: removed: need-amd64-retrace
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The isenkram-lookup command fails with a segfault also on Debian testing, so the problem is not Ubuntu specific.

tags: added: need-amd64-retrace
tags: removed: need-amd64-retrace
tags: added: need-amd64-retrace
tags: removed: need-amd64-retrace
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :
tags: added: need-amd64-retrace
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_type_check_instance_cast (type_instance=type_instance@entry=0x6465737500000000, iface_type=34876208) at ../../../gobject/gtype.c:4053
 AS_PROVIDED (ptr=0x6465737500000000) at ../src/as-provided.h:33
 as_component_get_provided_for_kind (cpt=<optimized out>, kind=AS_PROVIDED_KIND_MODALIAS) at ../src/as-component.c:1685
 ffi_call_unix64 () at ../src/x86/unix64.S:106
 ffi_call_int (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=<optimized out>) at ../src/x86/ffi64.c:669

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in isenkram (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

This has proved to be an appstream issue.

no longer affects: isenkram (Ubuntu Groovy)
Changed in isenkram (Ubuntu):
status: New → Invalid
Changed in appstream (Ubuntu Groovy):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Medium
status: New → In Progress
Changed in appstream (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
affects: isenkram (Debian) → appstream (Debian)
description: updated
description: updated
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

The PPA proposal has proved to be problematic:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974107#83

So no solution in sight at the moment.

Changed in appstream (Ubuntu Groovy):
assignee: Gunnar Hjalmarsson (gunnarhj) → nobody
status: In Progress → Confirmed
Changed in appstream (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Matthias Klumpp (ximion) wrote :

The bug is actually this one, in gobject-introspection: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305

no longer affects: appstream (Ubuntu Groovy)
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Fixed in appstream 0.13.1-1

Changed in appstream (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Matthias Klumpp (ximion) wrote :

Not really fixed, AppStream has an incomplete workaround for the gobject-introspection bug (which may break at any time for new functions in either Python or Vala, if we aren't super careful).

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, Matthias, added a gobject-introspection bug task.

Changed in gobject-introspection (Ubuntu):
status: New → Confirmed
Changed in appstream (Debian):
status: Unknown → Fix Released
Changed in gobject-introspection:
status: Unknown → New
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.