python-gi/arm64 segfaults with the focal-proposed libffi version

Bug #1859610 reported by Sebastien Bacher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libffi (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned
pygobject (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned

Bug Description

Testcase, on focal/arm64

$ sudo apt install python3-goocalendar
$ python3 -c "import goocalendar ; print(goocalendar.__version__)"

-> works fine

install the python3-gi package from focal-proposed it segfaults in libffi

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x0000fffff7390ff8 in ffi_call_SYSV () at ../src/aarch64/sysv.S:114
#2 0x0000fffff7390634 in ffi_call_int (cif=0xa12d78, fn=<optimized out>,
    orig_rvalue=<optimized out>, avalue=0x0, closure=<optimized out>)

Tags: arm64
tags: added: arm64
removed: rls-ff-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Cannot reproduce:

$ uname -a
Linux Mcdivitt-B0-Cartridge37 5.4.0-9-generic #12-Ubuntu SMP Mon Dec 16 22:33:31 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

$ dpkg -l | grep -e libffi -e python3-gi
ii libffi6:arm64 3.2.1-9 arm64 Foreign Function Interface library runtime
ii libffi7:arm64 3.3-2.3build1 arm64 Foreign Function Interface library runtime
ii python3-gi 3.34.0-3build2 arm64 Python 3 bindings for gobject-introspection libraries
ii python3-gi-cairo 3.34.0-3build2 arm64 Python 3 Cairo bindings for the GObject library
ii python3-github 1.43.7-1 all Access the full Github API v3 from Python3
ii python3-gitlab 1:1.15.0-1 all Python 3 GitLab API client library

$ python3 -c "import goocalendar ; print(goocalendar.__version__)"
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
0.5

python3-gi depends on libffi7

Changed in libffi (Ubuntu Focal):
status: New → Incomplete
Revision history for this message
Matthias Klose (doko) wrote :

works for me as well.

Revision history for this message
Dave Jones (waveform) wrote :

Reproduced on a Pi4 running the current focal daily:

ubuntu@ubuntu:~$ python3 -c "import goocalendar; print(goocalendar.__version__)"
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
0.5
ubuntu@ubuntu:~$ sudo apt install -t focal-proposed python3-gi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libffi7 python3-gi-cairo
The following NEW packages will be installed:
  libffi7
The following packages will be upgraded:
  python3-gi python3-gi-cairo
2 upgraded, 1 newly installed, 0 to remove and 85 not upgraded.
Need to get 220 kB of archives.
After this operation, 60.4 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3-gi-cairo arm64 3.34.0-3build2 [8336 B]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libffi7 arm64 3.3-2.3build1 [17.1 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3-gi arm64 3.34.0-3build2 [195 kB]
Fetched 220 kB in 2s (114 kB/s)
(Reading database ... 79794 files and directories currently installed.)
Preparing to unpack .../python3-gi-cairo_3.34.0-3build2_arm64.deb ...
Unpacking python3-gi-cairo (3.34.0-3build2) over (3.34.0-3) ...
Selecting previously unselected package libffi7:arm64.
Preparing to unpack .../libffi7_3.3-2.3build1_arm64.deb ...
Unpacking libffi7:arm64 (3.3-2.3build1) ...
Preparing to unpack .../python3-gi_3.34.0-3build2_arm64.deb ...
Unpacking python3-gi (3.34.0-3build2) over (3.34.0-3) ...
Setting up libffi7:arm64 (3.3-2.3build1) ...
Setting up python3-gi (3.34.0-3build2) ...
Setting up python3-gi-cairo (3.34.0-3build2) ...
Processing triggers for libc-bin (2.30-0ubuntu3) ...
ubuntu@ubuntu:~$ python3 -c "import goocalendar; print(goocalendar.__version__)"
Segmentation fault (core dumped)

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1859610] Re: python-gi/arm64 segfaults with the focal-proposed libffi version

On Fri, 17 Jan 2020 at 16:15, Dave Jones <email address hidden> wrote:
>
> Get:1 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3-gi-cairo arm64 3.34.0-3build2 [8336 B]
> Get:2 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libffi7 arm64 3.3-2.3build1 [17.1 kB]
> Get:3 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3-gi arm64 3.34.0-3build2 [195 kB]
> Fetched 220 kB in 2s (114 kB/s)

Do you have the new python3.7 installed from focal-proposed?

note, i was running everything from proposed. Since libffi6 & 7 might
be used by python3.7.

Revision history for this message
Dave Jones (waveform) wrote :
Download full text (3.5 KiB)

> Do you have the new python3.7 installed from focal-proposed?

> note, i was running everything from proposed. Since libffi6 & 7 might
> be used by python3.7.

Ah, no I didn't. However, doesn't seem like it makes much difference:

ubuntu@ubuntu:~$ sudo apt install -t focal-proposed python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libpython3.7 libpython3.7-dbg libpython3.7-minimal libpython3.7-stdlib python3.7-dbg python3.7-minimal
Suggested packages:
  python3.7-venv python3.7-doc python3-gdbm-dbg python3-tk-dbg binfmt-support
The following packages will be upgraded:
  libpython3.7 libpython3.7-dbg libpython3.7-minimal libpython3.7-stdlib python3.7 python3.7-dbg
  python3.7-minimal
7 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
Need to get 32.9 MB of archives.
After this operation, 26.6 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3.7-dbg arm64 3.7.6-1ubuntu2 [15.9 MB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3.7 arm64 3.7.6-1ubuntu2 [304 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libpython3.7 arm64 3.7.6-1ubuntu2 [1373 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libpython3.7-dbg arm64 3.7.6-1ubuntu2 [11.4 MB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libpython3.7-stdlib arm64 3.7.6-1ubuntu2 [1717 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 python3.7-minimal arm64 3.7.6-1ubuntu2 [1723 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-proposed/main arm64 libpython3.7-minimal arm64 3.7.6-1ubuntu2 [547 kB]
Fetched 32.9 MB in 25s (1316 kB/s)
(Reading database ... 80531 files and directories currently installed.)
Preparing to unpack .../0-python3.7-dbg_3.7.6-1ubuntu2_arm64.deb ...
Unpacking python3.7-dbg (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../1-python3.7_3.7.6-1ubuntu2_arm64.deb ...
Unpacking python3.7 (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../2-libpython3.7_3.7.6-1ubuntu2_arm64.deb ...
Unpacking libpython3.7:arm64 (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../3-libpython3.7-dbg_3.7.6-1ubuntu2_arm64.deb ...
Unpacking libpython3.7-dbg:arm64 (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../4-libpython3.7-stdlib_3.7.6-1ubuntu2_arm64.deb ...
Unpacking libpython3.7-stdlib:arm64 (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../5-python3.7-minimal_3.7.6-1ubuntu2_arm64.deb ...
Unpacking python3.7-minimal (3.7.6-1ubuntu2) over (3.7.6-1) ...
Preparing to unpack .../6-libpython3.7-minimal_3.7.6-1ubuntu2_arm64.deb ...
Unpacking libpython3.7-minimal:arm64 (3.7.6-1ubuntu2) over (3.7.6-1) ...
Setting up libpython3.7-minimal:arm64 (3.7.6-1ubuntu2) ...
Setting up python3.7-minimal (3.7.6-1ubuntu2) ...
Setting up libpython3.7-stdlib:arm64 (3.7.6-1ubuntu2) ...
Setting up libpython3.7:arm64 (3.7.6-1ubuntu2) ...
Setting up libpython3.7-dbg:arm64 (3.7.6-1ubuntu2) ...
Setting up python3.7 (3.7.6-1ubuntu2) ...
Setting up pytho...

Read more...

Revision history for this message
Matthias Klose (doko) wrote :

so this is not completely updated to focal-proposed?

Revision history for this message
Dave Jones (waveform) wrote :

> so this is not completely updated to focal-proposed?

No, that was just certain focal-proposed packages on a focal image (on a pi4). Have now re-run with a full focal-proposed chroot (under the same focal image), and that doesn't reproduce the issue:

(focal-arm64)root@ubuntu:~# cat /etc/apt/sources.list
deb http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-proposed main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-proposed main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
(focal-arm64)root@ubuntu:~# dpkg -l | grep -e "libffi" -e "python3"
ii libffi6:arm64 3.2.1-9 arm64 Foreign Function Interface library runtime
ii libffi7:arm64 3.3-3 arm64 Foreign Function Interface library runtime
ii libpython3-stdlib:arm64 3.7.5-1ubuntu1 arm64 interactive high-level object-oriented language (default python3 version)
ii libpython3.7-minimal:arm64 3.7.6-1ubuntu2 arm64 Minimal subset of the Python language (version 3.7)
ii libpython3.7-stdlib:arm64 3.7.6-1ubuntu2 arm64 Interactive high-level object-oriented language (standard library, version 3.7)
ii python3 3.7.5-1ubuntu1 arm64 interactive high-level object-oriented language (default python3 version)
ii python3-cairo:arm64 1.16.2-2ubuntu1 arm64 Python3 bindings for the Cairo vector graphics library
ii python3-gi 3.34.0-3build2 arm64 Python 3 bindings for gobject-introspection libraries
ii python3-gi-cairo 3.34.0-3build2 arm64 Python 3 Cairo bindings for the GObject library
ii python3-goocalendar 0.5-1 all Calendar widget for GTK+ using PyGoocanvas (Python 3)
ii python3-minimal 3.7.5-1ubuntu1 arm64 minimal subset of the Python language (default python3 version)
ii python3-pkg-resources 44.0.0-1 all Package Discovery and Resource Access using pkg_resources
ii python3.7 3.7.6-1ubuntu2 arm64 Interactive high-level object-oriented language (version 3.7)
ii python3.7-minimal 3.7.6-1ubuntu2 arm64 Minimal subset of the Python language (version 3.7)
(focal-arm64)root@ubuntu:~# python3 -c "import goocalendar; print(goocalendar.__version__)"
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
0.5

Revision history for this message
Matthias Klose (doko) wrote :

so this apparently needs re-testing with appropriate triggers, or maybe tightened dependencies on some packages.

Changed in libffi (Ubuntu Focal):
status: Incomplete → Fix Committed
tags: added: rls-ff-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

it's fixed in proposed

Changed in pygobject (Ubuntu Focal):
importance: Undecided → High
status: New → Fix Committed
Steve Langasek (vorlon)
tags: removed: rls-ff-incoming
Changed in pygobject (Ubuntu Focal):
status: Fix Committed → Fix Released
Changed in libffi (Ubuntu):
status: Fix Committed → Fix Released
Changed in libffi (Ubuntu Focal):
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.