Menu

#103 segfault with mpd

1.x.x
open
nobody
None
1
2025-04-28
2025-04-24
Jay Moore
No

Hi Maxim,

I know this is not the support forum for this but I didn't want to bother you directly via email; plus the tickets for this were how I found out about the existence of the thing I'm about to talk about.

I built your mpd fork with the sacd plugins. Needless to say I've spent 2 days with the thing running in gdb trying to catch a segfault. I finally did...but I'm so deep I'm lost as to what the actual problem could be. I'm hoping maybe since you've been more hands-on with the code than I have you might have an idea of the issue. But feel free to close this out and tell me to go away. I know I bring the weird problems.

I'm running Ubuntu 24.04 (kubuntu) - files are smb share mounted to a local directory (that is symlinked in to another directory) I don't think the ISO itself is bad as sacd_extract and the foobar component don't complain about it. I've provided gdb's bt output.

(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff364527e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff36288ff in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff362881b in __assert_fail_base
    (fmt=0x7ffff37d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff77f2173 "0", file=file@entry=0x7ffff77f20c2 "logging.c", line=line@entry=116, function=function@entry=0x7ffff77f3ba0 "cdio_logv") at ./assert/assert.c:96
#6  0x00007ffff363b517 in __assert_fail (assertion=0x7ffff77f2173 "0", file=0x7ffff77f20c2 "logging.c", line=116, function=0x7ffff77f3ba0 "cdio_logv")
    at ./assert/assert.c:105
#7  0x00007ffff77dfc81 in ??? () at /lib/x86_64-linux-gnu/libcdio.so.19
#8  0x00007ffff77e103a in cdio_log () at /lib/x86_64-linux-gnu/libcdio.so.19
#9  0x00007ffff7629bab in iso9660_ifs_read_pvd () at /lib/x86_64-linux-gnu/libiso9660.so.11
#10 0x00007ffff762a98f in iso9660_ifs_read_superblock () at /lib/x86_64-linux-gnu/libiso9660.so.11
#11 0x00007ffff762aa27 in ??? () at /lib/x86_64-linux-gnu/libiso9660.so.11
#12 0x0000555555873d8c in Iso9660::Iso9660 (this=0x555557802fc0, path=...) at ../src/archive/plugins/Iso9660ArchivePlugin.cxx:32
#13 0x0000555555875c2d in std::_Construct<Iso9660, Path&> (__p=0x555557802fc0) at /usr/include/c++/13/bits/stl_construct.h:119
#14 0x0000555555875836 in std::allocator_traits<std::allocator<void> >::construct<Iso9660, Path&> (__p=0x555557802fc0)
    at /usr/include/c++/13/bits/alloc_traits.h:661
#15 std::_Sp_counted_ptr_inplace<Iso9660, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<Path&> (this=0x555557802fb0, __a=...)
    at /usr/include/c++/13/bits/shared_ptr_base.h:604
#16 0x00005555558753e6 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<Iso9660, std::allocator<void>, Path&>
    (this=0x7fffffffb858, __p=@0x7fffffffb850: 0x0, __a=...) at /usr/include/c++/13/bits/shared_ptr_base.h:971
#17 0x0000555555875108 in std::__shared_ptr<Iso9660, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, Path&> (this=0x7fffffffb850, __tag=...)
    at /usr/include/c++/13/bits/shared_ptr_base.h:1712
#18 0x0000555555874c95 in std::shared_ptr<Iso9660>::shared_ptr<std::allocator<void>, Path&> (this=0x7fffffffb850, __tag=...)
--Type <RET> for more, q to quit, c to continue without paging--
    at /usr/include/c++/13/bits/shared_ptr.h:464
#19 0x00005555558746dc in std::make_shared<Iso9660, Path&> () at /usr/include/c++/13/bits/shared_ptr.h:1010
#20 0x0000555555873340 in iso9660_archive_open (pathname=...) at ../src/archive/plugins/Iso9660ArchivePlugin.cxx:122
#21 0x000055555570c1fd in archive_file_open (plugin=0x5555559e9c40 <iso9660_archive_plugin>, path=...) at ../src/archive/ArchivePlugin.cxx:17
#22 0x000055555570c380 in OpenArchiveInputStream (path=..., mutex=...) at ../src/input/plugins/ArchiveInputPlugin.cxx:46
#23 0x000055555569d9be in OpenLocalInputStream (path=..., mutex=...) at ../src/input/LocalOpen.cxx:44
#24 0x000055555569d536 in InputStream::Open (url="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso/cover.png", mutex=...)
    at ../src/input/Open.cxx:20
#25 0x000055555569d80f in InputStream::OpenReady (uri="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso/cover.png", mutex=...)
    at ../src/input/Open.cxx:37
#26 0x00005555555af85c in find_stream_art (directory="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso", mutex=...)
    at ../src/command/FileCommands.cxx:149
#27 0x00005555555af9ad in operator() (__closure=0x7fffffffbd00, directory="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso", mutex=...)
    at ../src/command/FileCommands.cxx:171
#28 0x00005555555b040b in LastInputStream::Open<const std::basic_string_view<char>&, read_stream_art(Response&, std::string_view, size_t)::<lambda(std::string_view, Mutex&)> >(const std::basic_string_view<char, std::char_traits<char> > &, struct {...} &&)
    (this=0x5555577a90f8, new_uri="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso", open=...) at ../src/input/LastInputStream.hxx:53
#29 0x00005555555afa41 in read_stream_art (r=..., art_directory="/home/dewdude/music/SACD/[10cc] Deceptive Bends (2014 SHM).iso", offset=0)
    at ../src/command/FileCommands.cxx:169
#30 0x00005555555b002c in read_db_art (client=..., r=..., uri=0x5555577a6fb9 "SACD/[10cc] Deceptive Bends (2014 SHM).iso/", offset=0)
    at ../src/command/FileCommands.cxx:276
#31 0x00005555555b0199 in handle_album_art (client=..., args=..., r=...) at ../src/command/FileCommands.cxx:303
#32 0x00005555555a19cf in command_process (client=..., num=0, line=0x5555577a6fb0 "albumart") at ../src/command/AllCommands.cxx:433
#33 0x00005555555ca376 in Client::ProcessLine (this=0x5555577a6f90, line=0x5555577a6fb0 "albumart") at ../src/client/Process.cxx:131
#34 0x00005555555cb996 in Client::OnSocketInput (this=0x5555577a6f90, src=Python Exception <class 'gdb.error'>: No symbol "static_cast" in current context.
...) at ../src/client/Read.cxx:33
#35 0x00005555556735b9 in BufferedSocket::ResumeInput (this=0x5555577a6f98) at ../src/event/BufferedSocket.cxx:59
--Type <RET> for more, q to quit, c to continue without paging--
#36 0x00005555556737a5 in BufferedSocket::OnSocketReady (this=0x5555577a6f98, flags=1) at ../src/event/BufferedSocket.cxx:96
#37 0x00005555556743c5 in FullyBufferedSocket::OnSocketReady (this=0x5555577a6f98, flags=1) at ../src/event/FullyBufferedSocket.cxx:89
#38 0x00005555555c9d7a in BindMethodDetail::WrapperGenerator<void (BufferedSocket::*)(unsigned int) noexcept, &BufferedSocket::OnSocketReady>::Invoke(void*, unsigned int) (_instance=0x5555577a6f98, args#0=1) at ../src/util/BindMethod.hxx:102
#39 0x0000555555672f90 in BoundMethod<void (unsigned int) noexcept>::operator()(unsigned int) const (this=0x5555577a8fc8, args#0=1)
    at ../src/util/BindMethod.hxx:52
