Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPD segfaults on play with HTTP stream output #2176

Open
LemonBreezes opened this issue Jan 5, 2025 · 12 comments
Open

MPD segfaults on play with HTTP stream output #2176

LemonBreezes opened this issue Jan 5, 2025 · 12 comments
Labels
waiting Waiting for more information from reporter

Comments

@LemonBreezes
Copy link

LemonBreezes commented Jan 5, 2025

Bug report

Describe the bug

When trying to play a song with the HTTP stream output, MPD segfaults.

Expected Behavior

I expect MPD to play the song without crashing.

Actual Behavior

MPD crashes with a segfault.

Version

~/.c/doom/modules/cae/modeline:(master-40dadd46e) λ mpd --verbose --version
Music Player Daemon 0.23.15 (0.23.15)
Copyright 2003-2007 Warren Dukes <[email protected]>
Copyright 2008-2021 Max Kellermann <[email protected]>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple

Storage plugins:
 local udisks

Neighbor plugins:
 udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [pcm]

Filters:


Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe pipewire pulse httpd

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip

Input plugins:
 file io_uring archive curl ffmpeg

Playlist plugins:
 extm3u m3u pls flac cue embcue

Protocols:
 file:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mmsh:// mmst:// rtmp:// rtmps:// rtmpt:// rtmpts:// rtp:// rtsp:// rtsps:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Configuration

# Recommended location for database
db_file            "~/.config/mpd/database"

# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
music_directory "~/Music/"

# Uncomment to refresh the database whenever files in the music_directory are changed
auto_update "yes"

# Uncomment to enable the functionalities
playlist_directory "~/.config/mpd/playlists"
state_file         "~/.local/state/mpd/state"
sticker_file       "~/.config/mpd/sticker.sql"

audio_output {
type            "pipewire"
name            "PipeWire Sound Server"
#bitrate		"128000"			# do not define if quality is defined
format		"48000:16:2"
}
audio_output {
type		"httpd"
name		"My HTTP Stream"
encoder        "lame"        # optional, vorbis or lame
port        "3001"
bind_to_address    "0.0.0.0"        # optional, IPv4 or IPv6
#quality		"5.0"			# do not define if bitrate is defined
bitrate		"128000"			# do not define if quality is defined
format		"48000:16:2"
always_on       "yes"			# prevent MPD from disconnecting all listeners when playback is stopped.
tags            "yes"			# httpd supports sending tags to listening streams.
max_clients    "0"            # optional 0=no limit
}

bind_to_address "0.0.0.0"

Log

Current directory is /home/st/.config/mpd/
GNU gdb (Gentoo 9999 vanilla) 17.0.50.20250105-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mpd...
Reading symbols from /usr/lib/debug/usr/bin/mpd.debug...
(gdb) r
Starting program: /usr/bin/mpd --verbose --no-daemon
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
config_file: loading file /home/st/.config/mpd/mpd.conf
vorbis: Xiph.Org libVorbis 1.3.7
opus: libopus 1.5.2
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
simple_db: reading DB
curl: version 8.11.1
curl: with OpenSSL/3.3.2
[New Thread 0x7fffe11f36c0 (LWP 18866)]
[New Thread 0x7fffe08636c0 (LWP 18867)]
[New Thread 0x7fffdfed36c0 (LWP 18868)]
[New Thread 0x7fffdf5436c0 (LWP 18869)]
[New Thread 0x7fffde5ff6c0 (LWP 18870)]

Thread 6 "output:My HTTP " received signal SIGSEGV, Segmentation fault.
AudioOutputSource::Fill (this=0x555555be9590, mutex=@0x555555be96d0: {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 2, __count = 0, __owner = 18870, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\266I\000\000\001", '\000' <repeats 26 times>, __align = 2}}, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
228		pending_tag = current_chunk->tag.get();
(gdb) backtrace
Selected thread is running.
(gdb) t 6
[Switching to thread 6 (Thread 0x7fffde5ff6c0 (LWP 18870))]
#0  AudioOutputSource::Fill (this=0x555555be9590, mutex=@0x555555be96d0: {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 2, __count = 0, __owner = 18870, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000\266I\000\000\001", '\000' <repeats 26 times>, __align = 2}}, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
228		pending_tag = current_chunk->tag.get();
(gdb) backtrace
#0  AudioOutputSource::Fill (this=0x555555be9590, mutex=@0x555555be96d0: {
  <std::__mutex_base> = {
    _M_mutex = {
      __data = {
        __lock = 2,
        __count = 0,
        __owner = 18870,
        __nusers = 1,
        __kind = 0,
        __spins = 0,
        __elision = 0,
        __list = {
          __prev = 0x0,
          __next = 0x0
        }
      },
      __size = "\002\000\000\000\000\000\000\000\266I\000\000\001", '\000' <repeats 26 times>,
      __align = 2
    }
  }, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
#1  AudioOutputControl::FillSourceOrClose (this=0x555555be9560) at ../mpd-0.23.15/src/output/Thread.cxx:226
#2  0x00005555555e3253 in AudioOutputControl::InternalPlay (this=0x555555be9560, lock=@0x7fffde5fea90: {
  _M_device = 0x555555be96d0,
  _M_owns = true
}) at ../mpd-0.23.15/src/output/Thread.cxx:296
#3  AudioOutputControl::Task (this=0x555555be9560) at ../mpd-0.23.15/src/output/Thread.cxx:447
#4  BindMethodDetail::WrapperGenerator<void (AudioOutputControl::*)() noexcept, &AudioOutputControl::Task>::Invoke(void*) (_instance=0x555555be9560) at ../mpd-0.23.15/src/util/BindMethod.hxx:130
#5  0x00005555555c4e67 in BoundMethod<void () noexcept>::operator()() const (this=0x555555be9628, this=<optimized out>) at ../mpd-0.23.15/src/util/BindMethod.hxx:77
#6  Thread::Run (this=0x555555be9628) at ../mpd-0.23.15/src/thread/Thread.cxx:63
#7  Thread::ThreadProc (ctx=0x555555be9628) at ../mpd-0.23.15/src/thread/Thread.cxx:92
#8  0x00007ffff40c367a in ??? () at /usr/lib64/libc.so.6
#9  0x00007ffff414216c in ??? () at /usr/lib64/libc.so.6
(gdb) 
@LemonBreezes
Copy link
Author

I am able to reproduce this easily but not 100% sure what the pattern is to be honest other than listening over HTTP.

@LemonBreezes
Copy link
Author

LemonBreezes commented Jan 6, 2025

I have been able to reproduce this as well with optimizations turned off and with GCC-12 used instead of GCC-14:

Current directory is /etc/portage/
GNU gdb (Gentoo 9999 vanilla) 17.0.50.20250106-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mpd...
Reading symbols from /usr/lib/debug/usr/bin/mpd.debug...
r
(gdb) Starting program: /usr/bin/mpd --verbose --no-daemon
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
config_file: loading file /home/st/.config/mpd/mpd.conf
vorbis: Xiph.Org libVorbis 1.3.7
opus: libopus 1.5.2
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
simple_db: reading DB
curl: version 8.11.1
curl: with OpenSSL/3.3.2
[New Thread 0x7fffe11f36c0 (LWP 291959)]
[New Thread 0x7fffe08636c0 (LWP 291960)]
[New Thread 0x7fffdfed36c0 (LWP 291961)]
[New Thread 0x7fffdf5436c0 (LWP 291962)]
[New Thread 0x7fffde5ff6c0 (LWP 291963)]

