MusicPlayerDaemon / MPD

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

Assert on attempt to play 6 channel dsf file on stereo DAC #1859

Closed t0maz closed 1 year ago

t0maz commented 1 year ago

Bug report

Describe the bug

Whenever MPD attempt to play 6 channel DSD file with stereo DAC it fails the assert. The "dop" is enabled in the config file (without it it plays noise instead of crashing on assert).

Expected Behavior

Handle the case gracefully without failing assertion. Downmix channels to stereo and play without issues.

Actual Behavior

Assert fail and MPD exit.

Version

Music Player Daemon 0.23.13 (0.23.13)
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 nfs curl

Neighbor plugins:
 upnp

Decoders plugins:
 [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
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [fluidsynth] mid
 [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:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe ao openal osx httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame wave flac

Archive plugins:
 [bz2] bz2

Input plugins:
 file archive curl ffmpeg nfs

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

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

Other features:
 icu ipv6 tcp un

Configuration

# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/

# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory     "/Volumes/cirrus_mirrored/Music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
playlist_directory      "/Volumes/cirrus_mirrored/Music/Playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
db_file         "~/.mpd/mpd.db"

# These settings are the locations for the daemon log files for the daemon.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog.
#
# If you use systemd, do not configure a log_file.  With systemd, MPD
# defaults to the systemd journal, which is fine.
#
log_file            "~/.mpd/mpd.log"

# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
# If you use systemd, do not configure a pid_file.
#
pid_file            "~/.mpd/mpd.pid"

# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
#
state_file          "~/.mpd/mpdstate"
#
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
#sticker_file           "~/.mpd/sticker.sql"
#
###############################################################################

# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
#user               "nobody"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group              "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other than the default, any.
# This setting can deny access to control of the daemon. Not effective if
# systemd socket activation is in use.
#
# For network
bind_to_address     "127.0.0.1"
#
# And for Unix Socket
#bind_to_address        "~/.mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
port                "6600"
#
# Suppress all messages below the given threshold.  Use "verbose" for
# troubleshooting. Available setting arguments are "notice", "info", "verbose",
# "warning" and "error".
#
#log_level          "notice"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
save_absolute_paths_in_playlists    "no"
#
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the user manual.
#metadata_to_use    "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This example just enables the "comment" tag without disabling all
# the other supported tags:
#metadata_to_use "+comment"
#
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#
auto_update "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself.  There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################

# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks    "yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks     "yes"
#
###############################################################################

# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled       "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network. %h will be replaced with the hostname.
#
#zeroconf_name          "Music Player @ %h"
#
###############################################################################

# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# setting can be specified multiple times for different password profiles.
#
#password                        "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions             "read,add,control,admin"
#
###############################################################################

# Database #######################################################################
#
# An example of a database section instead of the old 'db_file' setting.
# It enables mounting other storages into the music directory.
#
#database {
#       plugin "simple"
#       path "~/.local/share/mpd/db"
#       cache_directory "~/.local/share/mpd/cache"
#}
#
# An example of database config for a satellite setup
#
#music_directory "nfs://fileserver.local/srv/mp3"
#database {
#       plugin "proxy"
#       host "other.mpd.host"
#       port "6600"
#}

# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

#
###############################################################################

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#

audio_output {
    type                  "osx"
    name                  "CoreAudio"
    mixer_type            "software"
    dop                   "yes"
}

# An example of an ALSA output:
#
#audio_output {
#   type        "alsa"
#   name        "My ALSA Device"
##  device      "hw:0,0"    # optional
##  mixer_type      "hardware"  # optional
##  mixer_device    "default"   # optional
##  mixer_control   "PCM"       # optional
##  mixer_index "0"     # optional
#}
#
# An example of an OSS output:
#
#audio_output {
#   type        "oss"
#   name        "My OSS Device"
##  device      "/dev/dsp"  # optional
##  mixer_type      "hardware"  # optional
##  mixer_device    "/dev/mixer"    # optional
##  mixer_control   "PCM"       # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#   type        "shout"
#   encoder     "vorbis"        # optional
#   name        "My Shout Stream"
#   host        "localhost"
#   port        "8000"
#   mount       "/mpd.ogg"
#   password    "hackme"
#   quality     "5.0"
#   bitrate     "128"
#   format      "44100:16:1"
##  protocol    "icecast2"      # optional
##  user        "source"        # optional
##  description "My Stream Description" # optional
##  url     "http://example.com"    # optional
##  genre       "jazz"          # optional
##  public      "no"            # optional
##  timeout     "2"         # optional
##  mixer_type      "software"      # optional
#}
#
# An example of a recorder output:
#
#audio_output {
#   type        "recorder"
#   name        "My recorder"
#   encoder     "vorbis"        # optional, vorbis or lame
#   path        "/var/lib/mpd/recorder/mpd.ogg"
##  quality     "5.0"           # do not define if bitrate is defined
#   bitrate     "128"           # do not define if quality is defined
#   format      "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
#   type        "httpd"
#   name        "My HTTP Stream"
#   encoder     "vorbis"        # optional, vorbis or lame
#   port        "8000"
#   bind_to_address "0.0.0.0"       # optional, IPv4 or IPv6
##  quality     "5.0"           # do not define if bitrate is defined
#   bitrate     "128"           # do not define if quality is defined
#   format      "44100:16:1"
#   max_clients "0"         # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
#audio_output {
#   type        "pulse"
#   name        "My Pulse Output"
##  server      "remote_server"     # optional
##  sink        "remote_server_sink"    # optional
##  media_role  "media_role"        #optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#   type        "winmm"
#   name        "My WinMM output"
##  device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#       or
##  device      "0"     # optional
##  mixer_type  "hardware"  # optional
#}
#
# An example of a wasapi output (Windows multimedia API).
#
#audio_output {
#   type        "wasapi"
#   name        "My WASAPI output"
##  device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#       or
##  device      "0"     # optional
## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
##  exclusive   "no"        # optional
## Enumerate all devices in log.
##  enumerate   "no"        # optional
#}
#
# An example of an openal output.
#
#audio_output {
#   type        "openal"
#   name        "My OpenAL output"
##  device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
# An example of an sndio output.
#
#audio_output {
#   type        "sndio"
#   name        "sndio output"
#   mixer_type  "hardware"
#}
#
# An example of an OS X output:
#
#audio_output {
#   type        "osx"
#   name        "My OS X Device"
##  device      "Built-in Output"   # optional
##  channel_map      "-1,-1,0,1"    # optional
#}
#
## Example "pipe" output:
#
#audio_output {
#   type        "pipe"
#   name        "my pipe"
#   command     "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#   command     "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#   command     "nc example.org 8765"
#   format      "44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
#   type        "null"
#   name        "My Null Output"
#   mixer_type      "none"          # optional
#}
#
###############################################################################

# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for
# more details about ReplayGain.
# This setting is off by default.
#
#replaygain         "album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp      "0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
#replaygain_missing_preamp  "0"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit       "yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#
#volume_normalization       "no"
#
###############################################################################

# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
#filesystem_charset     "UTF-8"
#
###############################################################################

Log

Aug 23 18:10 : decoder_thread: probing plugin dsf
Aug 23 18:10 : decoder: audio_format=dsd64:6, seekable=true
Aug 23 18:10 : client: [0] command returned 0
Aug 23 18:10 : client: [0] process command "idle"
Aug 23 18:10 : client: [0] command returned 1
Aug 23 18:10 : client: [0] process command "status"
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (768000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (705600Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (384000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (352800Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (192000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (176400Hz) rated 2511
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (96000Hz) rated 511
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (88200Hz) rated 1109
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (48000Hz) rated 108
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 32-bit SInt LE (44100Hz) rated 1107
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (768000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (705600Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (384000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (352800Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (192000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (176400Hz) rated 2515
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (96000Hz) rated 515
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (88200Hz) rated 1113
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (48000Hz) rated 112
Aug 23 18:10 : osx_output: Format: 2 channel mixable interleaved 24-bit SInt LE (44100Hz) rated 1111
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (768000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (705600Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (384000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (352800Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (192000Hz) rated 11
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (176400Hz) rated 2511
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (96000Hz) rated 511
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (88200Hz) rated 1109
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (48000Hz) rated 108
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 32-bit SInt LE (44100Hz) rated 1107
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (768000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (705600Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (384000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (352800Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (192000Hz) rated 15
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (176400Hz) rated 2515
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (96000Hz) rated 515
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (88200Hz) rated 1113
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (48000Hz) rated 112
Aug 23 18:10 : osx_output: Format: 2 channel  interleaved 24-bit SInt LE (44100Hz) rated 1111
Aug 23 18:10 : output: opened "CoreAudio" (osx) audio_format=dsd64:6
Aug 23 18:10 : client: [0] command returned 0
Aug 23 18:10 : client: [0] process command "plchanges "3""
Aug 23 18:10 : client: [0] command returned 0
Aug 23 18:10 : client: [0] process command "status"
Aug 23 18:10 : client: [0] command returned 0
Aug 23 18:10 : client: [0] process command "idle"
Aug 23 18:10 : client: [0] command returned 1
Aug 23 18:10 : client: [0] process command "status"
Aug 23 18:10 : client: [0] command returned 0
Aug 23 18:10 : client: [0] process command "idle"
Aug 23 18:10 : client: [0] command returned 1
Assertion failed: (nbytes <= data.size), function PlayChunk, file Thread.cxx, line 270.
(lldb) target create "/usr/local/bin/mpd" --core "core.3021"
Core file '/cores/core.3021' (x86_64) was loaded.
(lldb) bt all
warning: could not execute support code to read Objective-C class data in the process. This may reduce the quality of type information available.

warning: mpd was compiled with optimization - stepping may behave oddly; variables may not be available.
* thread #1
  * frame #0: 0x00007ff81378f2ae libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000108e0e60d mpd`PollBackend::ReadEvents(this=0x00007ff7b713ee28, timeout_ms=<unavailable>) at PollBackend.cxx:83:10 [opt]
    frame #2: 0x0000000108e0dcfe mpd`EventLoop::Run() [inlined] EventLoop::Wait(this=0x00007ff7b713e588, timeout=<unavailable>) at Loop.cxx:252:16 [opt]
    frame #3: 0x0000000108e0dcc7 mpd`EventLoop::Run(this=0x00007ff7b713e588) at Loop.cxx:342:3 [opt]
    frame #4: 0x0000000108dcc0ad mpd`mpd_main(int, char**) [inlined] MainConfigured(options=0x00007ff7b713e568, raw_config=0x00007ff7b713e350) at Main.cxx:579:22 [opt]
    frame #5: 0x0000000108dcb6c1 mpd`mpd_main(int, char**) [inlined] MainOrThrow(argc=<unavailable>, argv=<unavailable>) at Main.cxx:694:2 [opt]
    frame #6: 0x0000000108dcb68f mpd`mpd_main(argc=<unavailable>, argv=<unavailable>) at Main.cxx:700:2 [opt]
    frame #7: 0x0000000108dcc6bb mpd`main(argc=<unavailable>, argv=<unavailable>) at Main.cxx:712:9 [opt]
    frame #8: 0x00007ff81346d41f dyld`start + 1903
  thread #2
    frame #0: 0x00007ff8137c2bb0 libsystem_pthread.dylib`start_wqthread
  thread #3
    frame #0: 0x00007ff81378853e libsystem_kernel.dylib`semaphore_wait_trap + 10
    frame #1: 0x00007ff81d05807e caulk`caulk::semaphore::timed_wait(double) + 150
    frame #2: 0x00007ff81d057f9c caulk`caulk::concurrent::details::worker_thread::run() + 30
    frame #3: 0x00007ff81d057cb0 caulk`void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 41
    frame #4: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #5: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #4
    frame #0: 0x00007ff81378f2ae libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000108e0e60d mpd`PollBackend::ReadEvents(this=0x00007ff7b713f720, timeout_ms=<unavailable>) at PollBackend.cxx:83:10 [opt]
    frame #2: 0x0000000108e0dcfe mpd`EventLoop::Run() [inlined] EventLoop::Wait(this=0x00007ff7b713ee80, timeout=<unavailable>) at Loop.cxx:252:16 [opt]
    frame #3: 0x0000000108e0dcc7 mpd`EventLoop::Run(this=0x00007ff7b713ee80) at Loop.cxx:342:3 [opt]
    frame #4: 0x0000000108e0d4d2 mpd`EventThread::Run(this=0x00007ff7b713ee80) at Thread.cxx:70:13 [opt]
    frame #5: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #6: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #7: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #8: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #5
    frame #0: 0x00007ff81378f2ae libsystem_kernel.dylib`poll + 10
    frame #1: 0x0000000108e0e60d mpd`PollBackend::ReadEvents(this=0x00007ff7b7140028, timeout_ms=<unavailable>) at PollBackend.cxx:83:10 [opt]
    frame #2: 0x0000000108e0dcfe mpd`EventLoop::Run() [inlined] EventLoop::Wait(this=0x00007ff7b713f788, timeout=<unavailable>) at Loop.cxx:252:16 [opt]
    frame #3: 0x0000000108e0dcc7 mpd`EventLoop::Run(this=0x00007ff7b713f788) at Loop.cxx:342:3 [opt]
    frame #4: 0x0000000108e0d4d2 mpd`EventThread::Run(this=0x00007ff7b713f788) at Thread.cxx:70:13 [opt]
    frame #5: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #6: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #7: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #8: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #6
    frame #0: 0x00007ff81378b0fe libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff8137c7758 libsystem_pthread.dylib`_pthread_cond_wait + 1242
    frame #2: 0x00007ff8137041e2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x0000000108de2aa2 mpd`PlayerControl::WaitOutputConsumed(std::__1::unique_lock<std::__1::mutex>&, unsigned int) [inlined] PlayerControl::Wait(this=0x00007f85ff00e760, lock=0x000070000c689c80) at Control.hxx:377:8 [opt]
    frame #4: 0x0000000108de2a93 mpd`PlayerControl::WaitOutputConsumed(this=0x00007f85ff00e760, lock=0x000070000c689c80, threshold=64) at Control.cxx:54:3 [opt]
    frame #5: 0x0000000108de18e7 mpd`Player::PlayNextChunk() [inlined] PlayerControl::LockWaitOutputConsumed(this=0x00007f85ff00e760, threshold=64) at Control.hxx:437:10 [opt]
    frame #6: 0x0000000108de18c5 mpd`Player::PlayNextChunk(this=0x000070000c689d50) at Thread.cxx:836:10 [opt]
    frame #7: 0x0000000108de0eda mpd`Player::Run(this=0x000070000c689d50) at Thread.cxx:1078:4 [opt]
    frame #8: 0x0000000108de093e mpd`PlayerControl::RunThread() [inlined] do_play(pc=0x00007f85ff00e760, dc=0x000070000c689e30, buffer=0x000070000c689dd0) at Thread.cxx:1158:9 [opt]
    frame #9: 0x0000000108de08d2 mpd`PlayerControl::RunThread(this=0x00007f85ff00e760) at Thread.cxx:1184:5 [opt]
    frame #10: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #11: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #12: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #13: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #14: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #7
    frame #0: 0x00007ff81378b0fe libsystem_kernel.dylib`__psynch_cvwait + 10
    frame #1: 0x00007ff8137c7758 libsystem_pthread.dylib`_pthread_cond_wait + 1242
    frame #2: 0x00007ff8137041e2 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
    frame #3: 0x0000000108dd7baf mpd`DecoderBridge::GetChunk() [inlined] DecoderControl::Wait(this=0x000070000c689e30, lock=0x000070000c6fcc48) at Control.hxx:213:8 [opt]
    frame #4: 0x0000000108dd7ba3 mpd`DecoderBridge::GetChunk() [inlined] NeedChunks(dc=0x000070000c689e30, lock=0x000070000c6fcc48) at Bridge.cxx:107:6 [opt]
    frame #5: 0x0000000108dd7b95 mpd`DecoderBridge::GetChunk() [inlined] LockNeedChunks(dc=0x000070000c689e30) at Bridge.cxx:116:9 [opt]
    frame #6: 0x0000000108dd7b84 mpd`DecoderBridge::GetChunk(this=0x000070000c70cde8) at Bridge.cxx:137:9 [opt]
    frame #7: 0x0000000108dd8859 mpd`DecoderBridge::SubmitData(this=0x000070000c70cde8, is=<unavailable>, data=0x000070000c6ffd50, length=12288, kbit_rate=16934) at Bridge.cxx:531:17 [opt]
    frame #8: 0x0000000108e4d0bb mpd`dsf_stream_decode(DecoderClient&, InputStream&) [inlined] DecoderClient::SubmitData(this=0x000070000c70cde8, is=0x0000600003c1db90, data=0x000070000c6fcd50, length=24576, kbit_rate=<unavailable>) at Client.hxx:138:10 [opt]
    frame #9: 0x0000000108e4d099 mpd`dsf_stream_decode(DecoderClient&, InputStream&) at DsfDecoderPlugin.cxx:292:16 [opt]
    frame #10: 0x0000000108e4cdc2 mpd`dsf_stream_decode(client=<unavailable>, is=<unavailable>) at DsfDecoderPlugin.cxx:321:2 [opt]
    frame #11: 0x0000000108dd6e6e mpd`decoder_stream_decode(DecoderPlugin const&, DecoderBridge&, InputStream&, std::__1::unique_lock<std::__1::mutex>&) [inlined] DecoderPlugin::StreamDecode(this=0x0000000108eae050, client=0x000070000c70cde8, is=0x0000600003c1db90) const at DecoderPlugin.hxx:202:3 [opt]
    frame #12: 0x0000000108dd6e64 mpd`decoder_stream_decode(plugin=0x0000000108eae050, bridge=0x000070000c70cde8, input_stream=0x0000600003c1db90, lock=0x000070000c70ceb0) at Thread.cxx:119:10 [opt]
    frame #13: 0x0000000108dd65cb mpd`decoder_run(DecoderControl&) at Thread.cxx:349:10 [opt]
    frame #14: 0x0000000108dd658f mpd`decoder_run(DecoderControl&) [inlined] decoder_run_file(this=<unavailable>, plugin=0x0000000108eae050)::$_3::operator()(DecoderPlugin const&) const at Thread.cxx:430:16 [opt]
    frame #15: 0x0000000108dd658f mpd`decoder_run(DecoderControl&) at DecoderList.hxx:72:37 [opt]
    frame #16: 0x0000000108dd64da mpd`decoder_run(DecoderControl&) [inlined] decoder_run_file(bridge=0x000070000c70cde8, uri_utf8="/Volumes/cirrus_mirrored/Music/SACD/Dire Straits/2005 - Dire Straits - Brothers In Arms - 20th Anniversary Edition/Dire Straits - Brothers In Arms - 20th Anniversary Edition [mch]/02 - Dire Straits - Money For Nothing.dsf", path_fs=Path @ 0x000070000c70cf10) at Thread.cxx:428:9 [opt]
    frame #17: 0x0000000108dd64da mpd`decoder_run(DecoderControl&) [inlined] DecoderUnlockedRunUri(bridge=0x000070000c70cde8, real_uri="/Volumes/cirrus_mirrored/Music/SACD/Dire Straits/2005 - Dire Straits - Brothers In Arms - 20th Anniversary Edition/Dire Straits - Brothers In Arms - 20th Anniversary Edition [mch]/02 - Dire Straits - Money For Nothing.dsf", path_fs=Path @ 0x000070000c70cf10) at Thread.cxx:448:5 [opt]
    frame #18: 0x0000000108dd6160 mpd`decoder_run(DecoderControl&) at Thread.cxx:510:13 [opt]
    frame #19: 0x0000000108dd6056 mpd`decoder_run(dc=0x000070000c689e30) at Thread.cxx:551:2 [opt]
    frame #20: 0x0000000108dd5e70 mpd`DecoderControl::RunThread(this=0x000070000c689e30) at Thread.cxx:576:4 [opt]
    frame #21: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #22: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #23: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #24: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #25: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #8
    frame #0: 0x0000000108e2ba22 mpd`DsdToDopConverter::Convert(ConstBuffer<unsigned char>) at Dop.cxx:53:12 [opt]
    frame #1: 0x0000000108e2b887 mpd`DsdToDopConverter::Convert(ConstBuffer<unsigned char>) [inlined] auto DsdToDopConverter::Convert(this=<unavailable>, arg1=<unavailable>, arg2=<unavailable>, arg3=<unavailable>)::$_0::operator()<unsigned int*&, unsigned char const*&, unsigned long const&>(unsigned int*&, unsigned char const*&, unsigned long const&) const at Dop.cxx:95:58 [opt]
    frame #2: 0x0000000108e2b887 mpd`DsdToDopConverter::Convert(ConstBuffer<unsigned char>) [inlined] ConstBuffer<unsigned int> PcmRestBuffer<unsigned char, 4u>::Process<unsigned int, DsdToDopConverter::Convert(this=0x00007f85ff904140, buffer=<unavailable>, src=(data = "Нh\f", size = 18446744073709551604), dest_block_size=<unavailable>, f=<unavailable>)::$_0>(PcmBuffer&, ConstBuffer<unsigned char>, unsigned long, DsdToDopConverter::Convert(ConstBuffer<unsigned char>)::$_0&&) at RestBuffer.hxx:135:3 [opt]
    frame #3: 0x0000000108e2b887 mpd`DsdToDopConverter::Convert(this=0x00007f85ff904128, src=<unavailable>) at Dop.cxx:94:21 [opt]
    frame #4: 0x0000000108e2b00f mpd`PcmExport::Export(this=0x00007f85ff9040a8, data=(data = 0x00007f85ffc01008, size = 18446744073709551604)) at Export.cxx:289:24 [opt]
    frame #5: 0x0000000108e44ea3 mpd`OSXOutput::Play(this=0x00007f85ff904080, chunk=0x00007f85ffc01008, size=18446744073709551604) at OSXOutputPlugin.cxx:793:54 [opt]
    frame #6: 0x0000000108e39078 mpd`AudioOutputControl::PlayChunk(this=0x00007f85ffb08bf0, lock=0x000070000c78ff60) at Thread.cxx:268:21 [opt]
    frame #7: 0x0000000108e387b7 mpd`AudioOutputControl::InternalPlay(this=0x00007f85ffb08bf0, lock=0x000070000c78ff60) at Thread.cxx:323:8 [opt]
    frame #8: 0x0000000108e384df mpd`AudioOutputControl::Task(this=0x00007f85ffb08bf0) at Thread.cxx:447:8 [opt]
    frame #9: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #10: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #11: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #12: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #13: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #9
    frame #0: 0x00007ff813789cae libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007ff8137c3cb9 libsystem_pthread.dylib`_pthread_wqthread + 427
    frame #2: 0x00007ff8137c2bbf libsystem_pthread.dylib`start_wqthread + 15
  thread #10
    frame #0: 0x00007ff813789cae libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007ff8137c3cb9 libsystem_pthread.dylib`_pthread_wqthread + 427
    frame #2: 0x00007ff8137c2bbf libsystem_pthread.dylib`start_wqthread + 15
  thread #11
    frame #0: 0x0000000108e38064 mpd`AudioOutputSource::FilterChunk(this=0x00007f85ffb08db8, chunk=<unavailable>) at Source.cxx:211:17 [opt]
    frame #1: 0x0000000108e38175 mpd`AudioOutputSource::Fill(this=0x00007f85ffb08db8, mutex=0x00007f85ffb08ef0) at Source.cxx:235:40 [opt]
    frame #2: 0x0000000108e3826e mpd`AudioOutputControl::FillSourceOrClose(this=0x00007f85ffb08d90) at Thread.cxx:226:16 [opt]
    frame #3: 0x0000000108e387c3 mpd`AudioOutputControl::InternalPlay(this=0x00007f85ffb08d90, lock=0x000070000c895f60) at Thread.cxx:325:11 [opt]
    frame #4: 0x0000000108e384df mpd`AudioOutputControl::Task(this=0x00007f85ffb08d90) at Thread.cxx:447:8 [opt]
    frame #5: 0x0000000108e0f25d mpd`Thread::ThreadProc(void*) [inlined] BoundMethod<void () noexcept>::operator(this=<unavailable>)() const at BindMethod.hxx:78:10 [opt]
    frame #6: 0x0000000108e0f257 mpd`Thread::ThreadProc(void*) [inlined] Thread::Run(this=<unavailable>) at Thread.cxx:63:2 [opt]
    frame #7: 0x0000000108e0f257 mpd`Thread::ThreadProc(ctx=<unavailable>) at Thread.cxx:92:9 [opt]
    frame #8: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #12
    frame #0: 0x00007ff8137885c2 libsystem_kernel.dylib`mach_msg2_trap + 10
    frame #1: 0x00007ff81379673d libsystem_kernel.dylib`mach_msg2_internal + 78
    frame #2: 0x00007ff81378f5f4 libsystem_kernel.dylib`mach_msg_overwrite + 692
    frame #3: 0x00007ff8137888aa libsystem_kernel.dylib`mach_msg + 19
    frame #4: 0x00007ff815a7516d CoreAudio`HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 111
    frame #5: 0x00007ff81595f699 CoreAudio`HALC_ProxyIOContext::IOWorkLoop() + 4035
    frame #6: 0x00007ff81595e041 CoreAudio`invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 80
    frame #7: 0x00007ff815acd93e CoreAudio`HALB_IOThread::Entry(void*) + 72
    frame #8: 0x00007ff8137c71d3 libsystem_pthread.dylib`_pthread_start + 125
    frame #9: 0x00007ff8137c2bd3 libsystem_pthread.dylib`thread_start + 15
  thread #13
    frame #0: 0x0000000000000000
(lldb) 
t0maz commented 1 year ago

Collected and added a call stack.

MaxKellermann commented 1 year ago

Are you sure the stack dump and the crash message are from the same crash? Your stack dump shows MPD in a different location, not in the assertion failure.

t0maz commented 1 year ago

No they aren't from the same run. The reported failure was produced with mpd prebuilt binaries from "brew" repository. I've later compiled the same mpd revision but debug version to reproduce the reported issue and added the call stack.

MaxKellermann commented 1 year ago

Then please don't post inconsistent data.