#40 0x000055555567336a in SocketEvent::Dispatch (this=0x5555577a8fb0) at ../src/event/SocketEvent.cxx:105
#41 0x000055555567a1de in EventLoop::Run (this=0x7fffffffc4d8) at ../src/event/Loop.cxx:540
#42 0x000055555559693f in MainConfigured (options=..., raw_config=...) at ../src/Main.cxx:518
#43 0x0000555555596d02 in MainOrThrow (argc=4, argv=0x7fffffffe458) at ../src/Main.cxx:683
#44 0x0000555555596d86 in mpd_main (argc=4, argv=0x7fffffffe458) at ../src/Main.cxx:689
#45 0x0000555555596ded in main (argc=4, argv=0x7fffffffe458) at ../src/Main.cxx:701

In most cases it happens when you seek..or when it tries to play the next track...or sometimes just mid track.

Thank you...for not just reading this but the SACD stuff in general. I'm probably years behind on that.

-Jay

Discussion

  • Maxim V.Anisiutkin

    Hi.

    That looks like MPD tries to open SACD ISO file with iso9660 archive plugin. Have tried to build MPD without iso9660 (meson setup .... -Diso9660=disabled )?

     
    • Jay Moore

      Jay Moore - 2025-04-25

      I have not. Even DVD-audio wouldn't be iso9660 so; I'll have to try that.

      It also segfaulted playing non-ISO; I just didn't catch that segfault. No one else seems to report issues so I can't figure out why I seem to be the one having non-stop segfaults.

      It will also segfault randomly playing FLAC files...but I can't catch those to get a trace. I'm about ready to give up on Linux entirely.

       
  • Maxim V.Anisiutkin

    Next week I'm going to finish with the MPD update. Maybe, the whole thing will be more stable.

     
    • Jay Moore

      Jay Moore - 2025-04-26

      Sounds good. I'm will keep trying with various build options. You do not have to rush on my account...I was in no way expecting in-depth help or anything else in regards to this. A lot of my frustration is my hours of googling is that all this audio stuff went to streamer projects on RPi and it was getting impossible to find anything targeting actual desktop systems. This goes back several weeks with non-audio related stuff...so this problem isn't the last straw for me. I ultimately have a VBox VM that's doing asio via usbpassthrough perfectly with Win11 guest.

      Thanks again.

       
    • Jay Moore

      Jay Moore - 2025-04-28

      So I'm mostly a low-level dev...I had to get a bit more familiar with meson. I could have misconfigured something in the original build I did. I built without iso9660 and then found out why it wasn't happy with ALSA after it crashed on FLAC.

      Now it's completely rock-solid and stable. I can't even make it crash.

      It was me, I was the problem. Thank you for at least turning me in the direction I needed and giving me a push. If you have any kind of tip-jar setup; please let me know. I owe you for the decade of enjoyment.

       

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.