libffi 3.1~rc1 regression: crashes on i386; python3.4 crashed with SIGSEGV in g_callable_info_free_closure()

Bug #1298824 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libffi (Ubuntu)
Fix Released
Critical
Matthias Klose
Trusty
Fix Released
Critical
Matthias Klose

Bug Description

https://launchpad.net/ubuntu/+source/libffi/3.1~rc1-2 has a regression which causes lots of crashes on i386. This particular crash report is a (local) retrace of https://jenkins.qa.ubuntu.com/job/trusty-adt-gtk-3.0/109/ARCH=i386,label=adt/ but this affects all reverse depdencies of libffi, such as

  https://jenkins.qa.ubuntu.com/job/trusty-adt-python-cffi/37/ARCH=i386,label=adt
  https://jenkins.qa.ubuntu.com/job/trusty-adt-gtk-3.0/109/ARCH=i386,label=adt/
  https://jenkins.qa.ubuntu.com/job/trusty-adt-ruby-ffi/26/ARCH=i386,label=adt/

and gvfs, umockdev, ubiquity, etc.

I reproduced this in a local trusty i386 schroot and confirm that downgrading libffi6 to the previous version 3.0.13-12 re-fixes things.

So far a small reproducer is:

  sudo apt-get install python3-gi gir1.2-gtk-3.0 xvfb
  xvfb-run python3 -c 'from gi.repository import GLib, Gtk; GLib.timeout_add_seconds(1, Gtk.main_quit, None); Gtk.main()'

Or you run python-cffi's test suite:

  python3 -m pytest -v -k test_callback_as_function_argument testing

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: python3.4-minimal 3.4.0-1
Uname: Linux 3.13.0-19-generic i686
Architecture: i386
Date: Fri Mar 28 07:05:41 2014
ExecutablePath: /usr/bin/python3.4
ExecutableTimestamp: 1395533063
PackageArchitecture: amd64
ProcCmdline: python3
ProcCwd: /tmp/adt-run.QKVQFy/dsc0-build/gtk+3.0-3.10.7
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/sh
Signal: 11
SourcePackage: python3.4
StacktraceTop:
 g_callable_info_free_closure (callable_info=0x9e8a5b0, closure=0xb6b43008) at girepository/girffi.c:426
 _pygi_invoke_closure_free (data=0x9efdd50) at ../../gi/pygi-closure.c:638
 _pygi_destroy_notify_callback_closure (cif=0x9efddbc, result=0xbfaec770, args=0xbfaec710, data=0x0) at ../../gi/pygi-closure.c:703
 ffi_closure_SYSV_inner (closure=0xb6b43030, respp=0xbfaec77c, args=0xbfaec790) at ../src/x86/ffi.c:503
 ffi_closure_SYSV () at ../src/x86/sysv.S:199
UserGroups: adm audio cdrom dialout dip floppy kvm netdev plugdev sudo video

Revision history for this message
Martin Pitt (pitti) wrote :
affects: python3.4 (Ubuntu) → libffi (Ubuntu)
Changed in libffi (Ubuntu):
assignee: nobody → Matthias Klose (doko)
importance: Undecided → Critical
status: New → Confirmed
tags: added: autopkgtest qa-daily-testing
Martin Pitt (pitti)
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

As a data point, when I rebuild gobject-introspection and pygobject against the new libffi, it works again. This suggests an ABI break, not in terms of added/dropped symbols but something more subtle such as changed macro values, enum values changing, etc.

Revision history for this message
Martin Pitt (pitti) wrote :

I tried to do the same with python-cffi, but it fails to build due to test suite failures (due to that segfault). Building it with DEB_BUILD_FLAGS=nocheck and installing the debs doesn't fix the crash for python-cffi's autopkgtest; not surprisingly, as it's the same test suite that gets run during package build.

Revision history for this message
Martin Pitt (pitti) wrote :

I prepared a reversion upload which is now sitting in -unapproved for the release team's consideration. If there's a quick fix, we can of course reject this and fix it properly instead.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libffi - 3.1~rc1+r3.0.13-12

---------------
libffi (3.1~rc1+r3.0.13-12) trusty; urgency=medium

  * Revert 3.1~rc1-2 upload, it causes an unannounced ABI break on at least
    i386, causing lots of segfaults. (LP: #1298824)
 -- Martin Pitt <email address hidden> Fri, 28 Mar 2014 09:55:09 +0100

Changed in libffi (Ubuntu Trusty):
status: Confirmed → 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.