Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298850 - media-sound/jack-3.1.1: crash when displaying progress screen
Summary: media-sound/jack-3.1.1: crash when displaying progress screen
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks: 609674
  Show dependency tree
 
Reported: 2009-12-29 12:21 UTC by Martin Dummer
Modified: 2017-03-10 11:09 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
remove the usage of the included module jack_curses (jack-3.1.1-dontuse-jack-cursesmodule.patch,1.88 KB, patch)
2010-07-03 11:24 UTC, Martin Dummer
Details | Diff
patch for new ebuild (proposed version 3.1.1-r2) (jack-3.1.1-r2.ebuild.patch,473 bytes, patch)
2010-07-03 11:25 UTC, Martin Dummer
Details | Diff
fixed ebuild for jack (jack-3.1.1-r2.ebuild,1.12 KB, text/plain)
2017-02-17 22:24 UTC, Martin Dummer
Details
additional ebuild file #1 (add-cddbserver-musicbrainz.patch,475 bytes, patch)
2017-02-17 22:27 UTC, Martin Dummer
Details | Diff
additional ebuild file #2 (jack-3.1.1-dontuse-jack-cursesmodule.patch,1.88 KB, patch)
2017-02-17 22:28 UTC, Martin Dummer
Details | Diff
additional ebuild file #3 (jack-3.1.1-python26.patch,372 bytes, patch)
2017-02-17 22:28 UTC, Martin Dummer
Details | Diff
additional ebuild file #4 (shebang-python27.patch,298 bytes, patch)
2017-02-17 22:29 UTC, Martin Dummer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Dummer 2009-12-29 12:21:44 UTC
After applying fix from bug 298843, the "jack" does some initialization and crashes on showing the rip/encoding progress screen

Reproducible: Always

Steps to Reproduce:
1. start "jack" with "--debug" but without "--silent-mode" option
2. "jack" reads config file, reads audio cd contents, creates directory structure
3. starts display of progress screen, crashes after first line on screen

Actual Results:  
"jack" crashes during display of progress screen.
To see debug output its necessary to redirect output to a file:

jack --debug >outfile 2>&1

then I see a foreground error:
*** glibc detected *** /usr/bin/python2.6: double free or corruption (out): 0x00007f9f13569120 ***


and the file contains:

This is jack 3.1.1 (C)2004 Arne Zellentin <zarne@users.sf.net>
 *debug* global_cf: {}
 *debug* user_cf: {'encoder': {'val': 'lame'}, 'ripper': {'val': 'cdparanoia'},
         'base_dir': {'val': '~/jack'}}
 *debug* argv_cf: {'debug': {'val': True}}
 *debug* username is martin
 *debug* hostname is bln8890n
 *debug* mail is martin@bln8890n, was default / @
 *debug* multi_mode:0
 *info* matching dir found: /home/martin/jack/jack-c611250e
 *debug* Track 13 LEN29462 != 18062 (trusting cdparanoia; to the right)
 *info* Track 14 not found by cdparanoia. Treated as non-audio.
Traceback (most recent call last):
  File "/usr/bin/jack", line 224, in <module>
    jack_term.enable()
  File "/usr/lib64/python2.6/site-packages/jack_term.py", line 186, in enable
    tmod.enable()
  File "/usr/lib64/python2.6/site-packages/jack_t_curses.py", line 93, in enable
    noecho() ; cbreak()
curses.error: cbreak() returned ERR
 *warning* abnormal exit


Expected Results:  
start ripping audio cd, show progress result

A workaround is to start "jack" without the progress screen using the "--silent-mode" option:

