MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.16k stars 346 forks source link

Shuffling the queue after the next song is queued results in an infinite loop #2097

Open nyanpasu64 opened 1 month ago

nyanpasu64 commented 1 month ago

Bug report

Describe the bug

If I shuffle the play queue while a song is playing and the next song is queued, mpd hangs in a full-CPU loop. It still responds to play commands, does not burn CPU if paused, and the issue goes away if you press Next or Prev.

Expected Behavior

mpd plays the queued song or the next song in the new shuffled order.

Actual Behavior

mpd hangs. gdb indicates the backtrace is in MainConfigured, sometimes -> EventLoop::Run.

Version

Music Player Daemon 0.24 (v0.23.15-1511-g965c466e9+)

Configuration

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

# If running mpd using systemd, delete this line to log directly to systemd.
#log_file           "syslog"

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

# 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"
pid_file           "~/.config/mpd/pid"
state_file         "~/.local/state/mpd/state"
sticker_file       "~/.config/mpd/sticker.sql"

audio_output {
        type            "pulse"
        name            "pulse audio"
}

connection_timeout     "120"

replaygain                     "track"

log_level "verbose"

Log

mpd shuffle hang.txt

MaxKellermann commented 2 weeks ago

I can't reproduce this and I need more information on where it hangs. For example with a strace (of all threads with time stamps) or a perf report.

geneticdrift commented 1 week ago

I can reprodude this consistently by: While a track is playing seeking to a few seconds before the end of a track, then setting random 1. Then the track finish playing but MPD doesn't start playing the next track. The status remains in state play and the at the same elaplsed time. MPD still responds to status command. Now, setting random 0 it starts playing the same track again from the begining. (same if changing random from 1 to 0.)

Status:

OK MPD 0.24.0
status
volume: 41
repeat: 0
random: 1
single: 0
consume: 0
partition: default
playlist: 2
playlistlength: 16371
mixrampdb: 0
state: play
xfade: 1
song: 7014
songid: 7015
time: 79:80
elapsed: 79.495
bitrate: 339
duration: 79.506
audio: 44100:16:2
nextsong: 7015
nextsongid: 7016
OK

Threads:

(gdb) thread apply all where

Thread 19 (Thread 0x7fffd0c006c0 (LWP 550551) "mpd"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b37e2 in pthread_cond_timedwait () from /usr/lib/libc.so.6
#2  0x00007ffff7e2babe in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 17 (Thread 0x7fffd7e006c0 (LWP 550549) "mpd"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b37e2 in pthread_cond_timedwait () from /usr/lib/libc.so.6
#2  0x00007ffff7e2babe in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 15 (Thread 0x7fffd16006c0 (LWP 549676) "threaded-ml"):
#0  0x00007ffff162b63d in poll () from /usr/lib/libc.so.6
#1  0x00007ffff51819b7 in ?? () from /usr/lib/libpulse.so.0
#2  0x00007ffff516b45c in pa_mainloop_poll () from /usr/lib/libpulse.so.0
#3  0x00007ffff517561c in pa_mainloop_iterate () from /usr/lib/libpulse.so.0
#4  0x00007ffff51756d1 in pa_mainloop_run () from /usr/lib/libpulse.so.0
#5  0x00007ffff5185bf2 in ?? () from /usr/lib/libpulse.so.0
#6  0x00007fffe25332b7 in ?? () from /usr/lib/pulseaudio/libpulsecommon-17.0.so
#7  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#8  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 14 (Thread 0x7fffd20006c0 (LWP 549675) "output:Pulse Ou"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b3479 in pthread_cond_wait () from /usr/lib/libc.so.6
#2  0x00007ffff18d6cf1 in __gthread_cond_wait (__cond=<optimized out>, __mutex=<optimized out>) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:878
#3  std::__condvar::wait (this=<optimized out>, __m=...) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/std_mutex.h:171
#4  std::condition_variable::wait (this=<optimized out>, __lock=...) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/condition_variable.cc:41
#5  0x00005555556ccd8b in AudioOutputControl::Task (this=0x555555b21320) at ../../src/output/Thread.cxx:438
#6  0x00005555556c715f in BindMethodDetail::WrapperGenerator<void (AudioOutputControl::*)() noexcept, &AudioOutputControl::Task>::Invoke(void*) (_instance=0x555555b21320) at ../../src/util/BindMethod.hxx:102
#7  0x000055555563caae in BoundMethod<void () noexcept>::operator()() const (this=0x555555b213e8) at ../../src/util/BindMethod.hxx:52
#8  0x0000555555649dc0 in Thread::Run (this=0x555555b213e8) at ../../src/thread/Thread.cxx:53
#9  0x0000555555649da1 in Thread::ThreadProc (ctx=0x555555b213e8) at ../../src/thread/Thread.cxx:82
#10 0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#11 0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 13 (Thread 0x7fffd32006c0 (LWP 549674) "decoder"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b3479 in pthread_cond_wait () from /usr/lib/libc.so.6
#2  0x00007ffff18d6cf1 in __gthread_cond_wait (__cond=<optimized out>, __mutex=<optimized out>) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:878
#3  std::__condvar::wait (this=<optimized out>, __m=...) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/std_mutex.h:171
#4  std::condition_variable::wait (this=<optimized out>, __lock=...) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/condition_variable.cc:41
#5  0x00005555555b2b99 in DecoderControl::Wait (this=0x7fffd3bff4a0, lock=...) at ../../src/decoder/Control.hxx:197
#6  0x00005555555b2824 in DecoderControl::RunThread (this=0x7fffd3bff4a0) at ../../src/decoder/Thread.cxx:675
#7  0x00005555555b581a in BindMethodDetail::WrapperGenerator<void (DecoderControl::*)() noexcept, &DecoderControl::RunThread>::Invoke(void*) (_instance=0x7fffd3bff4a0) at ../../src/util/BindMethod.hxx:102
#8  0x000055555563caae in BoundMethod<void () noexcept>::operator()() const (this=0x7fffd3bff4a8) at ../../src/util/BindMethod.hxx:52
#9  0x0000555555649dc0 in Thread::Run (this=0x7fffd3bff4a8) at ../../src/thread/Thread.cxx:53
#10 0x0000555555649da1 in Thread::ThreadProc (ctx=0x7fffd3bff4a8) at ../../src/thread/Thread.cxx:82
#11 0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#12 0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 12 (Thread 0x7fffd3c006c0 (LWP 549673) "player"):
#0  0x00005555555d2408 in Player::IsDecoderAtNextSong (this=0x7fffd3bff3a0) at ../../src/player/Thread.cxx:253
#1  0x00005555555d46dd in Player::Run (this=0x7fffd3bff3a0) at ../../src/player/Thread.cxx:1171
#2  0x00005555555d132a in do_play (pc=..., dc=..., buffer=...) at ../../src/player/Thread.cxx:1238
#3  0x00005555555d14d4 in PlayerControl::RunThread (this=0x555555a5cb40) at ../../src/player/Thread.cxx:1264
#4  0x00005555555d78c3 in BindMethodDetail::WrapperGenerator<void (PlayerControl::*)() noexcept, &PlayerControl::RunThread>::Invoke(void*) (_instance=0x555555a5cb40) at ../../src/util/BindMethod.hxx:102
#5  0x000055555563caae in BoundMethod<void () noexcept>::operator()() const (this=0x555555a5cb80) at ../../src/util/BindMethod.hxx:52
#6  0x0000555555649dc0 in Thread::Run (this=0x555555a5cb80) at ../../src/thread/Thread.cxx:53
#7  0x0000555555649da1 in Thread::ThreadProc (ctx=0x555555a5cb80) at ../../src/thread/Thread.cxx:82
#8  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#9  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 11 (Thread 0x7fffd46006c0 (LWP 549668) "mpd"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b37e2 in pthread_cond_timedwait () from /usr/lib/libc.so.6
#2  0x00007ffff7e2babe in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 10 (Thread 0x7fffd50006c0 (LWP 549667) "mpd"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b37e2 in pthread_cond_timedwait () from /usr/lib/libc.so.6
#2  0x00007ffff7e2babe in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 8 (Thread 0x7fffd74006c0 (LWP 549665) "mpd"):
#0  0x00007ffff1636c57 in select () from /usr/lib/libc.so.6
#1  0x00007ffff7e1c739 in ?? () from /usr/lib/libupnp.so.17
#2  0x00007ffff7e2bcfe in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7fffd5a006c0 (LWP 549661) "mpd"):
#0  0x00007ffff15b0a19 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff15b3479 in pthread_cond_wait () from /usr/lib/libc.so.6
#2  0x00007ffff7e2ca3d in ?? () from /usr/lib/libupnp.so.17
#3  0x00007ffff7e2bcfe in ?? () from /usr/lib/libupnp.so.17
#4  0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#5  0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffde4006c0 (LWP 549660) "rtio"):
#0  0x00007ffff16398b2 in epoll_wait () from /usr/lib/libc.so.6
#1  0x0000555555644432 in EpollFD::Wait (this=0x7fffffffd420, events=0x7fffde3ff480, maxevents=16, timeout=-1) at ../../src/system/EpollFD.hxx:29
#2  0x0000555555644654 in EpollBackend::ReadEvents (this=0x7fffffffd420, timeout_ms=-1) at ../../src/event/EpollBackend.hxx:43
#3  0x0000555555644d0d in EventLoop::Wait (this=0x7fffffffd420, timeout=...) at ../../src/event/Loop.cxx:256
#4  0x0000555555643da9 in EventLoop::Run (this=0x7fffffffd420) at ../../src/event/Loop.cxx:346
#5  0x0000555555642dcc in EventThread::Run (this=0x7fffffffd420) at ../../src/event/Thread.cxx:54
#6  0x00005555555c86da in BindMethodDetail::WrapperGenerator<void (EventThread::*)() noexcept, &EventThread::Run>::Invoke(void*) (_instance=0x7fffffffd420) at ../../src/event/Thread.hxx:22
#7  0x000055555563caae in BoundMethod<void () noexcept>::operator()() const (this=0x7fffffffdcd8) at ../../src/util/BindMethod.hxx:52
#8  0x0000555555649dc0 in Thread::Run (this=0x7fffffffdcd8) at ../../src/thread/Thread.cxx:53
#9  0x0000555555649da1 in Thread::ThreadProc (ctx=0x7fffffffdcd8) at ../../src/thread/Thread.cxx:82
#10 0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#11 0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffdee006c0 (LWP 549659) "io"):
#0  0x00007ffff16398b2 in epoll_wait () from /usr/lib/libc.so.6
#1  0x0000555555644432 in EpollFD::Wait (this=0x7fffffffcb40, events=0x7fffdedff480, maxevents=16, timeout=-1) at ../../src/system/EpollFD.hxx:29
#2  0x0000555555644654 in EpollBackend::ReadEvents (this=0x7fffffffcb40, timeout_ms=-1) at ../../src/event/EpollBackend.hxx:43
#3  0x0000555555644d0d in EventLoop::Wait (this=0x7fffffffcb40, timeout=...) at ../../src/event/Loop.cxx:256
#4  0x0000555555643da9 in EventLoop::Run (this=0x7fffffffcb40) at ../../src/event/Loop.cxx:346
#5  0x0000555555642dcc in EventThread::Run (this=0x7fffffffcb40) at ../../src/event/Thread.cxx:54
#6  0x00005555555c86da in BindMethodDetail::WrapperGenerator<void (EventThread::*)() noexcept, &EventThread::Run>::Invoke(void*) (_instance=0x7fffffffcb40) at ../../src/event/Thread.hxx:22
#7  0x000055555563caae in BoundMethod<void () noexcept>::operator()() const (this=0x7fffffffd3f8) at ../../src/util/BindMethod.hxx:52
#8  0x0000555555649dc0 in Thread::Run (this=0x7fffffffd3f8) at ../../src/thread/Thread.cxx:53
#9  0x0000555555649da1 in Thread::ThreadProc (ctx=0x7fffffffd3f8) at ../../src/thread/Thread.cxx:82
#10 0x00007ffff15b439d in ?? () from /usr/lib/libc.so.6
#11 0x00007ffff163949c in ?? () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fffdf6f1f40 (LWP 549652) "mpd"):
#0  0x00007ffff16398b2 in epoll_wait () from /usr/lib/libc.so.6
#1  0x0000555555644432 in EpollFD::Wait (this=0x7fffffffc278, events=0x7fffffffc020, maxevents=16, timeout=-1) at ../../src/system/EpollFD.hxx:29
#2  0x0000555555644654 in EpollBackend::ReadEvents (this=0x7fffffffc278, timeout_ms=-1) at ../../src/event/EpollBackend.hxx:43
#3  0x0000555555644d0d in EventLoop::Wait (this=0x7fffffffc278, timeout=...) at ../../src/event/Loop.cxx:256
#4  0x0000555555643da9 in EventLoop::Run (this=0x7fffffffc278) at ../../src/event/Loop.cxx:346
#5  0x000055555558d0fb in MainConfigured (options=..., raw_config=...) at ../../src/Main.cxx:512
#6  0x000055555558d486 in MainOrThrow (argc=5, argv=0x7fffffffe1e8) at ../../src/Main.cxx:663
#7  0x000055555558d502 in mpd_main (argc=5, argv=0x7fffffffe1e8) at ../../src/Main.cxx:669
#8  0x000055555558d565 in main (argc=5, argv=0x7fffffffe1e8) at ../../src/Main.cxx:681
#9  0x00007ffff1545e08 in ?? () from /usr/lib/libc.so.6
#10 0x00007ffff1545ecc in __libc_start_main () from /usr/lib/libc.so.6
#11 0x000055555558b8c5 in _start ()

strace

552468      0.000000 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
552467      0.000018 futex(0x60e99f6f7210, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.000021 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
552460      0.000005 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
552459      0.000005 restart_syscall(<... resuming interrupted read ...> <unfinished ...>
552457      0.000004 futex(0x743228fa8370, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552455      0.000011 epoll_wait(5,  <unfinished ...>
552453      0.000006 epoll_wait(3,  <unfinished ...>
552466      0.000006 futex(0x743204dff504, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      0.000005 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552456      0.000021 epoll_wait(7,  <unfinished ...>
552463      0.000024 restart_syscall(<... resuming interrupted futex ...>) = -1 ETIMEDOUT (Connection timed out)
552463      0.684306 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000026 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829991, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      3.205898 <... restart_syscall resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000032 <... restart_syscall resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000007 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552459      0.000004 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000003 <... futex resumed>) = 0
552459      0.000002 <... futex resumed>) = 0
552460      0.000005 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829994, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000011 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829994, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.052964 <... restart_syscall resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000044 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000027 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829994, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740900 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000079 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000183 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829996, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      3.205733 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000024 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000068 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552459      0.000023 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000007 <... futex resumed>) = 0
552460      0.000013 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829999, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000033 <... futex resumed>) = 0
552459      0.000010 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829999, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.052911 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000086 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000164 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725829999, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740657 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000040 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000013 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830001, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      3.206002 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000028 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000080 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552459      0.000026 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000007 <... futex resumed>) = 0
552460      0.000012 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830004, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000030 <... futex resumed>) = 0
552459      0.000011 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830004, tv_nsec=209000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.052808 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000038 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000023 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830004, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740876 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000034 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000014 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830006, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      0.238424 <... pselect6 resumed>) = 1 (in [21])
552461      0.000096 recvfrom(21, "NOTIFY * HTTP/1.1\r\nNTS:ssdp:aliv"..., 2499, 0, {sa_family=AF_INET, sin_port=htons(40085), sin_addr=inet_addr("192.168.1.4")}, [128 => 16]) = 324
552461      0.000050 futex(0x743228fa7e74, FUTEX_WAKE_PRIVATE, 1) = 1
552460      0.000012 <... futex resumed>) = 0
552461      0.000002 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552460      0.000019 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000048 sched_get_priority_min(SCHED_OTHER) = 0
552460      0.000024 sched_get_priority_max(SCHED_OTHER) = 0
552460      0.000026 sched_setscheduler(552460, SCHED_OTHER, [0]) = 0
552460      0.000059 sched_get_priority_min(SCHED_OTHER) = 0
552460      0.000020 sched_get_priority_max(SCHED_OTHER) = 0
552460      0.000019 sched_setscheduler(552460, SCHED_OTHER, [0]) = 0
552460      0.000023 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830006, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      0.000499 <... pselect6 resumed>) = 1 (in [22])
552461      0.000008 recvfrom(22, "NOTIFY * HTTP/1.1\r\nNTS:ssdp:aliv"..., 2499, 0, {sa_family=AF_INET6, sin6_port=htons(49891), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "fe80::5054:ff:fea2:db96", &sin6_addr), sin6_scope_id=if_nametoindex("enp6s0")}, [128 => 28]) = 332
552461      0.000036 futex(0x743228fa7e74, FUTEX_WAKE_PRIVATE, 1) = 1
552459      0.000009 <... futex resumed>) = 0
552461      0.000003 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552459      0.000004 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000011 sched_get_priority_min(SCHED_OTHER) = 0
552459      0.000012 sched_get_priority_max(SCHED_OTHER) = 0
552459      0.000010 sched_setscheduler(552459, SCHED_OTHER, [0]) = 0
552459      0.000031 sched_get_priority_min(SCHED_OTHER) = 0
552459      0.000010 sched_get_priority_max(SCHED_OTHER) = 0
552459      0.000010 sched_setscheduler(552459, SCHED_OTHER, [0]) = 0
552459      0.000011 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830006, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      3.019560 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000043 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000024 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830009, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740836 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000037 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000020 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830011, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.238023 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000129 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000035 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830011, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000745 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000027 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000015 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830011, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      3.020059 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000083 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000073 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830014, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740749 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000082 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000091 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830016, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.237861 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000111 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000163 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830016, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000680 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000026 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000014 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830016, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      3.020030 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000050 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000029 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830019, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740856 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000036 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000016 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830021, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.238010 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000075 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000178 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830021, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000674 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000025 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000014 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830021, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      3.020064 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000076 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000026 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830024, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740803 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000075 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000086 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830026, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.237944 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000115 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000181 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830026, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000599 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000037 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000014 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830026, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552453      1.536086 <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2674066952, u64=106556517713416}}], 16, -1) = 1
552453      0.000052 accept4(9, {sa_family=AF_INET6, sin6_port=htons(48134), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_scope_id=0}, [128 => 28], SOCK_CLOEXEC|SOCK_NONBLOCK) = 25
552453      0.000033 setsockopt(25, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
552453      0.000019 getsockopt(25, SOL_SOCKET, SO_PEERCRED, {pid=0, uid=-1, gid=-1}, [12]) = 0
552453      0.000029 sendto(25, "OK MPD 0.24.0\n", 14, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 14
552453      0.000069 epoll_ctl(3, EPOLL_CTL_ADD, 25, {events=EPOLLIN|EPOLLERR|EPOLLHUP, data={u32=2685756592, u64=106556529403056}}) = 0
552453      0.000052 write(2, "client: [3] opened from 127.0.0."..., 40) = 40
552453      0.000023 epoll_wait(3,  <unfinished ...>
552462      1.483666 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000049 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000029 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830029, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552453      1.207787 <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2685756592, u64=106556529403056}}], 16, 60233) = 1
552453      0.000048 recvfrom(25, "status\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 8
552453      0.000047 write(2, "client: [3] process command \"sta"..., 37) = 37
552465      0.000023 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000004 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000008 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000006 <... futex resumed>) = 0
552465      0.000007 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552453      0.000002 futex(0x60e99f632c20, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552465      0.000004 <... futex resumed>) = 0
552465      0.000010 futex(0x60e99f632c20, FUTEX_WAKE_PRIVATE, 1) = 1
552453      0.000010 <... futex resumed>) = 0
552465      0.000007 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000003 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000004 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000004 <... futex resumed>) = 0
552465      0.000004 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552465      0.000030 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000003 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000003 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000004 <... futex resumed>) = 0
552465      0.000003 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552453      0.000004 write(2, "client: [3] command returned 0\n", 31 <unfinished ...>
552465      0.000005 <... futex resumed>) = 0
552453      0.000003 <... write resumed>) = 31
552453      0.000011 sendto(25, "volume: 46\nrepeat: 0\nrandom: 1\ns"..., 280, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 280
552453      0.000032 epoll_wait(3,  <unfinished ...>
552463      0.532739 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000046 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000015 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830031, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.238029 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000148 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000213 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830031, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000543 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000035 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000015 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830031, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      3.020044 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000081 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000025 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830034, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740837 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000038 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000014 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830036, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552460      0.237988 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000091 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000202 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830036, tv_nsec=241000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000662 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000026 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000013 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830036, tv_nsec=242000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      0.002405 <... pselect6 resumed>) = 1 (in [21])
552461      0.000024 recvfrom(21, "NOTIFY * HTTP/1.1\r\nNTS:ssdp:aliv"..., 2499, 0, {sa_family=AF_INET, sin_port=htons(40085), sin_addr=inet_addr("192.168.1.4")}, [128 => 16]) = 333
552461      0.000048 futex(0x743228fa7e70, FUTEX_WAKE_PRIVATE, 1) = 1
552461      0.000014 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552460      0.000037 <... futex resumed>) = 0
552460      0.000081 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000097 sched_get_priority_min(SCHED_OTHER) = 0
552460      0.000021 sched_get_priority_max(SCHED_OTHER) = 0
552460      0.000020 sched_setscheduler(552460, SCHED_OTHER, [0]) = 0
552460      0.000047 sched_get_priority_min(SCHED_OTHER) = 0
552460      0.000019 sched_get_priority_max(SCHED_OTHER) = 0
552460      0.000019 sched_setscheduler(552460, SCHED_OTHER, [0]) = 0
552460      0.000022 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830036, tv_nsec=245000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      0.000515 <... pselect6 resumed>) = 1 (in [22])
552461      0.000007 recvfrom(22, "NOTIFY * HTTP/1.1\r\nNTS:ssdp:aliv"..., 2499, 0, {sa_family=AF_INET6, sin6_port=htons(49891), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "fe80::5054:ff:fea2:db96", &sin6_addr), sin6_scope_id=if_nametoindex("enp6s0")}, [128 => 28]) = 341
552461      0.000035 futex(0x743228fa7e70, FUTEX_WAKE_PRIVATE, 1) = 1
552459      0.000009 <... futex resumed>) = 0
552461      0.000002 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552459      0.000004 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552459      0.000011 sched_get_priority_min(SCHED_OTHER) = 0
552459      0.000010 sched_get_priority_max(SCHED_OTHER) = 0
552459      0.000010 sched_setscheduler(552459, SCHED_OTHER, [0]) = 0
552459      0.000038 sched_get_priority_min(SCHED_OTHER) = 0
552459      0.000010 sched_get_priority_max(SCHED_OTHER) = 0
552459      0.000010 sched_setscheduler(552459, SCHED_OTHER, [0]) = 0
552459      0.000011 futex(0x743228fa7e74, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830036, tv_nsec=245000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552461      2.224178 <... pselect6 resumed>) = 1 (in [21])
552461      0.000043 recvfrom(21, "M-SEARCH * HTTP/1.1\r\nMX: 5\r\nST: "..., 2499, 0, {sa_family=AF_INET, sin_port=htons(2654), sin_addr=inet_addr("192.168.1.119")}, [128 => 16]) = 269
552461      0.000037 futex(0x743228fa7e74, FUTEX_WAKE_PRIVATE, 1) = 1
552460      0.000030 <... futex resumed>) = 0
552461      0.000004 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552460      0.000008 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1) = 0
552460      0.000012 sched_get_priority_min(SCHED_OTHER) = 0
552461      0.000012 <... pselect6 resumed>) = 1 (in [21])
552460      0.000004 sched_get_priority_max(SCHED_OTHER <unfinished ...>
552461      0.000002 recvfrom(21,  <unfinished ...>
552460      0.000003 <... sched_get_priority_max resumed>) = 0
552461      0.000002 <... recvfrom resumed>"M-SEARCH * HTTP/1.1\r\nMX: 5\r\nST: "..., 2499, 0, {sa_family=AF_INET, sin_port=htons(2654), sin_addr=inet_addr("192.168.1.119")}, [128 => 16]) = 269
552460      0.000014 sched_setscheduler(552460, SCHED_OTHER, [0] <unfinished ...>
552461      0.000004 futex(0x743228fa7e74, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000003 <... sched_setscheduler resumed>) = 0
552461      0.000002 <... futex resumed>) = 1
552459      0.000003 <... futex resumed>) = 0
552461      0.000002 pselect6(23, [16 17 18 19 20 21 22], NULL, [18], NULL, NULL <unfinished ...>
552459      0.000003 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000005 sched_get_priority_min(SCHED_OTHER <unfinished ...>
552459      0.000002 <... futex resumed>) = 0
552460      0.000002 <... sched_get_priority_min resumed>) = 0
552459      0.000002 sched_get_priority_min(SCHED_OTHER <unfinished ...>
552460      0.000002 sched_get_priority_max(SCHED_OTHER <unfinished ...>
552459      0.000002 <... sched_get_priority_min resumed>) = 0
552460      0.000002 <... sched_get_priority_max resumed>) = 0
552459      0.000002 sched_get_priority_max(SCHED_OTHER <unfinished ...>
552460      0.000002 sched_setscheduler(552460, SCHED_OTHER, [0] <unfinished ...>
552459      0.000003 <... sched_get_priority_max resumed>) = 0
552460      0.000002 <... sched_setscheduler resumed>) = 0
552459      0.000002 sched_setscheduler(552459, SCHED_OTHER, [0] <unfinished ...>
552460      0.000004 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830038, tv_nsec=470000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000021 <... sched_setscheduler resumed>) = 0
552459      0.000077 sched_get_priority_min(SCHED_OTHER) = 0
552459      0.000122 sched_get_priority_max(SCHED_OTHER) = 0
552459      0.000072 sched_setscheduler(552459, SCHED_OTHER, [0]) = 0
552459      0.000027 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830038, tv_nsec=470000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.791703 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000083 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000024 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830039, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740835 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000108 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000247 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830041, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552453      1.515244 <... epoll_wait resumed>[{events=EPOLLIN, data={u32=2685756592, u64=106556529403056}}], 16, 60541) = 1
552453      0.000068 recvfrom(25, "status\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 8
552453      0.000045 write(2, "client: [3] process command \"sta"..., 37) = 37
552465      0.000025 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000004 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000006 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000005 <... futex resumed>) = 0
552465      0.000006 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552453      0.000002 futex(0x60e99f632c24, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552465      0.000005 <... futex resumed>) = 0
552465      0.000010 futex(0x60e99f632c24, FUTEX_WAKE_PRIVATE, 1) = 1
552453      0.000012 <... futex resumed>) = 0
552465      0.000008 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000003 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000003 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000004 <... futex resumed>) = 0
552465      0.000004 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552465      0.000033 futex(0x60e99f632ba0, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
552453      0.000002 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552465      0.000002 <... futex resumed>) = -1 EAGAIN (Resource temporarily unavailable)
552453      0.000003 <... futex resumed>) = 0
552465      0.000002 futex(0x60e99f632ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552453      0.000010 write(2, "client: [3] command returned 0\n", 31) = 31
552453      0.000024 sendto(25, "volume: 46\nrepeat: 0\nrandom: 1\ns"..., 280, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 280
552453      0.000049 epoll_wait(3,  <unfinished ...>
552460      0.951057 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552459      0.000040 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552460      0.000008 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552459      0.000007 futex(0x743228fa7e20, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
552460      0.000005 <... futex resumed>) = 0
552459      0.000006 <... futex resumed>) = 0
552460      0.000005 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830043, tv_nsec=470000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552459      0.000017 futex(0x743228fa7e70, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830043, tv_nsec=470000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552462      0.791953 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552462      0.000046 futex(0x743228fa7ba0, FUTEX_WAKE_PRIVATE, 1) = 0
552462      0.000032 futex(0x743228fa7bf4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830044, tv_nsec=262000000}, FUTEX_BITSET_MATCH_ANY <unfinished ...>
552463      1.740869 <... futex resumed>) = -1 ETIMEDOUT (Connection timed out)
552463      0.000037 futex(0x743228fa80a0, FUTEX_WAKE_PRIVATE, 1) = 0
552463      0.000015 futex(0x743228fa80f4, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, {tv_sec=1725830046, tv_nsec=3000000}, FUTEX_BITSET_MATCH_ANY <detached ...>

Version:

Music Player Daemon 0.24 (v0.23.15-1511-g965c466e9)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 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 udisks nfs curl

Neighbor plugins:
 upnp udisks

Decoder plugins:
 [mpg123] mp3
 [mad] mp3 mp2
 [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
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp
 [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
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [ffmpeg] 264 265 266 302 3g2 3gp 4xm 669 722 aa aa3 aac aax abc ac3 ac4 ace acm act adf adp ads adx aea afc aiff aix al alias_pix alp amf amr amrnb amrwb ams anm ans apc ape apl apm apng aptx aptxhd aqt argo_asf argo_brp argo_cvg art asc asf asf_o ass ast au avc avi avif avr avs avs2 avs3 bcstm bethsoftvid bfi bfstm bin bink binka bit bitpacked bmp_pipe bmv boa bonk brender_pix brstm c2 c93 caf cdata cdg cdxl cgi cif cine codec2raw concat cri_pipe dash dat data daud dav dbm dds_pipe dfa dff dfpwm dif digi dirac diz dmf dnxhd dpx_pipe dsf dsicin dsm dss dst dtk dtm dts dtshd dv dvbsub dvbtxt dvdvideo dxa ea eac3 ec3 evc exr_pipe f32be f32le f4v f64be f64le fap far ffmetadata film_cpk fits flac flic flm flv frm fsb fwse g722 g723_1 g726 g726le g729 gdm gdv gem_pipe genh gif gif_pipe gsm gxf h261 h263 h264 h265 h266 h26l hca hcom hdr_pipe heic heif hevc hls hnm iamf ice ico idcin idf idx iff ifv ilbc image2 image2pipe imf imx ipmovie ipu ircam ism isma ismv iss it itgz itr itz iv8 ivf ivr j2b j2k j2k_pipe jacosub jpeg_pipe jpegls_pipe jpegxl_pipe jv jxl kux kvag laf lmlm4 loas lrc lvf lxf m15 m2a m4a m4b m4v mac mca mcc mdgz mdl mdr mdz med mgsts microdvd mid mj2 mjpeg mjpg mk3d mka mks mkv mlp mlv mm mmcmp mmf mms mo3 mod mods moflex mov mp2 mp3 mp4 mpa mpc mpc8 mpeg mpegts mpegtsraw mpegvideo mpl2 mpo mptm msbc msf msnwctcp msp mt2 mtaf mtm mtv musx mv mvi mxf mxg nfo nist nsp nst nsv nut nuv obu ogg okt oma omg osq paf pam_pipe pbm_pipe pcx_pipe pdv pfm_pipe pgm_pipe pgmyuv_pipe pgx_pipe phm_pipe photocd_pipe pictor_pipe pjs plm pmp png_pipe pp_bnk ppm ppm_pipe psd_pipe psm psp psxstr pt36 ptm pva pvf qcif qcp qdraw_pipe qoa qoi_pipe r3d rco rcv rgb rka rl2 rm roq rpl rsd rso rt rtp rtsp s16be s24be s24le s32be s32le s337m s3gz s3m s3r s3z sami sap sb sbc sbg scc scd sdns sdp sdr2 sds sdx ser sf sfx sfx2 sga sgi_pipe shn sln smi smk smush sol son sox spdif sph srt ss2 st26 stk stl stm stp str sub sunrast_pipe sup svag svg_pipe svs sw swf tak tco tedcaptions thd thp tiertexseq tiff_pipe tmv tta txd txt ty ty+ u16be u24be u24le u32be u32le ub ul ult umx usm uw v v210 vag vapoursynth vb vbn_pipe vc1 vidc viv vividas vmd voc vpk vqe vqf vql vt vtt vvc w64 wa wav way wc3movie webm webm_dash_manifest webp_pipe wow wsaud wsd wsvqa wtv wv wve xa xbin xbm_pipe xl xm xmd xmgz xmr xmv xmz xpk xpm_pipe xvag xwd_pipe xwma y4m yop yuv yuv10 rtp:// rtsp:// rtsps://
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao openal pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

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

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

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

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un
geneticdrift commented 1 week ago

Looks like when changing the next song (shuffle, random) and the decoder has already finished with the current song (near the end of playing the song), it is necessary to restart the decoder for it to start the new-next song.

Restoring the code that was removed in the player thread in revision 57212d5a35a solves the issue. But I'm not sure if it's the right solution. May be restarting the decoder when the next-song is actually changed is better.

diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx
index 91f2810ea..297920524 100644
--- a/src/player/Thread.cxx
+++ b/src/player/Thread.cxx
@@ -784,11 +784,6 @@ Player::ProcessCommand(std::unique_lock<Mutex> &lock) noexcept

        queued = true;
        pc.CommandFinished();
-
-       if (!decoder_starting && dc.IsIdle())
-           StartDecoder(lock, std::make_shared<MusicPipe>(),
-                    false);
-
        break;

    case PlayerCommand::PAUSE: