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

Still freezing on song switch. #954

Closed
installgentoo opened this issue Sep 9, 2020 · 9 comments
Closed

Still freezing on song switch. #954

installgentoo opened this issue Sep 9, 2020 · 9 comments

Comments

@installgentoo
Copy link

Bug report

Describe the bug

Disclamer: Max, i'll add a backtrace and log when my script catches another freeze.

#642
^ pretty much this, just caught it on wildly different ubuntu system with systemd. I guess this probably has to do with my music files - they're all in vbr aac, with all metadata erased through exiftool.

Expected Behavior

Shouldn't freeze, duh.

Actual Behavior

Freezes, duh.

Version

mpd --version
Music Player Daemon 0.21.20 (0.21.20)
Copyright 2003-2007 Warren Dukes warren.dukes@gmail.com
Copyright 2008-2018 Max Kellermann max.kellermann@gmail.com
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 proxy upnp

Storage plugins:
local smbclient udisks nfs curl

Neighbor plugins:
smbclient upnp udisks

Decoders plugins:
[mad] mp3 mp2
[mpg123] mp3
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[opus] opus ogg oga
[sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
[audiofile] wav au aiff aif
[dsdiff] dff
[dsf] dsf
[hybrid_dsd] m4a
[faad] aac
[mpcdec] mpc
[wavpack] wv
[modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
[mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
[sidplay] sid mus str prg P00
[wildmidi] mid
[fluidsynth] mid
[adplug] amd d00 hsc laa rad raw sa2
[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
[gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz
[pcm]

Filters:
libsamplerate soxr

Tag plugins:
id3tag

Output plugins:
shout null fifo sndio pipe alsa ao oss openal pulse jack httpd recorder

Encoder plugins:
null vorbis opus lame wave flac

Archive plugins:
[bz2] bz2
[zzip] zip
[iso] iso

Input plugins:
file archive alsa tidal qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
file:// alsa:// tidal:// qobuz:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// mms:// mmsh:// mmst:// mmsu:// cdda://

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

Log

standard logging just showed regular

client: [ ] closed
client: [ ] opened
client: [ ] closed

I'll elaborate with verbose log when my script catches this.

@MaxKellermann
Copy link
Member

https://www.musicpd.org/help/
"make sure you have the latest MPD version (0.21.25)"

@installgentoo
Copy link
Author

installgentoo commented Sep 9, 2020

I have 21.25 on my desktop it's still freezing. Just rebuilt it in debug.

Max, i'm not trolling here, i'm actually trying to help.

It would be much appreciated if you told me how to stop a frozen program in GDB, so that i can then get backtrace with bt. GDB will be attached to mpd at all times. I've only ever used gdb from cli with crashing executables that stopped automatically. I'm much too tired to google this today.

my current config that i'll test on:

Music Player Daemon 0.21.25 (0.21.25)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
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


Decoders plugins:
 [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
 [pcm]

Filters:
 soxr

Tag plugins:


Output plugins:
 null alsa httpd

Encoder plugins:
 null lame wave

Input plugins:
 file alsa ffmpeg

Playlist plugins:
 extm3u m3u pls

Protocols:
 file:// alsa:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://

Other features:
 epoll icu inotify tcp un

@installgentoo
Copy link
Author

installgentoo commented Sep 10, 2020

Here's some info for you, sadly this is from stripped ubuntu binary.

last thing in log:

Sep 10 13:38 : ffmpeg/aac: Could not update timestamps for skipped samples.
Sep 10 13:38 : ffmpeg/aac: Could not update timestamps for skipped samples.
Sep 10 13:38 : ffmpeg/aac: Could not update timestamps for skipped samples.
Sep 10 13:38 : client: [53] closed
Sep 10 13:42 : player: played "♂ its so its so its so ♂.m4a"
Sep 10 13:42 : ffmpeg/aac: Could not update timestamps for skipped samples.
Sep 10 13:51 : client: [54] opened from 127.0.0.1:45294
Sep 10 13:51 : client: [54] closed
Sep 10 13:54 : client: [55] opened from 127.0.0.1:45336
Sep 10 13:54 : client: [55] closed
Sep 10 13:54 : client: [56] opened from 127.0.0.1:45338

Gdb:

sudo gdb -p 687871
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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".
Attaching to process 687871
[New LWP 687886]
[New LWP 687887]
[New LWP 687888]
[New LWP 687889]
[New LWP 687890]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55bfef4a2dac) at ../sysdeps/nptl/futex-internal.h:183
183	../sysdeps/nptl/futex-internal.h: No such file or directory.
(gdb) bt
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55bfef4a2dac) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55bfef4a2d28, cond=0x55bfef4a2d80) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x55bfef4a2d80, mutex=0x55bfef4a2d28) at pthread_cond_wait.c:638
#3  0x000055bfeebc9eed in ?? ()
#4  0x000055bfeebca600 in ?? ()
#5  0x000055bfeebb91bf in ?? ()
#6  0x000055bfeebb80ab in ?? ()
#7  0x000055bfeebc16a7 in ?? ()
#8  0x000055bfeebc196c in ?? ()
#9  0x000055bfeebeab4d in ?? ()
#10 0x000055bfeebead00 in ?? ()
#11 0x000055bfeebedb09 in ?? ()
#12 0x000055bfeebb70d2 in ?? ()
#13 0x000055bfeebb76cf in ?? ()
#14 0x00007f782d0fc0b3 in __libc_start_main (main=0x55bfeebb62d0, argc=2, argv=0x7ffeba02d0c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffeba02d0b8) at ../csu/libc-start.c:308
#15 0x000055bfeebb65ae in ?? ()

@leigh123linux
Copy link

Here's some info for you, sadly this is from stripped ubuntu binary.

Why don't you install the symbols package? (mpd-dbgsym)

@installgentoo
Copy link
Author

I didn't know there was such thing. Will do tomorrow.

@installgentoo
Copy link
Author

@leigh123linux
How do i actually install that package?

sudo apt-get install mpd-dbgsym
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mpd-dbgsym

Is there a debug repo?

@leigh123linux
Copy link

@leigh123linux
How do i actually install that package?

sudo apt-get install mpd-dbgsym
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mpd-dbgsym

Is there a debug repo?

Try

https://wiki.ubuntu.com/Debug%20Symbol%20Packages#Getting_-dbgsym.ddeb_packages

@installgentoo
Copy link
Author

installgentoo commented Sep 15, 2020

GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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".
(gdb) attach 835
Attaching to process 835
[New LWP 968]
[New LWP 969]
[New LWP 970]
[New LWP 971]
[New LWP 972]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f98a7c1643e in epoll_wait (epfd=7, events=events@entry=0x5601562ff6f0, maxevents=maxevents@entry=16, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30	../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory.
(gdb) where
#0  0x00007f98a7c1643e in epoll_wait (epfd=7, events=events@entry=0x5601562ff6f0, maxevents=maxevents@entry=16, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x0000560154e27a98 in EpollFD::Wait (timeout=<optimized out>, maxevents=16, events=0x5601562ff6f0, this=0x5601562ff6ec) at ../src/system/FileDescriptor.hxx:99
#2  PollGroupEpoll::ReadEvents (timeout_ms=<optimized out>, result=..., this=0x5601562ff6ec) at ../src/event/PollGroupEpoll.hxx:75
#3  EventLoop::Run (this=0x5601562ff658) at ../src/event/Loop.cxx:198
#4  0x0000560154df10d2 in mpd_main_after_fork (config=..., raw_config=...) at ../src/Main.cxx:600
#5  MainOrThrow (argc=<optimized out>, argv=<optimized out>) at ../src/Main.cxx:476
#6  0x0000560154df16cf in mpd_main (argc=<optimized out>, argv=<optimized out>) at ../src/Main.cxx:487
#7  0x00007f98a7b1b0b3 in __libc_start_main (main=0x560154df02d0 <main(int, char**)>, argc=2, argv=0x7ffd9dbd2d08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd9dbd2cf8) at ../csu/libc-start.c:308
#8  0x0000560154df05ae in _start () at ../src/Main.cxx:382
(gdb) 

finally caught this thing.

edit, actually above is the trace for when mpd hangs on the song's end, without switching to the next song. it's still interfacing with ncmpcpp at this point, displaying the interface and all that.

then, i sent it mpc next, and everything froze. ncmpcpp is unable to connect to mpd now, mpc status just hangs, not printing anything. here's the backtrace at that point:

(gdb) detach
Detaching from program: target:/usr/bin/mpd, process 835
[Inferior 1 (process 835) detached]
(gdb) attach 835
Attaching to program: target:/usr/bin/mpd, process 835
[New LWP 968]
[New LWP 969]
[New LWP 970]
[New LWP 971]
[New LWP 972]
`target:/usr/bin/mpd' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5601562ffe0c) at ../sysdeps/nptl/futex-internal.h:183
183	../sysdeps/nptl/futex-internal.h: No such file or directory.
(gdb) where
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5601562ffe0c) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5601562ffd88, cond=0x5601562ffde0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=cond@entry=0x5601562ffde0, mutex=mutex@entry=0x5601562ffd88) at pthread_cond_wait.c:638
#3  0x0000560154e04e61 in PosixCond::wait (mutex=..., this=0x5601562ffde0) at ../src/thread/PosixCond.hxx:74
#4  PlayerControl::ClientWait (this=0x5601562ffd40) at ../src/player/Control.hxx:397
#5  PlayerControl::WaitCommandLocked (this=<optimized out>) at ../src/player/Control.hxx:444
#6  PlayerControl::SynchronousCommand (cmd=PlayerCommand::SEEK, this=0x5601562ffd40) at ../src/player/Control.hxx:459
#7  PlayerControl::SeekLocked (this=0x5601562ffd40, song=..., t=...) at ../src/player/Control.cxx:268
#8  0x0000560154e05060 in PlayerControl::Play (this=this@entry=0x5601562ffd40, song=...) at /usr/include/c++/9/bits/move.h:74
#9  0x0000560154e0ac3f in playlist::PlayOrder (this=this@entry=0x5601562ffca8, pc=..., order=order@entry=11) at /usr/include/c++/9/bits/unique_ptr.h:153
#10 0x0000560154e0affe in playlist::PlayNext (this=0x5601562ffca8, pc=...) at ../src/queue/PlaylistControl.cxx:177
#11 0x0000560154df35f6 in Partition::PlayNext (this=<optimized out>) at ../src/Partition.hxx:158
#12 handle_next (client=..., args=..., r=...) at ../src/command/PlayerCommands.cxx:231
#13 0x0000560154df20ab in command_process (client=..., num=num@entry=0, line=line@entry=0x56015637cce0 "next") at ../src/command/AllCommands.cxx:418
#14 0x0000560154dfb6a7 in client_process_line (client=..., line=<optimized out>, line@entry=0x56015637cce0 "next") at ../src/client/ClientProcess.cxx:133
#15 0x0000560154dfb96c in Client::OnSocketInput (this=0x56015637ccb0, data=0x56015637cce0, length=<optimized out>) at ../src/client/ClientRead.cxx:46
#16 0x0000560154e24b4d in BufferedSocket::ResumeInput (this=<optimized out>) at ../src/event/BufferedSocket.cxx:76
#17 BufferedSocket::ResumeInput (this=0x56015637ccb0) at ../src/event/BufferedSocket.cxx:65
#18 0x0000560154e24d00 in BufferedSocket::OnSocketReady (flags=<optimized out>, this=0x56015637ccb0) at ../src/event/BufferedSocket.cxx:113
#19 BufferedSocket::OnSocketReady (this=0x56015637ccb0, flags=<optimized out>) at ../src/event/BufferedSocket.cxx:101
#20 0x0000560154e27b09 in EventLoop::Run (this=0x5601562ff658) at ../src/event/Loop.cxx:215
#21 0x0000560154df10d2 in mpd_main_after_fork (config=..., raw_config=...) at ../src/Main.cxx:600
#22 MainOrThrow (argc=<optimized out>, argv=<optimized out>) at ../src/Main.cxx:476
#23 0x0000560154df16cf in mpd_main (argc=<optimized out>, argv=<optimized out>) at ../src/Main.cxx:487
#24 0x00007f98a7b1b0b3 in __libc_start_main (main=0x560154df02d0 <main(int, char**)>, argc=2, argv=0x7ffd9dbd2d08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd9dbd2cf8) at ../csu/libc-start.c:308
#25 0x0000560154df05ae in _start () at ../src/Main.cxx:382

@installgentoo
Copy link
Author

So does anyone care about this bug?

Do you need something more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants