jack: curses.error: cbreak() returned ERR

Bug #152193 reported by cseg
18
Affects Status Importance Assigned to Milestone
jack (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: jack

I am running Gutsy Gibon tribe 5 plus many updates (I'm current as of Fri Oct 12 21:13:24 EDT 2007)

This bug is in reference to the simple ascii 'jack' package, not the unrelated fancy-schmancy GUI jack-ish packages.

This may be a Python-related problem. Some googling has suggested that an older version of python had some memory allocation bugs which were fixed in later versions. But some applications depended on those bugs. And when they were fixed, some applications broke.

Cutting to the chase:

$ which jack
/usr/bin/jack

$ head -3 /usr/bin/jack
#!/usr/bin/python
### jack - extract audio from a CD and encode it using 3rd party software
### Copyright (C) 1999-2004 Arne Zellentin <email address hidden>

$ /usr/bin/python --version
Python 2.5.1

$ dpkg -S /usr/bin/jack
jack: /usr/bin/jack

Typing 'jack' should commence ripping the CD in the drive. But in my case a python stack is emitted. Since this seems to be in the middle of curses, the screen ends up being garbled. So I have run jack as follows:

$ jack >/tmp/jack.out 2>&1

First, the contents of /tmp/jack.out:
This is jack 3.1.1 (C)2004 Arne Zellentin <email address hidden>
 *warning* You have no standard location set, putting files into the current
           directory. Please consider setting base_dir in ~/.jack3rc.
 *info* matching dir found: ./jack-7d0a7e09
<ESC>[?1049h<ESC>[1;24r<ESC>[m<ESC>(B<ESC>[4l<ESC>[?7hTraceback (most recent call last):
  File "/usr/bin/jack", line 234, in <module>
    jack_term.enable()
  File "/var/lib/python-support/python2.5/jack_term.py", line 187, in enable
    tmod.enable()
  File "/var/lib/python-support/python2.5/jack_t_curses.py", line 93, in enable
    noecho() ; cbreak()
curses.error: cbreak() returned ERR
 *warning* abnormal exit

(I have replaced real escapes with <ESC>)

What shows up on the console is this:
*** glibc detected *** /usr/bin/python: munmap_chunk(): invalid pointer: 0xb7d2c2f0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(cfree+0x1bb)[0xb7e1c92b]
/var/lib/python-support/python2.5/jack_cursesmodule.so[0xb7845117]
/usr/bin/python[0x80855f9]
/usr/bin/python(PyDict_SetItem+0x6e)[0x8086f5e]
/usr/bin/python(_PyModule_Clear+0x158)[0x8088bb8]
/usr/bin/python(PyImport_Cleanup+0x33a)[0x80dd2ca]
/usr/bin/python(Py_Finalize+0xbf)[0x80e931f]
/usr/bin/python[0x80e8e6a]
/usr/bin/python(PyErr_PrintEx+0x195)[0x80e9065]
/usr/bin/python(PyRun_SimpleFileExFlags+0xe3)[0x80e9883]
/usr/bin/python(Py_Main+0x9c0)[0x8059390]
/usr/bin/python(main+0x22)[0x80588c2]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7dc5050]
/usr/bin/python[0x8058831]
======= Memory map: ========
08048000-0813f000 r-xp 00000000 08:02 258781 /usr/bin/python2.5
0813f000-08164000 rw-p 000f6000 08:02 258781 /usr/bin/python2.5
08164000-082a7000 rw-p 08164000 00:00 0 [heap]
b77e2000-b77ec000 r-xp 00000000 08:02 32340 /lib/libgcc_s.so.1
b77ec000-b77ed000 rw-p 0000a000 08:02 32340 /lib/libgcc_s.so.1
b77ed000-b7829000 r-xp 00000000 08:02 32342 /lib/libncurses.so.5.6
b7829000-b7831000 rw-p 0003b000 08:02 32342 /lib/libncurses.so.5.6
b783f000-b784b000 r-xp 00000000 08:02 340822 /usr/lib/python-support/jack/python2.5/jack_cursesmodule.so
b784b000-b784c000 rw-p 0000c000 08:02 340822 /usr/lib/python-support/jack/python2.5/jack_cursesmodule.so
b784c000-b784e000 r-xp 00000000 08:02 393314 /usr/lib/python2.5/lib-dynload/_heapq.so
b784e000-b7850000 rw-p 00002000 08:02 393314 /usr/lib/python2.5/lib-dynload/_heapq.so
b7850000-b7855000 r-xp 00000000 08:02 388280 /usr/lib/python2.5/lib-dynload/itertools.so
b7855000-b7857000 rw-p 00005000 08:02 388280 /usr/lib/python2.5/lib-dynload/itertools.so
b7857000-b78d9000 rw-p b7857000 00:00 0
b78d9000-b78e4000 r-xp 00000000 08:02 260609 /usr/lib/libvorbisenc.so.2.0.3
b78e4000-b79d2000 rw-p 0000b000 08:02 260609 /usr/lib/libvorbisenc.so.2.0.3
b79d2000-b79d9000 r-xp 00000000 08:02 260611 /usr/lib/libvorbisfile.so.3.2.0
b79d9000-b79da000 rw-p 00006000 08:02 260611 /usr/lib/libvorbisfile.so.3.2.0
b79da000-b79f4000 r-xp 00000000 08:02 260607 /usr/lib/libvorbis.so.0.4.0
b79f4000-b7a02000 rw-p 0001a000 08:02 260607 /usr/lib/libvorbis.so.0.4.0
b7a03000-b7a06000 r-xp 00000000 08:02 393390 /usr/lib/python2.5/lib-dynload/termios.so
b7a06000-b7a08000 rw-p 00002000 08:02 393390 /usr/lib/python2.5/lib-dynload/termios.so
b7a08000-b7a0e000 r-xp 00000000 08:02 388147 /usr/lib/python2.5/lib-dynload/array.so
b7a0e000-b7a10000 rw-p 00006000 08:02 388147 /usr/lib/python2.5/lib-dynload/array.so
b7a10000-b7a14000 r-xp 00000000 08:02 260442 /usr/lib/libogg.so.0.5.3
b7a14000-b7a15000 rw-p 00003000 08:02 260442 /usr/lib/libogg.so.0.5.3
b7a16000-b7a17000 r-xp 00000000 08:02 393313 /usr/lib/python2.5/lib-dynload/_bisect.so
b7a17000-b7a18000 rw-p 00001000 08:02 393313 /usr/lib/python2.5/lib-dynload/_bisect.so
b7a18000-b7a21000 r-xp 00000000 08:02 340815 /usr/lib/python-support/python-pyvorbis/python2.5/ogg/vorbis.so
b7a21000-b7a23000 rw-p 00009000 08:02 340815 /usr/lib/python-support/python-pyvorbis/python2.5/ogg/vorbis.so
b7a23000-b7a27000 r-xp 00000000 08:02 340804 /usr/lib/python-support/python-pyogg/python2.5/ogg/_ogg.so
b7a27000-b7a28000 rw-p 00004000 08:02 340804 /usr/lib/python-support/python-pyogg/python2.5/ogg/_ogg.so
b7a28000-b7a2a000 r-xp 00000000 08:02 387950 /usr/lib/python2.5/lib-dynload/_random.so
b7a2a000-b7a2b000 rw-p 00002000 08:02 387950 /usr/lib/python2.5/lib-dynload/_random.so
b7a2b000-b7a8c000 rw-p b7a2b000 00:00 0
b7a8c000-b7bb7000 r-xp 00000000 08:02 323510 /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7bb7000-b7bcc000 rw-p 0012a000 08:02 323510 /usr/lib/i686/cmov/libcrypto.so.0.9.8
b7bcc000-b7bcf000 rw-p b7bcc000 00:00 0
b7bcf000-b7c0c000 r-xp 00000000 08:02 323511 /usr/lib/i686/cmov/libssl.so.0.9.8
b7c0c000-b7c10000 rw-p 0003c000 08:02 323511 /usr/lib/i686/cmov/libssl.so.0.9.8
b7c10000-b7c12000 r-xp 00000000 08:02 393331 /usr/lib/python2.5/lib-dynload/_hashlib.so
b7c12000-b7c13000 rw-p 00002000 08:02 393331 /usr/lib/python2.5/lib-dynload/_hashlib.so
b7c13000-b7c14000 r-xp 00000000 08:02 340798 /usr/lib/python-support/python-cddb/python2.5/cdrom.so
b7c14000-b7c15000 rw-p 00001000 08:02 340798 /usr/lib/python-support/python-cddb/python2.5/cdrom.so
b7c15000-b7c19000 r-xp 00000000 08:02 388254 /usr/lib/python2.5/lib-dynload/binascii.so
b7c19000-b7c1a000 rw-p 00003000 08:02 388254 /usr/lib/python2.5/lib-dynload/binascii.so
b7c1a000-b7c1d000 r-xp 00000000 08:02 388282 /usr/lib/python2.5/lib-dynload/math.so
b7c1d000-b7c1e000 rw-p 00002000 08:02 388282 /usr/lib/python2.5/lib-dynload/math.so
b7c1e000-b7c21000 r-xp 00000000 08:02 393330 /usr/lib/python2.5/lib-dynload/_ssl.so
b7c21000-b7c22000 rw-p 00003000 08:02 393330 /usr/lib/python2.5/lib-dynload/_ssl.so
b7c22000-b7c63000 rw-p b7c22000 00:00 0
b7c63000-b7c77000 r-xp 00000000 08:02 260642 /usr/lib/libz.so.1.2.3.3
b7c77000-b7c78000 rw-p 00013000 08:02 260642 /usr/lib/libz.so.1.2.3.3
b7c79000-b7c83000 r-xp 00000000 08:02 387951 /usr/lib/python2.5/lib-dynload/_socket.so
b7c83000-b7c86000 rw-p 0000a000 08:02 387951 /usr/lib/python2.5/lib-dynload/_socket.so
b7c86000-b7c8a000 r-xp 00000000 08:02 388295 /usr/lib/python2.5/lib-dynload/zlib.so
b7c8a000-b7c8b000 rw-p 00004000 08:02 388295 /usr/lib/python2.5/lib-dynload/zlib.so
b7c8b000-b7c90000 r-xp 00000000 08:02 388284 /usr/lib/python2.5/lib-dynload/operator.so
b7c90000-b7c91000 rw-p 00005000 08:02 388284 /usr/lib/python2.5/lib-dynload/operator.so
b7c91000-b7c94000 r-xp 00000000 08:02 393319 /usr/lib/python2.5/lib-dynload/_locale.so
b7c94000-b7c95000 rw-p 00003000 08:02 393319 /usr/lib/python2.5/lib-dynload/_locale.so
b7c95000-b7c98000 r-xp 00000000 08:02 387953 /usr/lib/python2.5/lib-dynload/cStringIO.so
b7c98000-b7c99000 rw-p 00003000 08:02 387953 /usr/lib/python2.5/lib-dynload/cStringIO.so
b7c99000-b7c9c000 r-xp 00000000 08:02 388286 /usr/lib/python2.5/lib-dynload/select.so
b7c9c000-b7c9d000 rw-p 00002000 08:02 388286 /usr/lib/python2.5/lib-dynload/select.so
b7c9d000-b7ca1000 r-xp 00000000 08:02 388288 /usr/lib/python2.5/lib-dynload/strop.so
b7ca1000-b7ca3000 rw-p 00003000 08:02 388288 /usr/lib/python2.5/lib-dynload/strop.so
b7ca3000-b7ce4000 rw-p b7ca3000 00:00 0
b7ce5000-b7cec000 r--s 00000000 08:02 275432 /usr/lib/gconv/gconv-modules.cache
b7cec000-b7d2b000 r--p 00000000 08:02 323873 /usr/lib/locale/en_US.utf8/LC_CTYPE
b7d2b000-b7daf000 rw-p b7d2b000 00:00 0
b7daf000-b7ef3000 r-xp 00000000 08:02 65601 /lib/tls/i686/cmov/libc-2.6.1.so
b7ef3000-b7ef4000 r--p 00143000 08:02 65601 /lib/tls/i686/cmov/libc-2.6.1.so
b7ef4000-b7ef6000 rw-p 00144000 08:02 65601 /lib/tls/i686/cmov/libc-2.6.1.so
b7ef6000-b7ef9000 rw-p b7ef6000 00:00 0
b7ef9000-b7f1c000 r-xp 00000000 08:02 65609 /lib/tls/i686/cmov/libm-2.6.1.so
b7f1c000-b7f1e000 rw-p 00023000 08:02 65609 /lib/tls/i686/cmov/libm-2.6.1.so
b7f1e000-b7f20000 r-xp 00000000 08:02 65653 /lib/tls/i686/cmov/libutil-2.6.1.so
b7f20000-b7f22000 rw-p 00001000 08:02 65653 /lib/tls/i686/cmov/libutil-2.6.1.so
b7f22000-b7f24000 r-xp 00000000 08:02 65607 /lib/tls/i686/cmov/libdl-2.6.1.so
b7f24000-b7f26000 rw-p 00001000 08:02 65607 /lib/tls/i686/cmov/libdl-2.6.1.so
b7f26000-b7f3a000 r-xp 00000000 08:02 65648 /lib/tls/i686/cmov/libpthread-2.6.1.so
b7f3a000-b7f3c000 rw-p 00013000 08:02 65648 /lib/tls/i686/cmov/libpthread-2.6.1.so
b7f3c000-b7f3f000 rw-p b7f3c000 00:00 0
b7f3f000-b7f41000 r-xp 00000000 08:02 388272 /usr/lib/python2.5/lib-dynload/fcntl.so
b7f41000-b7f42000 rw-p 00002000 08:02 388272 /usr/lib/python2.5/lib-dynload/fcntl.so
b7f42000-b7f47000 r-xp 00000000 08:02 387952 /usr/lib/python2.5/lib-dynload/_struct.so
b7f47000-b7f48000 rw-p 00005000 08:02 387952 /usr/lib/python2.5/lib-dynload/_struct.so
b7f48000-b7f4b000 r-xp 00000000 08:02 388292 /usr/lib/python2.5/lib-dynload/time.so
b7f4b000-b7f4d000 rw-p 00002000 08:02 388292 /usr/lib/python2.5/lib-dynload/time.so
b7f4d000-b7f4e000 rw-p b7f4d000 00:00 0
b7f4e000-b7f68000 r-xp 00000000 08:02 35265 /lib/ld-2.6.1.so
b7f68000-b7f6a000 rw-p 00019000 08:02 35265 /lib/ld-2.6.1.so
bf7fe000-bf826000 rw-p bf7fe000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
Aborted (core dumped)

At this point, the console is confused and I need to type reset to get it unconfused.

Thank you for any support you can give.

cc

Revision history for this message
irwand (irwan-djajadi) wrote :
Download full text (9.0 KiB)

I have the same problem. Here are the output from the command "jack" with a music CD in the CDROM drive. Can someone help resolve this? jack is an excellent ripper.

This is jack 3.1.1 (C)2004 Arne Zellentin <email address hidden>
 if create_dirs is set and freedb data is
 *info* matching dir found: ./jack-7e0bcb1a
^[(B^[)0^[[?1049h^[[1;24r^[[m^[[4lTraceback (most recent call last):
  File "/usr/bin/jack", line 234, in <module>
    jack_term.enable()
  File "/var/lib/python-support/python2.5/jack_term.py", line 187, in enable
    tmod.enable()
  File "/var/lib/python-support/python2.5/jack_t_curses.py", line 93, in enable
    noecho() ; cbreak()
curses.error: cbreak() returned ERR
 *warning* abnormal exit

*** glibc detected *** /usr/bin/python: munmap_chunk(): invalid pointer: 0xb7cbc
2f0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(cfree+0x1bb)[0xb7dac92b]
/var/lib/python-support/python2.5/jack_cursesmodule.so[0xb77f0117]
/usr/bin/python[0x80855f9]
/usr/bin/python(PyDict_SetItem+0x6e)[0x8086f5e]
/usr/bin/python(_PyModule_Clear+0x158)[0x8088bb8]
/usr/bin/python(PyImport_Cleanup+0x33a)[0x80dd2ca]
/usr/bin/python(Py_Finalize+0xbf)[0x80e931f]
/usr/bin/python[0x80e8e6a]
/usr/bin/python(PyErr_PrintEx+0x195)[0x80e9065]
/usr/bin/python(PyRun_SimpleFileExFlags+0xe3)[0x80e9883]
/usr/bin/python(Py_Main+0x9c0)[0x8059390]
/usr/bin/python(main+0x22)[0x80588c2]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7d55050]
/usr/bin/python[0x8058831]
======= Memory map: ========
08048000-0813f000 r-xp 00000000 03:06 604204 /usr/bin/python2.5
0813f000-08164000 rw-p 000f6000 03:06 604204 /usr/bin/python2.5
08164000-082ab000 rw-p 08164000 00:00 0 [heap]
b7780000-b778a000 r-xp 00000000 03:06 197629 /lib/libgcc_s.so.1
b778a000-b778b000 rw-p 0000a000 03:06 197629 /lib/libgcc_s.so.1
b778b000-b77c7000 r-xp 00000000 03:06 196224 /lib/libncurses.so.5.6
b77c7000-b77cf000 rw-p 0003b000 03:06 196224 /lib/libncurses.so.5.6
b77ea000-b77f6000 r-xp 00000000 03:06 995618 /usr/lib/python-support/jack/py
thon2.5/jack_cursesmodule.so
b77f6000-b77f7000 rw-p 0000c000 03:06 995618 /usr/lib/python-support/jack/py
thon2.5/jack_cursesmodule.so
b77f7000-b7879000 rw-p b77f7000 00:00 0
b7879000-b7884000 r-xp 00000000 03:06 931260 /usr/lib/libvorbisenc.so.2.0.3
b7884000-b7972000 rw-p 0000b000 03:06 931260 /usr/lib/libvorbisenc.so.2.0.3
b7972000-b7979000 r-xp 00000000 03:06 931251 /usr/lib/libvorbisfile.so.3.2.0
b7979000-b797a000 rw-p 00006000 03:06 931251 /usr/lib/libvorbisfile.so.3.2.0
b797a000-b7994000 r-xp 00000000 03:06 931273 /usr/lib/libvorbis.so.0.4.0
b7994000-b79a2000 rw-p 0001a000 03:06 931273 /usr/lib/libvorbis.so.0.4.0
b79a5000-b79a7000 r-xp 00000000 03:06 983432 /usr/lib/python2.5/lib-dynload/
_heapq.so
b79a7000-b79a9000 rw-p 00002000 03:06 983432 /usr/lib/python2.5/lib-dynload/
_heapq.so
b79a9000-b79ae000 r-xp 00000000 03:06 980706 /usr/lib/python2.5/lib-dynload/
itertools.so
b79ae000-b79b0000 rw-p 00005000 03:06 980706 /usr/lib/python2.5/lib-dynload/itertools.so
b79b0000-b79b3000 r-xp 00000000 03:06 983670 /usr/lib/python2.5/lib-dynload/termios.so
b79b3000-b79b5000 rw-p 00...

Read more...

Revision history for this message
irwand (irwan-djajadi) wrote :

OK, well, after googling around some more, I found a workaround from:
https://bugs.launchpad.net/ubuntu/+source/jack/+bug/74355

"python2.4 /usr/bin/jack" works beautifully.. for now.. I hope jack can work in the future with python2.5 and above.

Revision history for this message
Forest Bond (forest-bond) wrote :

This bug still exists in Hardy.

Revision history for this message
Daniel Stränger (schmaller) wrote :

I can confirm this on hardy-proposed with python2.5.
If this error can't be fixed, at least the dependencies should be adjusted to be incompatible with python2.5.

Changed in jack:
status: New → Confirmed
Revision history for this message
Bastl (s-menge) wrote :

confirmed.

Revision history for this message
Bastl (s-menge) wrote :

Small proposal for a quick fix:

set dependency to python 2.4
replace first line of /usr/bin/jack

  #!/usr/bin/python

by

  #!/usr/bin/python2.4

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.