Thread 6 "output:My HTTP " received signal SIGSEGV, Segmentation fault.
0x00005555555a8f4c in std::__uniq_ptr_impl<Tag, std::default_delete<Tag> >::_M_ptr (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:193
193	      pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
(gdb) t 6
[Switching to thread 6 (Thread 0x7fffde5ff6c0 (LWP 291963))]
#0  0x00005555555a8f4c in std::__uniq_ptr_impl<Tag, std::default_delete<Tag> >::_M_ptr (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:193
193	      pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
(gdb) backtrace
#0  0x00005555555a8f4c in std::__uniq_ptr_impl<Tag, std::default_delete<Tag> >::_M_ptr (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:193
#1  0x00005555555a8e14 in std::unique_ptr<Tag, std::default_delete<Tag> >::get (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:465
#2  0x000055555564b0c3 in AudioOutputSource::Fill (this=0x555555d16590, mutex=@0x555555d166d0: {
  <std::__mutex_base> = {
    _M_mutex = {
      __data = {
        __lock = 2,
        __count = 0,
        __owner = 291963,
        __nusers = 1,
        __kind = 0,
        __spins = 0,
        __elision = 0,
        __list = {
          __prev = 0x0,
          __next = 0x0
        }
      },
      __size = "\002\000\000\000\000\000\000\000{t\004\000\001", '\000' <repeats 26 times>,
      __align = 2
    }
  }, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
#3  0x000055555564c2f9 in AudioOutputControl::FillSourceOrClose (this=0x555555d16560) at ../mpd-0.23.15/src/output/Thread.cxx:226
#4  0x000055555564c817 in AudioOutputControl::InternalPlay (this=0x555555d16560, lock=@0x7fffde5fea40: {
  _M_device = 0x555555d166d0,
  _M_owns = true
}) at ../mpd-0.23.15/src/output/Thread.cxx:296
#5  0x000055555564cea2 in AudioOutputControl::Task (this=0x555555d16560) at ../mpd-0.23.15/src/output/Thread.cxx:447
#6  0x000055555564614e in BindMethodDetail::WrapperGenerator<void (AudioOutputControl::*)() noexcept, &AudioOutputControl::Task>::Invoke(void*) (_instance=0x555555d16560) at ../mpd-0.23.15/src/util/BindMethod.hxx:130
#7  0x000055555560179a in BoundMethod<void () noexcept>::operator()() const (this=0x555555d16628) at ../mpd-0.23.15/src/util/BindMethod.hxx:78
#8  0x000055555560c37c in Thread::Run (this=0x555555d16628) at ../mpd-0.23.15/src/thread/Thread.cxx:63
#9  0x000055555560c3b1 in Thread::ThreadProc (ctx=0x555555d16628) at ../mpd-0.23.15/src/thread/Thread.cxx:92
#10 0x00007ffff40c367a in ??? () at /usr/lib64/libc.so.6
#11 0x00007ffff414216c in ??? () at /usr/lib64/libc.so.6
(gdb) f 1
#1  0x00005555555a8e14 in std::unique_ptr<Tag, std::default_delete<Tag> >::get (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:465
465	      { return _M_t._M_ptr(); }
(gdb) f 2
#2  0x000055555564b0c3 in AudioOutputSource::Fill (this=0x555555d16590, mutex=@0x555555d166d0: {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 2, __count = 0, __owner = 291963, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000{t\004\000\001", '\000' <repeats 26 times>, __align = 2}}, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
228		pending_tag = current_chunk->tag.get();
(gdb) f 0
#0  0x00005555555a8f4c in std::__uniq_ptr_impl<Tag, std::default_delete<Tag> >::_M_ptr (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:193
193	      pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
(gdb) f 1
#1  0x00005555555a8e14 in std::unique_ptr<Tag, std::default_delete<Tag> >::get (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:465
465	      { return _M_t._M_ptr(); }
(gdb) f 2
#2  0x000055555564b0c3 in AudioOutputSource::Fill (this=0x555555d16590, mutex=@0x555555d166d0: {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 2, __count = 0, __owner = 291963, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = "\002\000\000\000\000\000\000\000{t\004\000\001", '\000' <repeats 26 times>, __align = 2}}, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
228		pending_tag = current_chunk->tag.get();
(gdb) backtrace
#0  0x00005555555a8f4c in std::__uniq_ptr_impl<Tag, std::default_delete<Tag> >::_M_ptr (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:193
#1  0x00005555555a8e14 in std::unique_ptr<Tag, std::default_delete<Tag> >::get (this=0x98318566ba84a83f) at /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:465
#2  0x000055555564b0c3 in AudioOutputSource::Fill (this=0x555555d16590, mutex=@0x555555d166d0: {
  <std::__mutex_base> = {
    _M_mutex = {
      __data = {
        __lock = 2,
        __count = 0,
        __owner = 291963,
        __nusers = 1,
        __kind = 0,
        __spins = 0,
        __elision = 0,
        __list = {
          __prev = 0x0,
          __next = 0x0
        }
      },
      __size = "\002\000\000\000\000\000\000\000{t\004\000\001", '\000' <repeats 26 times>,
      __align = 2
    }
  }, <No data fields>}) at ../mpd-0.23.15/src/output/Source.cxx:228
#3  0x000055555564c2f9 in AudioOutputControl::FillSourceOrClose (this=0x555555d16560) at ../mpd-0.23.15/src/output/Thread.cxx:226
#4  0x000055555564c817 in AudioOutputControl::InternalPlay (this=0x555555d16560, lock=@0x7fffde5fea40: {
  _M_device = 0x555555d166d0,
  _M_owns = true
}) at ../mpd-0.23.15/src/output/Thread.cxx:296
#5  0x000055555564cea2 in AudioOutputControl::Task (this=0x555555d16560) at ../mpd-0.23.15/src/output/Thread.cxx:447
#6  0x000055555564614e in BindMethodDetail::WrapperGenerator<void (AudioOutputControl::*)() noexcept, &AudioOutputControl::Task>::Invoke(void*) (_instance=0x555555d16560) at ../mpd-0.23.15/src/util/BindMethod.hxx:130
#7  0x000055555560179a in BoundMethod<void () noexcept>::operator()() const (this=0x555555d16628) at ../mpd-0.23.15/src/util/BindMethod.hxx:78
#8  0x000055555560c37c in Thread::Run (this=0x555555d16628) at ../mpd-0.23.15/src/thread/Thread.cxx:63
#9  0x000055555560c3b1 in Thread::ThreadProc (ctx=0x555555d16628) at ../mpd-0.23.15/src/thread/Thread.cxx:92
#10 0x00007ffff40c367a in ??? () at /usr/lib64/libc.so.6
#11 0x00007ffff414216c in ??? () at /usr/lib64/libc.so.6
(gdb) 

@LemonBreezes
Copy link
Author

I was able able to reproduce this on the latest release of MPD:

sysur mpd
~/.config/doom:(master-3ab4b28a7) λ sysut mpd
× mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; preset: enabled)
     Active: failed (Result: core-dump) since Mon 2025-01-06 03:43:27 EST; 10s ago
   Duration: 11.987s
 Invocation: d6922a5cf26d4257b1c5ff24e48af205
       Docs: man:mpd(1)
             man:mpd.conf(5)
    Process: 691362 ExecStart=/usr/bin/mpd --systemd (code=dumped, signal=SEGV)
   Main PID: 691362 (code=dumped, signal=SEGV)
   Mem peak: 19.5M
        CPU: 114ms

