Ubuntu

portmidi 1:200-0ubuntu1.12.04.1 is broken

Reported by Albert Graef on 2013-01-30
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
portmidi (Ubuntu)
High
Alessio Treglia
Lucid
Undecided
Unassigned
Oneiric
High
Unassigned
Precise
High
Unassigned
Quantal
High
Unassigned

Bug Description

This is on a Ubuntu 12.04.1 (fully upgraded) system, but given the nature of the bug it might affect other Ubuntu releases which received a similar upgrade. I first noticed this with MIDI playback which has stopped working in Frescobaldi since a few days because Python can't load its portmidi module. The message I get boils down to the following error from the dynamic linker:

/usr/lib/libportmidi.so.0: undefined symbol: snd_seq_event_input_pending

Downgrading to the previous 1:200-0ubuntu1 version of the package solves the problem. Quite obviously the root cause is a miscompiled libportmidi. Here's what ldd says about the libportmidi.so.0 from the 1:200-0ubuntu1.12.04.1 package:

 linux-vdso.so.1 => (0x00007fff9e3ff000)
 libporttime.so.0 => /usr/lib/libporttime.so.0 (0x00007fb84ac71000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb84a8b2000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb84a694000)
 /lib64/ld-linux-x86-64.so.2 (0x00007fb84b0af000)

Compare this to the ldd output for the 1:200-0ubuntu1 version:

 linux-vdso.so.1 => (0x00007fffe9bff000)
 libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007f26264cb000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f26262ae000)
 libporttime.so.0 => /usr/lib/libporttime.so.0 (0x00007f26260ab000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2625cec000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f26259f0000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f26257eb000)
 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f26255e3000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f26269f4000)

I haven't checked the sources, but it looks like some linker flags may have gone missing in the 1:200-0ubuntu1.12.04.1 package. So any portmidi application which doesn't happen to link to libasound2 by itself is going to be hosed in a similar way.

