Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
On Tue, Sep 19, 2017 at 13:12:27 +0200, Peter P. wrote: > Thank you Mike, switching to jackd2 does work for me as well! I am a bit > hesitant to switch my system to jackd2 as there are some other > applications that depend (more) on jackd1. I wonder if this workaround, > for which I am very thankful, means that the crash with jackd1 will not > me looked into further, or if it may be worked on nevertheless. I also get success with jackd1: $ jackd -r -d alsa -d hw:1 -D -r 44100 & [1] 5042 jackd 0.125.0rc1 ... $ octave-cli -q >> devs = audiodevinfo; ## no crash >> devs.output.Name ans = HDA Intel HDMI: 0 (hw:0,3) (ALSA) ans = HDA Intel HDMI: 1 (hw:0,7) (ALSA) ans = HDA Intel HDMI: 2 (hw:0,8) (ALSA) ans = HDA Intel HDMI: 3 (hw:0,9) (ALSA) ans = HDA Intel HDMI: 4 (hw:0,10) (ALSA) ans = hdmi (ALSA) ans = default (ALSA) ans = system (JACK Audio Connection Kit) >> x = audioplayer (y, fs, nbits, 7); ## jack ID == 7 >> play (x); ## produces audio I'm sorry but I use neither jackd1 nor jackd2, so this is probably as far as I can investigate myself. And as far as I can tell they both work with Octave. If you can investigate further and find what is causing this on your system, please do report back. Or if you find that you can reproduce this on a clean system and give instructions for how to do so, someone may be able to help. But so far this looks unreproducible to me. -- mike signature.asc Description: PGP signature
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
* Mike Miller[2017-09-08 17:26]: > On Fri, Sep 08, 2017 at 10:55:21 +0200, Peter P. wrote: > > The two other programs I have installed that are using libportaudio2 are > > pure-data and audacity. And they both work with and without jack. > > And here's what I just did to test locally. This is admittedly an > absolutely minimal unconfigured jack setup. > > $ sudo aptitude install -y --without-recommends jackd2 > $ jack_control start > $ octave-cli > >> devs = audiodevinfo; ## no crash > >> devs.output.Name > ans = HDA Intel HDMI: 0 (hw:0,3) (ALSA) > ans = HDA Intel HDMI: 1 (hw:0,7) (ALSA) > ans = HDA Intel HDMI: 2 (hw:0,8) (ALSA) > ans = HDA Intel HDMI: 3 (hw:0,9) (ALSA) > ans = HDA Intel HDMI: 4 (hw:0,10) (ALSA) > ans = hdmi (ALSA) > ans = default (ALSA) > ans = system (JACK Audio Connection Kit) > > Seems to work for me. Thank you Mike, switching to jackd2 does work for me as well! I am a bit hesitant to switch my system to jackd2 as there are some other applications that depend (more) on jackd1. I wonder if this workaround, for which I am very thankful, means that the crash with jackd1 will not me looked into further, or if it may be worked on nevertheless. best, Peter
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
On Fri, Sep 08, 2017 at 10:55:21 +0200, Peter P. wrote: > The two other programs I have installed that are using libportaudio2 are > pure-data and audacity. And they both work with and without jack. And here's what I just did to test locally. This is admittedly an absolutely minimal unconfigured jack setup. $ sudo aptitude install -y --without-recommends jackd2 $ jack_control start $ octave-cli >> devs = audiodevinfo; ## no crash >> devs.output.Name ans = HDA Intel HDMI: 0 (hw:0,3) (ALSA) ans = HDA Intel HDMI: 1 (hw:0,7) (ALSA) ans = HDA Intel HDMI: 2 (hw:0,8) (ALSA) ans = HDA Intel HDMI: 3 (hw:0,9) (ALSA) ans = HDA Intel HDMI: 4 (hw:0,10) (ALSA) ans = hdmi (ALSA) ans = default (ALSA) ans = system (JACK Audio Connection Kit) Seems to work for me. -- mike signature.asc Description: PGP signature
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
* Mike Miller[2017-09-08 05:35]: > On Thu, Sep 07, 2017 at 18:08:40 +0200, Peter P. wrote: > > Thanks for the clear instructions Mike, here it is: > > > > ~$ gdb --args octave-cli > > [...] > > Reading symbols from octave-cli...Reading symbols from > > /usr/lib/debug/.build-id/a7/beba93cf5339eac11d645050513a47c65388a8.debug...done. > > Thanks, that looks better. > > So a segmentation fault occurs in a jack client thread that must start > as a result of jack_activate, which is called by Pa_Initialize. > > I don't have a jack setup to try this on at the moment. It would be > useful to see if someone else can reproduce, and also to see if other > PortAudio-based programs or simple demos work with jack. The two other programs I have installed that are using libportaudio2 are pure-data and audacity. And they both work with and without jack.
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
On Thu, Sep 07, 2017 at 18:08:40 +0200, Peter P. wrote: > Thanks for the clear instructions Mike, here it is: > > ~$ gdb --args octave-cli > [...] > Reading symbols from octave-cli...Reading symbols from > /usr/lib/debug/.build-id/a7/beba93cf5339eac11d645050513a47c65388a8.debug...done. Thanks, that looks better. So a segmentation fault occurs in a jack client thread that must start as a result of jack_activate, which is called by Pa_Initialize. I don't have a jack setup to try this on at the moment. It would be useful to see if someone else can reproduce, and also to see if other PortAudio-based programs or simple demos work with jack. -- mike signature.asc Description: PGP signature
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
* Mike Miller[2017-09-06 18:55]: > On Wed, Sep 06, 2017 at 16:10:25 +0200, Peter P. wrote: > > The backtrace I provided was already with /usr/bin/octave --no-gui. I hope a > > 'stack trace' is the same thing as a 'backtrace', at least gdb's help > > text tells me so. > > But 'octave --no-gui' is not the same thing as 'octave-cli'. I would > like to see the backtrace with this crash occurring in 'octave-cli'. > > This backtrace: > > > (gdb) bt > > #0 0x7fffd8328bf0 in jack_thread_touch_stack () at thread.c:112 > > #1 0x7fffd8328fb9 in jack_thread_proxy (varg=0x7fffd44cfa80) at > > thread.c:128 > > #2 0x744ee494 in start_thread () at > > /lib/x86_64-linux-gnu/libpthread.so.0 > > #3 0x74232abf in clone () at /lib/x86_64-linux-gnu/libc.so.6 > > is not very helpful because it only shows a jack thread running, there > is nothing there about what Octave is doing. > > Please try with 'octave-cli', with octave dbgsym packages installed as > well, and use 'thread apply all bt' in gdb to be sure to capture all > running threads. Thanks for the clear instructions Mike, here it is: ~$ gdb --args octave-cli [...] Reading symbols from octave-cli...Reading symbols from /usr/lib/debug/.build-id/a7/beba93cf5339eac11d645050513a47c65388a8.debug...done. done. (gdb) run Starting program: /usr/bin/octave-cli [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". GNU Octave, version 4.2.1 [...] octave:1> audiodevinfo() ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map [New Thread 0x7fffdfb4f700 (LWP 18685)] [New Thread 0x7fffdf34e700 (LWP 18688)] Thread 3 "octave-cli" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffdf34e700 (LWP 18688)] 0x7fffdff19bf0 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 (gdb) thread apply all bt Thread 3 (Thread 0x7fffdf34e700 (LWP 18688)): #0 0x7fffdff19bf0 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 #1 0x7fffdff19fb9 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 #2 0x749f8494 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #3 0x7473cabf in clone () from /lib/x86_64-linux-gnu/libc.so.6 Thread 2 (Thread 0x7fffdfb4f700 (LWP 18685)): #0 0x749fe15f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x7fffdff15b5f in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 #2 0x749f8494 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #3 0x7473cabf in clone () from /lib/x86_64-linux-gnu/libc.so.6 Thread 1 (Thread 0x77f9c940 (LWP 18601)): #0 0x749fe15f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0 #1 0x7fffdff1462b in jack_activate () from /usr/lib/x86_64-linux-gnu/libjack.so.0 #2 0x7fffe045068f in PaJack_Initialize () from /usr/lib/x86_64-linux-gnu/libportaudio.so.2 #3 0x7fffe0440553 in Pa_Initialize () from /usr/lib/x86_64-linux-gnu/libportaudio.so.2 #4 0x7fffe067fac4 in Faudiodevinfo (args=...) at libinterp/dldfcn/audiodevinfo.cc:114 #5 0x772497ab in octave_builtin::do_multi_index_op(int, octave_value_list const&, std::__cxx11::list const*) () from /usr/lib/x86_64-linux-gnu/liboctinterp.so.4 #6 0x772485ae in octave_builtin::subsref(std::__cxx11::basic_string const&, std::__cxx11::list const&, int, std::__cxx11::list const*) () from /usr/lib/x86_64-linux-gnu/liboctinterp.so.4 #7 0x772490f0 in octave_builtin::subsref(std::__cxx11::basic_string const&, std::__cxx11::list const&, int) () from /usr/lib/x86_64-linux-gnu/liboctinterp.so.4 #8 0x77354e0c in octave_value::subsref(std::__cxx11::basic_string const&, std::__cxx11::list const&, int) () from /usr/lib/x86_64-linux-gnu/liboctinterp.so.4 #9 0x77354ebd in octave_value::subsref(std::__cxx11::basic_string const&, std::__cxx11::list const&, int, std::__cxx11::list const*) () from /usr/lib/x86_64-linux-gnu/liboctinterp.so.4 #10 0x774122e5 in
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
On Wed, Sep 06, 2017 at 16:10:25 +0200, Peter P. wrote: > The backtrace I provided was already with /usr/bin/octave --no-gui. I hope a > 'stack trace' is the same thing as a 'backtrace', at least gdb's help > text tells me so. But 'octave --no-gui' is not the same thing as 'octave-cli'. I would like to see the backtrace with this crash occurring in 'octave-cli'. This backtrace: > (gdb) bt > #0 0x7fffd8328bf0 in jack_thread_touch_stack () at thread.c:112 > #1 0x7fffd8328fb9 in jack_thread_proxy (varg=0x7fffd44cfa80) at > thread.c:128 > #2 0x744ee494 in start_thread () at > /lib/x86_64-linux-gnu/libpthread.so.0 > #3 0x74232abf in clone () at /lib/x86_64-linux-gnu/libc.so.6 is not very helpful because it only shows a jack thread running, there is nothing there about what Octave is doing. Please try with 'octave-cli', with octave dbgsym packages installed as well, and use 'thread apply all bt' in gdb to be sure to capture all running threads. -- mike signature.asc Description: PGP signature
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
Hi Mike, * Mike Miller[2017-09-05 17:57]: > On Mon, Sep 04, 2017 at 11:10:46 +0200, Peter P. wrote: > > audiodevinfo makes octave segfault when jackd is running. I don't know > > if the octave audio functions are supposed to support jack. > > Octave's audio I/O functions are built on PortAudio, so they should work > with jackd as well as any other PortAudio program. I am pretty sure we > have had one person report success with audioplayer and jackd. > > > If they > > don't it would be great if octave could nevertheless survive. Thank you > > for looking into this, I am happy to help where I can. > > > > Here is the gdb backtrace: > > Can you please provide a stack trace showing this error in octave-cli, > to eliminate Qt multithreading, and with the relevant dbgsym packages > installed? The backtrace I provided was already with /usr/bin/octave --no-gui. I hope a 'stack trace' is the same thing as a 'backtrace', at least gdb's help text tells me so. With libjack0-dbgsym installed this is the output of gdb and its stack/backtrace for /usr/bin/octave --no-gui octave:1> audiodevinfo() ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map [New Thread 0x7fffd3c45700 (LWP 22139)] [New Thread 0x7fffd82dd700 (LWP 22158)] Thread 4 "QThread" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd82dd700 (LWP 22158)] jack_thread_touch_stack () at thread.c:112 112 thread.c: No such file or directory. (gdb) bt #0 0x7fffd8328bf0 in jack_thread_touch_stack () at thread.c:112 #1 0x7fffd8328fb9 in jack_thread_proxy (varg=0x7fffd44cfa80) at thread.c:128 #2 0x744ee494 in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0 #3 0x74232abf in clone () at /lib/x86_64-linux-gnu/libc.so.6
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
On Mon, Sep 04, 2017 at 11:10:46 +0200, Peter P. wrote: > audiodevinfo makes octave segfault when jackd is running. I don't know > if the octave audio functions are supposed to support jack. Octave's audio I/O functions are built on PortAudio, so they should work with jackd as well as any other PortAudio program. I am pretty sure we have had one person report success with audioplayer and jackd. > If they > don't it would be great if octave could nevertheless survive. Thank you > for looking into this, I am happy to help where I can. > > Here is the gdb backtrace: Can you please provide a stack trace showing this error in octave-cli, to eliminate Qt multithreading, and with the relevant dbgsym packages installed? -- mike signature.asc Description: PGP signature
Bug#874208: octave: audiodevinfo makes octave segfault when jackd is running
Package: octave Version: 4.2.1-2 Severity: normal Dear Maintainer, audiodevinfo makes octave segfault when jackd is running. I don't know if the octave audio functions are supposed to support jack. If they don't it would be great if octave could nevertheless survive. Thank you for looking into this, I am happy to help where I can. Here is the gdb backtrace: octave:1> audiodevinfo ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map [New Thread 0x7fffd3c45700 (LWP 24677)] [New Thread 0x7fffd82dd700 (LWP 24680)] Thread 4 "QThread" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd82dd700 (LWP 24680)] 0x7fffd8328bf0 in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 (gdb) bt #0 0x7fffd8328bf0 in () at /usr/lib/x86_64-linux-gnu/libjack.so.0 #1 0x7fffd8328fb9 in () at /usr/lib/x86_64-linux-gnu/libjack.so.0 #2 0x744ee494 in start_thread () at /lib/x86_64-linux-gnu/libpthread.so.0 #3 0x74232abf in clone () at /lib/x86_64-linux-gnu/libc.so.6 -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (900, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.11.0-1-rt-amd64 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages octave depends on: ii libamd2 1:4.5.5-1 ii libarpack2 3.5.0-1+b1 ii libasound2 1.1.3-5 ii libatlas3-base [liblapack.so.3] 3.10.3-3 ii libblas3 [libblas.so.3] 3.7.1-1+b1 ii libbz2-1.0 1.0.6-8.1 ii libc62.24-14 ii libcamd2 1:4.5.5-1 ii libccolamd2 1:4.5.5-1 ii libcholmod3 1:4.5.5-1 ii libcolamd2 1:4.5.5-1 ii libcxsparse3 1:4.5.5-1 ii libfftw3-double3 3.3.6p2-2 ii libfftw3-single3 3.3.6p2-2 ii libfltk-gl1.31.3.4-6 ii libfltk1.3 1.3.4-6 ii libfreetype6 2.8-0.2 ii libgcc1 1:7.2.0-1 ii libgl1-mesa-glx [libgl1] 13.0.6-1+b2 ii libglpk404.63-1 ii libglu1-mesa [libglu1] 9.0.0-2.1 ii libgomp1 7.2.0-1 ii liblapack3 [liblapack.so.3] 3.7.1-1+b1 ii liboctave4 4.2.1-2 ii libosmesa6 13.0.6-1+b2 ii libportaudio219.6.0-1 ii libqhull72015.2-2 ii libqrupdate1 1.1.2-2+b1 ii libqscintilla2-12v5 2.9.3+dfsg-4+b1 ii libqt4-network 4:4.8.7+dfsg-11 ii libqt4-opengl4:4.8.7+dfsg-11 ii libqtcore4 4:4.8.7+dfsg-11 ii libqtgui44:4.8.7+dfsg-11 ii libsndfile1 1.0.28-4 ii libstdc++6 7.2.0-1 ii libsuitesparseconfig41:4.5.5-1 ii libumfpack5 1:4.5.5-1 ii libx11-6 2:1.6.4-3 ii octave-common4.2.1-2 ii texinfo 6.4.90.dfsg.1-1+b1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages octave recommends: ii default-jre-headless 2:1.8-59 ii gnuplot-x11 5.0.7+dfsg1-1 ii libatlas3-base3.10.3-3 pn octave-info ii pstoedit 3.70-3+b2 Versions of packages octave suggests: ii octave-doc 4.2.1-2 ii octave-htmldoc 4.2.1-2 -- no debconf information