jack --debug --silent-mode
Comment 1 Martin Dummer 2010-07-03 11:24:11 UTC
Created attachment 237359 [details, diff]
remove the usage of the included module jack_curses
Comment 2 Martin Dummer 2010-07-03 11:25:04 UTC
Created attachment 237361 [details, diff]
patch for new ebuild (proposed version 3.1.1-r2)
Comment 3 Martin Dummer 2010-07-03 11:32:20 UTC
checking the sources, I found out that the upstream author has included a package named "cursesmodule" from Oliver Andrich. This was necessary for Python 1.x, but starting with Python 2.x there is a curses module included based on this work. see http://docs.python.org/whatsnew/2.0.html
So I wrote a patch to switch back to the python-included curses module and see - it works.
The upstream author will be informed.
Comment 4 Ryan Harris 2010-07-03 14:40:36 UTC
(In reply to comment #3)
> checking the sources, I found out that the upstream author has included a
> package named "cursesmodule" from Oliver Andrich. This was necessary for Python
> 1.x, but starting with Python 2.x there is a curses module included based on
> this work. see http://docs.python.org/whatsnew/2.0.html
> So I wrote a patch to switch back to the python-included curses module and see
> - it works.
> The upstream author will be informed.
> 

I can confirm the same problem and that the patch fixes it.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-07-03 14:44:05 UTC
And it won't ever get into Portage because of the bug author closed this bug as already fixed, while it's not

was that intended?
Comment 6 Ryan Harris 2010-07-04 02:08:37 UTC
(In reply to comment #5)
> And it won't ever get into Portage because of the bug author closed this bug as
> already fixed, while it's not
> 
> was that intended?
> 

I doubt that's what he intended. He sent me a personal email about this. That why I tested it. Even though he miss marked this bug report, could you please add his fixes in anyway? They still work and I'd hate to have to open a new bug report for it.
Comment 7 Martin Dummer 2010-07-05 10:19:40 UTC
(In reply to comment #5)
> And it won't ever get into Portage because of the bug author closed this bug as
> already fixed, while it's not
> 
> was that intended?
> 

Seems closing the bug was a mistake - sorry for this. now reopened the bug for further processing.
Comment 8 Jan Kundrát (RETIRED) gentoo-dev 2010-12-23 15:01:28 UTC
Dear sound team, the attached patch makes `jack` work again. Could we please get them integrated to the tree?
Comment 9 Tony Vroon (RETIRED) gentoo-dev 2010-12-23 16:03:22 UTC
(In reply to comment #8)
> Dear sound team, the attached patch makes `jack` work again. Could we please
> get them integrated to the tree?

Dear Jan,

To the best of my knowledge this was committed by Sebastian Pipping in June, although attribution could have been better:

*jack-3.1.1-r1 (17 Jun 2010)
*jack-3.0.0-r1 (17 Jun 2010)

  17 Jun 2010; Sebastian Pipping <sping@gentoo.org> +jack-3.0.0-r1.ebuild,
  +files/jack-3.0.0-python26.patch, +jack-3.1.1-r1.ebuild:
  Fix Python 2.6 issue on keyword "with". Thanks for the patch to Martin
  Dummer
Comment 10 Jan Kundrát (RETIRED) gentoo-dev 2010-12-29 16:13:47 UTC
(In reply to comment #9)
> To the best of my knowledge this was committed by Sebastian Pipping in June,
> although attribution could have been better:

Hi Tony,
the patch which you refer to fixes only an issue with the "with" being a keyword in Python 2.6, which is bug 298843. This bug is about changing Jack to use the curses module from Python's standard library instead of a bundled implementation in C. The shipped C module won't work in recent Pythons (also 2.6, IIRC) correctly, hence the need for a patch.

Comment 11 klaus henske 2011-04-26 20:50:45 UTC
Hello,

the bug by jack-3.1.1 is in then file jack_function.py

org version:

def starts_with(str, with):
        "checks whether str starts with with"
        return str[0:len(_with)] == with



new version:

def starts_with(str, _with):
        "checks whether str starts with _with"
        return str[0:len(_with)] == _with

with the new version emerge correctly.
Comment 12 Pacho Ramos gentoo-dev 2016-09-08 11:14:49 UTC
are you willing to proxy maintain this?
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 13 Pacho Ramos gentoo-dev 2016-11-15 16:35:40 UTC
this also needs porting to new python eclasses
Comment 14 Martin Dummer 2016-11-15 22:56:27 UTC
(In reply to Pacho Ramos from comment #12)
> are you willing to proxy maintain this?

Yes, I can do this. 
Porting this ebuild to new python eclasses will be a challenge for me, maybe you can give me a hint for an ebuild of a python 2.7 only application where I can take some inspiration from?
Comment 15 Pacho Ramos gentoo-dev 2016-11-16 20:19:33 UTC
This could help you:
https://wiki.gentoo.org/wiki/Project:Python/Eclasses

If this is python2 only, you could rely on python-single-r1.eclass instead of python-r1.eclass... that is simpler most of the times :/
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-02-17 15:15:39 UTC
+# Michał Górny <mgorny@gentoo.org> (17 Feb 2017)
+# Last release in 2004, broken at least since 2010. Seems to require
+# complex patches, no effective maintainer, still uses old distutils
+# eclass. Removal in 30 days. Bug #298850.
+media-sound/jack


If someone really cares to revive this ancient piece of software, you have 30 days to fix it.
Comment 17 Martin Dummer 2017-02-17 22:21:15 UTC
I do really care about this nice cd ripper - believe it or not - I still use it.
See attached the fixed ebuild. repoman likes it (with a little exception).
Comment 18 Martin Dummer 2017-02-17 22:24:52 UTC
Created attachment 464158 [details]
fixed ebuild for jack
Comment 19 Martin Dummer 2017-02-17 22:27:30 UTC
Created attachment 464160 [details, diff]
additional ebuild file #1
Comment 20 Martin Dummer 2017-02-17 22:28:11 UTC
Created attachment 464162 [details, diff]
additional ebuild file #2
Comment 21 Martin Dummer 2017-02-17 22:28:37 UTC
Created attachment 464164 [details, diff]
additional ebuild file #3
Comment 22 Martin Dummer 2017-02-17 22:29:00 UTC
Created attachment 464166 [details, diff]
additional ebuild file #4
Comment 23 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-02-17 22:35:11 UTC
@python, would someone be able to find time to help Martin with Python stuff?

@Martin, if that's not a problem, GitHub pull request will be much easier to work with. Also, please put file names in descriptions, we can't really guess them.
Comment 24 Martin Dummer 2017-02-18 12:29:26 UTC
(In reply to Michał Górny from comment #23)
> @Martin, if that's not a problem, GitHub pull request will be much easier to
> work with. 

Ok, will do that.
Comment 25 Martin Dummer 2017-02-18 14:48:57 UTC
https://github.com/gentoo/gentoo/pull/4011
Comment 26 David Seifert gentoo-dev 2017-03-10 11:09:02 UTC
commit 646f4349916b798eae254248d85ece070f66ef25
Author: Martin Dummer <martin.dummer@gmx.net>
Date:   Sat Feb 18 15:42:40 2017 +0100

    media-sound/jack: fix #298850, new EAPI and eclass
    
    - EAPI 6
    - replace eclass distutils with distutils-r1
    - fix ebuild python module dependencies
    - add proxy maintaintership
    - add functional enhancement: add cddb server freedb.musicbrainz.org
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=298850