[SRU] python-cffi and libffi in Groovy need a no-change rebuild

Bug #1912535 reported by Erich Eickmeyer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libffi (Ubuntu)
Fix Released
Undecided
Unassigned
Groovy
Won't Fix
High
Unassigned
Hirsute
Fix Released
Undecided
Unassigned
python-cffi (Ubuntu)
Fix Released
Undecided
Unassigned
Groovy
Won't Fix
High
Unassigned
Hirsute
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Users of studio-controls have been reporting bugs against studio-controls upstream on Github. For reference, see https://github.com/ovenwerks/studio-controls/issues/43

 * Per the bug report, the following error is being thrown: SystemError: ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)

 * Based on this error, and based on the build time of python-cffi and libffi in relation to cffi, it appears as though python-cffi and libffi were built on an older version of cffi. This explains the error.

[Test Case]

 * A certain number of users have reported that simply running studio-controls causes this error.

[Where problems could occur]

 * Since this is a no-change rebuild being requested, the possibility of breakage is slim to none. We are introducing no new changes here, but rather, resolving a regression that happened as a result of a newer version of cffi being introduced without a rebuild of dependencies.

 * If any problems happen, it would be a result of applications using python-cffi and expecting this bug with built-in workarounds. I can't imagine such a case exists, so this is just a stretch.

Changed in python-cffi (Ubuntu Hirsute):
status: New → Fix Released
Changed in python-cffi (Ubuntu Groovy):
importance: Undecided → High
Revision history for this message
Stefano Rivera (stefanor) wrote :

python-cffi in Groovy was built against libbfi 3.4~20200819gead65ca871-0ubuntu3, which is still the current version.

Build Log: https://launchpadlibrarian.net/495225981/buildlog_ubuntu-groovy-amd64.python-cffi_1.14.2-1_BUILDING.txt.gz

I would expect that if this issue occurred, it would also be visible in python-cffi's autopkgtests, which run the comprehensive upstream testsuite.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Then how do you explain the error?

SystemError: ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Upon further investigation, it appears as though libffi was built on an older version of cffi, which would probably explain this a little further. Adding libffi to the bug.

summary: - [SRU] python-cffi in Groovy needs a no-change rebuild
+ [SRU] python-cffi and libffi in Groovy need a no-change rebuild
Changed in libffi (Ubuntu Hirsute):
status: New → Fix Released
description: updated
Changed in libffi (Ubuntu Groovy):
importance: Undecided → High
Revision history for this message
Stefano Rivera (stefanor) wrote :

First: How do we reproduce the error? That'd be the best way to dig deeper.

Second: libffi doesn't build against cffi.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Dug around on errors.ubuntu.com and found some examples:

https://errors.ubuntu.com/problem/2927dbb958eff4c58515acaca3ed657506e33ed8
This is a user who installed the jack library by hand into .local/lib/python3.8/site-packages
So, I think we can ignore that one.

https://errors.ubuntu.com/problem/6302e7add4138a8cd7c396ba878f3c5292628bea
This looks more helpful, but I can't reproduce it.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Same, neither myself nor len-ovenwerks can reproduce. I suppose it's possible that the user installed the jack library by hand on the second one as well, and might even be the same user.

Revision history for this message
Stefano Rivera (stefanor) wrote :

I'd suspect a local python-cffi more than a local jack. The jack module doesn't involve any built bits.

Changed in python-cffi (Ubuntu Groovy):
status: New → Incomplete
Changed in libffi (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
Eirik Zakariassen (atxbyea) wrote :

I see this error too on Groovy, after installing Ubuntu studio and trying to launch studio-controls.

➜ ~ studio-controls
install path: /usr

Traceback (most recent call last):
  File "/usr/bin/studio-controls", line 1425, in <module>
    us = StudioControls()
  File "/usr/bin/studio-controls", line 431, in __init__
    jack.set_error_function(callback=self.jack_error)
  File "/usr/lib/python3/dist-packages/jack.py", line 2974, in set_error_function
    _set_error_or_info_function(callback, _lib.jack_set_error_function)
  File "/usr/lib/python3/dist-packages/jack.py", line 3013, in _set_error_or_info_function
    def callback_wrapper(msg):
SystemError: ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)
➜ ~

Revision history for this message
Eirik Zakariassen (atxbyea) wrote :

Aha, after removing it via pip (I couldn't see it via apt) it now works again.

Revision history for this message
Brian Murray (brian-murray) wrote :

The Groovy Gorilla has reached end of life, so this bug will not be fixed for that release

Changed in python-cffi (Ubuntu Groovy):
status: Incomplete → Won't Fix
Changed in libffi (Ubuntu Groovy):
status: Incomplete → Won't Fix
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.