Just for the record, here's the full traceback from Frescobaldi (but note that the last line is really all that's important; this is definitely an issue with portmidi, not Frescobaldi or the Python portmidi module):

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/panels.py", line 136, in slotVisibilityChanged
    self.widget()
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/panels.py", line 129, in widget
    w = self.createWidget()
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/miditool/__init__.py", line 55, in createWidget
    from . import widget
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/miditool/widget.py", line 32, in <module>
    import midihub
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/midihub.py", line 42, in <module>
    portmidi.init()
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/portmidi/__init__.py", line 102, in init
    if _setup() and not _initalized:
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/portmidi/__init__.py", line 272, in _setup
    pypm = globals()['_do_import_' + name]()
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/portmidi/__init__.py", line 320, in _do_import_ctypes
    from . import ctypes_pypm
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/portmidi/ctypes_pypm.py", line 9, in <module>
    from .pm_ctypes import (
  File "/usr/lib/python2.7/dist-packages/frescobaldi_app/portmidi/pm_ctypes.py", line 101, in <module>
    libpm = CDLL(dll_name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libportmidi.so.0: undefined symbol: snd_seq_event_input_pending

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in portmidi (Ubuntu):
status: New → Confirmed

I get the same error message in Kubuntu 12.10 with the 1:200-0ubuntu1.12.10.1 package.

Albert Graef (dr-graef) wrote :

Found it. The issue is with debian/patches/05_makefile.diff. The link command in the patched Makefile is wrong, it has the -lasound2 -lpthread options (ALSALIB variable) before everything else. This won't work with gcc 4.6+ which is very picky about the order of linked libraries (unless you link with -Wl,--no-as-needed).

Suggested patch (bzr diff -p1) attached.

Albert Graef (dr-graef) wrote :

Until this is fixed in the official repos, I've uploaded a corrected package for Ubuntu 12.04 to the PPA given below, so that everybody can test it out (please give it some time, the 64 bit package is still waiting to build at the time of this writing). I've tested it with Frescobaldi, works for me.

https://launchpad.net/~dr-graef/+archive/test

tags: added: regression
Changed in portmidi (Ubuntu):
importance: Undecided → High
tags: added: regression-update
removed: regression
Changed in portmidi (Ubuntu):
status: Confirmed → Triaged
Steve Langasek (vorlon) wrote :

Alessio, as the uploader of the SRUs are you going to follow through on this, or do you need any help?

Changed in portmidi (Ubuntu):
assignee: nobody → Alessio Treglia (quadrispro)
Alessio Treglia (quadrispro) wrote :

Hi Steve,
everything is in order now, I've already uploaded patches to {oneiric,precise,quantal,raring}-proposed (this does not affect lucid).

Changed in portmidi (Ubuntu Lucid):
status: New → Invalid
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package portmidi - 1:200-0ubuntu3

---------------
portmidi (1:200-0ubuntu3) raring; urgency=low

  * pm_linux/Makefile: Fix linking order, regression introduced
    by the previous upload. (LP: #1110326)
 -- Alessio Treglia <email address hidden> Sun, 03 Feb 2013 02:57:34 +0000

Changed in portmidi (Ubuntu):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in portmidi (Ubuntu Oneiric):
status: New → Confirmed
Changed in portmidi (Ubuntu Precise):
status: New → Confirmed
Changed in portmidi (Ubuntu Quantal):
status: New → Confirmed
Changed in portmidi (Ubuntu Oneiric):
importance: Undecided → High
Changed in portmidi (Ubuntu Precise):
importance: Undecided → High
Changed in portmidi (Ubuntu Quantal):
importance: Undecided → High

Hello Albert, or anyone else affected,

Accepted portmidi into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/portmidi/1:200-0ubuntu1.12.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in portmidi (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in portmidi (Ubuntu Precise):
status: Confirmed → Fix Committed
Brian Murray (brian-murray) wrote :

Hello Albert, or anyone else affected,

Accepted portmidi into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/portmidi/1:200-0ubuntu1.12.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in portmidi (Ubuntu Oneiric):
status: Confirmed → Fix Committed
Brian Murray (brian-murray) wrote :

Hello Albert, or anyone else affected,

Accepted portmidi into oneiric-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/portmidi/1:200-0ubuntu1.11.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

GuyS (jstalnak) wrote :

Installed from quantal-proposed:

Package: libportmidi0
New: yes
State: installed
Automatically installed: yes
Version: 1:200-0ubuntu1.12.10.2
Priority: optional
Section: universe/libs
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Uncompressed Size: 78.8 k
Depends: libasound2 (>= 1.0.16), libc6 (>= 2.14)
Conflicts: libportmidi0
Description: library for real-time MIDI input/output
 PortMidi is a platform independent library for MIDI input/output. This package provide the PortMidi and
 PortTime libraries.
Homepage: http://portmedia.sourceforge.net/

----

This does fix the issue for me. As originally noted I also saw the issue manifested in frescobaldi with the error indicated; that error no longer occurs and midi in frescobaldi now works.

Steve Langasek (vorlon) on 2013-02-08
tags: added: verification-done-quantal
Alessio Treglia (quadrispro) wrote :

The package from precise-proposed works fine.

tags: added: verification-done-precise
Albert Graef (dr-graef) wrote :

I can confirm that the 1.12.04.2 package from precise-proposed works for me, too (tested with the Frescobaldi MIDI player). Thanks!

Zbigniew Koza (zzkoza) wrote :

Confirmed. 1:200-0ubuntu1.12.10.2 on quantal from quantal-proposed fixed the problem with frescobaldi.

Would be helpful if more human-oriented instructions were somewhere available as how to use -proposed packages
(I spent hours trying to use synaptic, finally did the job with apt-get, after manually resoving dependencies)

Thanks!

Alessio Treglia (quadrispro) wrote :

Works on oneiric too.

tags: added: verification-done-oneiric
tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package portmidi - 1:200-0ubuntu1.11.10.2

---------------
portmidi (1:200-0ubuntu1.11.10.2) oneiric-proposed; urgency=low

  * pm_linux/Makefile: Fix linking order, regression introduced
    by the previous upload. (LP: #1110326)
 -- Alessio Treglia <email address hidden> Sun, 03 Feb 2013 03:06:30 +0000

Changed in portmidi (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package portmidi - 1:200-0ubuntu1.12.04.2

---------------
portmidi (1:200-0ubuntu1.12.04.2) precise-proposed; urgency=low

  * pm_linux/Makefile: Fix linking order, regression introduced
    by the previous upload. (LP: #1110326)
 -- Alessio Treglia <email address hidden> Sat, 02 Feb 2013 19:57:38 +0000

Changed in portmidi (Ubuntu Precise):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package portmidi - 1:200-0ubuntu1.12.10.2

---------------
portmidi (1:200-0ubuntu1.12.10.2) quantal-proposed; urgency=low

  * pm_linux/Makefile: Fix linking order, regression introduced
    by the previous upload. (LP: #1110326)
 -- Alessio Treglia <email address hidden> Sun, 03 Feb 2013 02:53:38 +0000

Changed in portmidi (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers