DeaDBeeF-Player / deadbeef

DeaDBeeF Player
https://deadbeef.sourceforge.io/
Other
1.65k stars 178 forks source link

Segfault on playing track or skipping to next track; caused by default plugins. #927

Closed Oleksiy-Yakovenko closed 9 years ago

Oleksiy-Yakovenko commented 9 years ago

Original issue 1025 created by Alexey-Yakovenko on 2013-12-31T23:31:37.000Z:

What steps will reproduce the problem?

  1. Run deadbeef with any of the following plugins installed: adplug gme sid supereq
  2. Try to play a track (initially it would only occur when I skipped onto the next track).
  3. Segfault.

If I move all four plugins away from deadbeef's lib path than this error doesn't happen at all and I can play as many tracks as I want with the usual deadbeef rock-solidness.

I initially had deadbeef installed via pacman on Arch Linux from the official repositories some time ago. I never noticed any problems then (though I didn't use it that much). Today I installed from the Arch User Repository (AUR) both the jack output plugin and the MPRIS plugin:

https://aur.archlinux.org/packages/deadbeef-mpris-plugin/ https://aur.archlinux.org/packages/jack_output_for_deadbeef/

I think it was shortly after I had installed the MPRIS plugin that this first started happening. Therefore, I uninstalled both AUR packages and then also uninstalled deadbeef, rebooted my system, and reinstalled just deadbeef (all via pacman). However, the error continued to occur everytime.

I've now downloaded a copy of the source and have compiled and installed a development version in a seperate directory, and have replicated the fault there. I don't really know what's happening here. I have also updated Arch Linux today, so please let me know if this is being caused by something in my system rather than something in deadbeef. I googled "Unwind_GetLanguageSpecificData" and didn't find much.

I'm willing to do further debugging as necessary, though I can't promise I'll be very quick about it.

What is the expected output? What do you see instead?

Instead of playing the track, the application segfaults and this is printed to the console (the listed plugin depends on which of the four above I've still got enabled):

Segmentation Fault backtrace() returned 3 addresses deadbeef() [0x403940] /usr/lib/libc.so.6(+0x35390) [0x7f4beed6e390] /usr/lib/deadbeef/supereq.so(_Unwind_GetLanguageSpecificData+0) [0x7f4bdefa65a0]

What version of the product are you using? On what operating system and CPU architecture?

Self-compiled development version: $ ./bin/deadbeef --version starting deadbeef devel DeaDBeeF devel Copyright �� 2009-2013 Alexey Yakovenko

Original Arch-Linux repository version: $ deadbeef --version starting deadbeef 0.6.0 DeaDBeeF 0.6.0 Copyright �� 2009-2013 Alexey Yakovenko

$ uname -a
Linux arch-lenny 3.12.6-1-ARCH # 1 SMP PREEMPT Fri Dec 20 19:39:00 CET 2013 x86_64 GNU/Linux

Please provide any additional information below.

FYI: My audio set-up is slightly fringe-case. Everything goes to ALSA which then goes to JACK via the ALSA-JACK plug-in, and JACK is running with FFADO to a firewire Presonus Firebox sound card. However, it's actually quite stable these days. Just thought I'd mention it.

GDB Backtrace:

$ /usr/bin/gdb ./bin/deadbeef GNU gdb (GDB) 7.6.2 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt; This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/&gt;... Reading symbols from /home/paul/Development/deadbeef/bin/bin/deadbeef...done. (gdb) r Starting program: /home/paul/Development/deadbeef/bin/./bin/deadbeef warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". starting deadbeef devel server_start loading plugins from /home/paul/.local/lib64/deadbeef loading plugins from /home/paul/.local/lib/deadbeef loading plugins from /home/paul/Development/deadbeef/bin/lib/deadbeef plug_load_all: scandir found 228 files loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/aac.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/adplug.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/alac.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/alsa.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/artwork.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/cdda.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/converter.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/converter_gtk2.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/converter_gtk3.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/dca.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ddb_ao.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ddb_dumb.so found gui plugin ddb_gui_GTK2.so added GTK2 gui plugin found gui plugin ddb_gui_GTK3.so added GTK3 gui plugin loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ddb_mono2stereo.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ddb_shn.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/dsp_libsrc.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ffmpeg.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/flac.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/gme.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/hotkeys.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/lastfm.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/m3u.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/mms.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/mpgmad.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/musepack.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/notify.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/nullout.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/oss.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/pltbrowser_gtk2.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/pltbrowser_gtk3.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/pulse.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/shellexec.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/shellexecui_gtk2.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/shellexecui_gtk3.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/sid.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/sndfile.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/supereq.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/tta.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/vfs_curl.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/vorbis.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/vtx.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/wavpack.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/wildmidi.so loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/wma.so checking GUI plugin: GTK2 checking GUI plugin: GTK3 found selected GUI plugin: GTK3 loading plugin /home/paul/Development/deadbeef/bin/lib/deadbeef/ddb_gui_GTK3.so [New Thread 0x7fffdebb0700 (LWP 8706)] [New Thread 0x7fffde3af700 (LWP 8707)] [New Thread 0x7fffddbae700 (LWP 8708)] libWildMidi(WM_BufferFile:640): ERROR Unable to stat /etc/timidity/freepats/freepats.cfg (No such file or directory) selected output plugin: ALSA output plugin INFO: loading playlist Batsch - Tiles EP INFO: from file /home/paul/.config/deadbeef/playlists/0.dbpl [New Thread 0x7fffdd3ad700 (LWP 8709)] convgui: gtkui plugin not found plugin Converter GTK2 UI failed to connect to dependencies, deactivated. pltbrowser: can't find gtkui plugin plugin pltbrowser failed to connect to dependencies, deactivated. shellexecui: can't find gtkui plugin plugin Shellexec GTK2 UI failed to connect to dependencies, deactivated. [New Thread 0x7ffff3877700 (LWP 8710)] [New Thread 0x7fffdcbac700 (LWP 8711)] gtkui plugin compiled for gtk version: 3.10.6 [New Thread 0x7fffdb911700 (LWP 8712)] connecting button tray signals [New Thread 0x7fffd9085700 (LWP 8715)] gtkui: found cover-art loader plugin

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed

(deadbeef:8702): Gdk-CRITICAL **: gdk_device_get_n_axes: assertion 'gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD' failed jack_client_new: deprecated [New Thread 0x7ffff2e70700 (LWP 8734)] [New Thread 0x7fffd8680700 (LWP 8735)] [New Thread 0x7fffcbfff700 (LWP 8736)] [New Thread 0x7fffd85ff700 (LWP 8737)]

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd85ff700 (LWP 8737)] 0x00007ffff6e98610 in _Unwind_GetLanguageSpecificData () from /home/paul/Development/deadbeef/bin/lib/deadbeef/adplug.so (gdb) thread apply all backtrace

Thread 13 (Thread 0x7fffd85ff700 (LWP 8737)):

 0 0x00007ffff6e98610 in _Unwind_GetLanguageSpecificData () from /home/paul/Development/deadbeef/bin/lib/deadbeef/adplug.so

 1 0x00007ffff671bd44 in __gcc_personality_v0 () from /usr/lib/libgcc_s.so.1

 2 0x00007ffff67198e4 in ?? () from /usr/lib/libgcc_s.so.1

 3 0x00007ffff6719c34 in _Unwind_ForcedUnwind () from /usr/lib/libgcc_s.so.1

 4 0x00007ffff76c75b0 in __pthread_unwind () from /usr/lib/libpthread.so.0

 5 0x00007ffff76bfa75 in sigcancel_handler () from /usr/lib/libpthread.so.0

 6 <signal handler called>

 7 0x00007ffff76c70d0 in sem_timedwait () from /usr/lib/libpthread.so.0

 8 0x00007fffd8062fcc in ?? () from /usr/lib/libjack.so.0

 9 0x00007fffd804c9a9 in ?? () from /usr/lib/libjack.so.0

 10 0x00007fffd804bc2f in ?? () from /usr/lib/libjack.so.0

 11 0x00007fffd804afa8 in ?? () from /usr/lib/libjack.so.0

 12 0x00007fffd80625c0 in ?? () from /usr/lib/libjack.so.0

 13 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 14 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 12 (Thread 0x7fffcbfff700 (LWP 8736)):

 0 0x00007ffff73c5a7d in nanosleep () from /usr/lib/libc.so.6

 1 0x00007ffff73edcb4 in usleep () from /usr/lib/libc.so.6

 2 0x00007ffff62f599f in palsa_thread (context=0x0) at alsa.c:631

 3 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 4 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 11 (Thread 0x7fffd8680700 (LWP 8735)):

 0 0x00007ffff76c7a7d in read () from /usr/lib/libpthread.so.0

 1 0x00007fffd8063d94 in ?? () from /usr/lib/libjack.so.0

 2 0x00007fffd806660c in ?? () from /usr/lib/libjack.so.0

 3 0x00007fffd80625c0 in ?? () from /usr/lib/libjack.so.0

 4 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 5 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 10 (Thread 0x7ffff2e70700 (LWP 8734)):

 0 0x00007ffff76c503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

 1 0x00007fffd806348c in ?? () from /usr/lib/libjack.so.0

 2 0x00007fffd805f398 in ?? () from /usr/lib/libjack.so.0

 3 0x00007fffd80625c0 in ?? () from /usr/lib/libjack.so.0

 4 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 5 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 9 (Thread 0x7fffd9085700 (LWP 8715)):

 0 0x00007ffff76c503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

 1 0x000000000041bbe1 in cond_wait (c=11641856, m=11683120) at threading_pthread.c:217

 2 0x00007fffdec13b30 in loading_thread (none=0x0) at coverart.c:133

 3 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 4 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 8 (Thread 0x7fffdb911700 (LWP 8712)):

 0 0x00007ffff73eb91d in poll () from /usr/lib/libc.so.6

 1 0x00007ffff1300584 in ?? () from /usr/lib/libglib-2.0.so.0

---Type <return> to continue, or q <return> to quit---

 2 0x00007ffff13009ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

 3 0x00007ffff2173176 in ?? () from /usr/lib/libgio-2.0.so.0

 4 0x00007ffff1324fb5 in ?? () from /usr/lib/libglib-2.0.so.0

 5 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 6 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 7 (Thread 0x7fffdcbac700 (LWP 8711)):

 0 0x00007ffff76c503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

 1 0x000000000041bbe1 in cond_wait (c=7586192, m=7586144) at threading_pthread.c:217

 2 0x000000000041a8d7 in messagepump_wait () at messagepump.c:115

 3 0x0000000000403f68 in player_mainloop () at main.c:636

 4 0x0000000000404200 in mainloop_thread (ctx=0x0) at main.c:714

 5 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 6 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 6 (Thread 0x7ffff3877700 (LWP 8710)):

 0 0x00007ffff73ed593 in select () from /usr/lib/libc.so.6

 1 0x0000000000403ad1 in server_loop (ctx=0x0) at main.c:493

 2 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 3 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7fffdd3ad700 (LWP 8709)):

 0 0x00007ffff76c24a2 in pthread_join () from /usr/lib/libpthread.so.0

 1 0x00007fffd80628b9 in ?? () from /usr/lib/libjack.so.0

 2 0x00007fffd8049a64 in ?? () from /usr/lib/libjack.so.0

 3 0x00007fffd868291a in ?? () from /usr/lib/alsa-lib/libasound_module_pcm_jack.so

 4 0x00007ffff60907f6 in ?? () from /usr/lib/libasound.so.2

 5 0x00007ffff62f53e5 in palsa_setformat (fmt=0x7fffdd323780) at alsa.c:455

 6 0x000000000041737e in streamer_set_output_format () at streamer.c:2012

 7 0x00000000004179ef in streamer_read_async (bytes=0x641260 <readbuffer> "", size=16380) at streamer.c:2126

 8 0x00000000004161ca in streamer_thread (ctx=0x0) at streamer.c:1584

 9 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 10 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fffddbae700 (LWP 8708)):

 0 0x00007ffff76c503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

 1 0x000000000041bbe1 in cond_wait (c=7893616, m=7636176) at threading_pthread.c:217

 2 0x00007fffe38298eb in lfm_thread (ctx=0x0) at lastfm.c:719

 3 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 4 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffde3af700 (LWP 8707)):

 0 0x00007ffff73c5a7d in nanosleep () from /usr/lib/libc.so.6

 1 0x00007ffff73edcb4 in usleep () from /usr/lib/libc.so.6

 2 0x00007fffe3a3e42c in hotkeys_event_loop (unused=0x0) at hotkeys.c:493

 3 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 4 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffdebb0700 (LWP 8706)):

 0 0x00007ffff76c503f in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0

 1 0x000000000041bbe1 in cond_wait (c=7940720, m=7631392) at threading_pthread.c:217

---Type <return> to continue, or q <return> to quit---

 2 0x00007ffff5bee928 in fetcher_thread (none=0x0) at artwork.c:824

 3 0x00007ffff76c10a2 in start_thread () from /usr/lib/libpthread.so.0

 4 0x00007ffff73f43dd in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff7fcb700 (LWP 8702)):

 0 0x00007ffff73eb91d in poll () from /usr/lib/libc.so.6

 1 0x00007ffff1300584 in ?? () from /usr/lib/libglib-2.0.so.0

 2 0x00007ffff13009ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

 3 0x00007fffec801985 in gtk_main () from /usr/lib/libgtk-3.so.0

 4 0x00007fffdebdea5a in gtkui_thread (ctx=0x0) at gtkui.c:1104

 5 0x00007fffdebdf145 in gtkui_start () at gtkui.c:1223

 6 0x0000000000404dbd in main (argc=1, argv=0x7fffffffeaa8) at main.c:1013

Thanks!

Oleksiy-Yakovenko commented 9 years ago

Comment #1 originally posted by Alexey-Yakovenko on 2014-01-01T12:40:45.000Z:

deadbeef uses few hacks in order to get rid of libstdc++ dependency in the static builds. specifically, it defines "int _Unwind_GetLanguageSpecificData;" and few other similar ones to shut up gcc error messages. from the backtrace (thread 13), it looks like jack plugin raises a signal (sigcancel), which triggers the __pthread_unwind in the adplug plugin, which in turn uses the functions that are explicitly defined as NULL in all c++ plugins in deadbeef. this is the cause of the crash.

it's not clear to me right now where to go from there. it doesn't look like correct behaviour from libjack side, in the first place, to do nasty things like that.

anyway, thanks for the heads up on the issue.

Oleksiy-Yakovenko commented 9 years ago

Comment #2 originally posted by Alexey-Yakovenko on 2014-01-04T21:25:28.000Z:

suspected fixed on git master, please check it out.

Oleksiy-Yakovenko commented 9 years ago

Comment #3 originally posted by Alexey-Yakovenko on 2014-01-05T10:49:40.000Z:

I've checked out the latest git and can confirm I no longer get the issue.

Thanks a whole bunch :D