Jan 06 03:43:15 o systemd[1040]: Starting Music Player Daemon...
Jan 06 03:43:15 o systemd[1040]: Started Music Player Daemon.
Jan 06 03:43:27 o mpd[691362]: player: played "VGM/Old School RuneScape Soundtrack/03 Al Kharid.ogg"
Jan 06 03:43:27 o systemd-coredump[691659]: [🡕] Process 691362 (mpd) of user 1000 dumped core.
Jan 06 03:43:27 o systemd[1040]: mpd.service: Main process exited, code=dumped, status=11/SEGV
Jan 06 03:43:27 o systemd[1040]: mpd.service: Failed with result 'core-dump'.
~/.config/doom:(master-3ab4b28a7) λ mpd --version
Music Player Daemon 0.23.16 (0.23.16)
Copyright 2003-2007 Warren Dukes <[email protected]>
Copyright 2008-2021 Max Kellermann <[email protected]>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple

Storage plugins:
 local udisks

Neighbor plugins:
 udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [pcm]

Filters:


Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe pipewire pulse httpd

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip

Input plugins:
 file io_uring archive curl ffmpeg

Playlist plugins:
 extm3u m3u pls flac cue embcue

Protocols:
 file:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mmsh:// mmst:// rtmp:// rtmps:// rtmpt:// rtmpts:// rtp:// rtsp:// rtsps:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

@skidoo23
Copy link
Contributor

Please check your mpd.conf - bitrate in httpd audio_output for lame encoder is specified in kbit. Please note https://mpd.readthedocs.io/en/latest/plugins.html#encoder-plugins Could not reproduce issue with recent MPD master from git on Debian testing x64.

@LemonBreezes
Copy link
Author

LemonBreezes commented Jan 20, 2025

Okay. I have made that change and now I am seeing a different message when it
segfaults.

Jan 20 09:13:14 o mpd[2392820]: player: played "VGM/Baldur's Gate 3 Original Soundtrack/12. Sixteen Strikes.flac"
Jan 20 17:30:24 o mpd[2392820]: mpd: ../mpd-0.23.16/src/output/Control.cxx:259: bool AudioOutputControl::Open(std::unique_lockstd::mutex&, AudioFormat, const MusicPipe&): Assertion `requ…& pause)' failed.
Jan 20 17:30:24 o systemd-coredump[3055181]: [🡕] Process 2392820 (mpd) of user 1000 dumped core.

After reading that line of code, I can see the issue is related to always_on
mode being enabled. My guess is that MPD doesn't want me to play a new song from scratch while a different one is playing and always_on is on.

@skidoo23
Copy link
Contributor

Seven hours of silence?

@LemonBreezes
Copy link
Author

Seven hours of silence?

Oh, it did not log the song I tried to play right before it crashed then.

@skidoo23
Copy link
Contributor

Can not reproduce segfault on virtual machine with Debian Bookworm and MPD 0.23.16 - may you should have a clean start with MPD from git master and building MPD from source.

@LemonBreezes
Copy link
Author

I think this was caused by having -fno-math-errno and -fno-trapping-math globally enabled on my Gentoo system. I have not had this issue since recompiling without it. Going to keep testing. I also could not use Valgrind because I had compiled my system with -march=native so now I have recompiled with -march=x86-64-v3 because I need tools like Valgrind and rr to work to solve problems like this myself.

@MaxKellermann
Copy link
Member

I can't reproduce, maybe you should have more detailed steps on how to reproduce?
The log you posted looks incomplete - it shows that you never did any playback. Yet your bug report says this happens when you play a song. This does not make sense.

@MaxKellermann MaxKellermann added the waiting Waiting for more information from reporter label Jan 29, 2025
@LemonBreezes
Copy link
Author

I can't reproduce, maybe you should have more detailed steps on how to reproduce? The log you posted looks incomplete - it shows that you never did any playback. Yet your bug report says this happens when you play a song. This does not make sense.

https://0x0.st/8KiQ.txt

Okay. I enabled the log in the config and I'm still getting segfaults after recompiling my system.

@MaxKellermann
Copy link
Member

Your new log is not in verbose mode. Important information is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting for more information from reporter
Projects
None yet
Development

No branches or pull requests

3 participants