[SRU] wminput crashes with ImportError: ... undefined symbol: PyVarObject_CallFunction

Bug #2042356 reported by James Walters
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cwiid (Debian)
Fix Released
Unknown
cwiid (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned

Bug Description

[ Impact ]

wminput is completey unusable as it will immediately crash with undefined symbol error.

$ sudo wminput <any random mac address>
ImportError: /usr/lib/python3/dist-packages/cwiid.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyVarObject_CallFunction

This is mostly because the code was not properly ported to Python-3.

[ Test Plan ]

1. install wminput
2. execute wminput with a mac address

If the package is not fixed, it will fail with undefined symbol error.

Ideally someone with the hardware should test.

[ Where problems could occur ]

There are changes in the code and there are chances of regression due to this change. But wminput as of now is already unusable, so any regression can not be worse than that.

[ Other Info ]

The patch, even though looks big is mostly changing all the PyVarObject to PyObject, and few other changes.
Initially I tried to pick only the changes for PyVarObject but that resulted in errors for PyInt_FromLong. After fixing that, errors from PyCObject_Check appeared. So, I thought its best to use all the fixes from the Debian patch.

[ Original Bug Description ]

When trying to invoke wminput I get the following:

james@thelio:~$ sudo wminput [redacted MAC address]
ImportError: /usr/lib/python3/dist-packages/cwiid.cpython-310-x86_64-linux-gnu.so: undefined symbol: PyVarObject_CallFunction

This is a duplicate of 1958466, but I could not run apport-collect against it because it was not my bug. Since it's been orphaned for over a year, I made this bug and ran apport-bug to file it. I'm happy to provide any additional data.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: wminput 0.6.91-2ubuntu1
Uname: Linux 6.5.4-76060504-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: MATE
Date: Tue Oct 31 14:35:47 2023
InstallationDate: Installed on 2020-10-27 (1099 days ago)
InstallationMedia: Ubuntu-MATE 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: cwiid
UpgradeStatus: Upgraded to jammy on 2022-08-12 (445 days ago)

Revision history for this message
James Walters (iamjameswalters) wrote :
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm that the issue is reproducible in Jammy. Also tested and confirmed that Mantic is not affected.

Changed in cwiid (Ubuntu):
status: New → In Progress
assignee: nobody → Sudip Mukherjee (sudipmuk)
Changed in cwiid (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → Sudip Mukherjee (sudipmuk)
Changed in cwiid (Ubuntu):
assignee: Sudip Mukherjee (sudipmuk) → nobody
status: In Progress → Fix Released
Changed in cwiid (Debian):
status: Unknown → Fix Released
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Jammy attached.

summary: - wminput crashes with ImportError: ... undefined symbol:
+ [SRU] wminput crashes with ImportError: ... undefined symbol:
PyVarObject_CallFunction
description: updated
Changed in cwiid (Ubuntu Jammy):
status: In Progress → Confirmed
assignee: Sudip Mukherjee (sudipmuk) → nobody
Revision history for this message
Mossroy (mossroy) wrote :

I have this same issue, and have a wiimote to test with.

Is there a .deb file generated with this patch, that I could try?

Revision history for this message
Miriam España Acebal (mirespace) wrote :

Hi Sudip!

I reviewed the patch, and I have a few questions:

- The patch seems to be one of the commits of the MR accepted on Debian on 976439 (the last one in fact). Would the commit a7ac2dbdc122115b5603f595c56cc55a6f09dca3 "Also add libwiicd patches. " be needed?

- The patch is for commit https://salsa.debian.org/georgesk/cwiid/-/blob/e7cebe40c94b05e97f07302c36e93f60482b0ae5/debian/patches/python3-build-azzra, but is not completely imported:
   - Makefile.in is not imported in the patch (maybe is this related to the commit a7ac2db (the one I pointed to in the previous question?)
   Why are some parts of the original commit (change comments, e.g.) not imported into the patch?

Could you give us more information about this elections?

I build the package with the patch (it builds OK) and I didn't test yet

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.