2017-03-28 06:22 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004668MPDUpdatingpublic2017-03-25 21:40
Reportertungol 
Assigned Tocirrus 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionunable to reproduce 
PlatformOSFreebSDOS Version11.0-RELEASE-p8
Product Version0.20 
Target VersionFixed in Version 
Summary0004668: Updating database fails when a sub-directory directory is removed
DescriptionI'm having trouble updating the database. When musicpd hits a folder that's been moved or removed since the last scan, it outputs an error like:

[code]Mar 15 06:07 : exception: Failed to access /voss/music/albums by artist/Thomas Dolby: No such file or directory[/code]

It then seems to stop scanning or updating further. The directory it fails on remains in the database. I would expect the behavior to be that it recognizes that it's no longer there and removes it and any contained files from the database, then continues.

If I update directly on the missing directory instead of a parent, then it does the right thing. This seems like a bug but it's possible I'm missing something.
Steps To Reproduce1. Add some files in a sub-directory to the database
2. Move, rename, or remove that sub-directory
3. Update starting on a parent of the sub-directory

I haven't tried re-installing clean on a different box or anything, so I'm not sure what conditions outside of MPD might be required. This never used to be a problem, so something changed somewhere.
Additional Informationrelevant verbose log:

Mar 15 06:30 : client: [1] process command "update "incomplete2/albums by artist""
Mar 15 06:30 : update: spawned thread for update job id 1
Mar 15 06:30 : client: [1] command returned 0
Mar 15 06:30 : update: starting: incomplete2/albums by artist
Mar 15 06:30 : exception: Failed to access /voss/music/incomplete2/albums by artist/Get Up Kids, The: No such file or directory
Mar 15 06:30 : update: finished: incomplete2/albums by artist
Mar 15 06:30 : client: [1] process command "update "incomplete2/albums by artist/Get Up Kids, The""
Mar 15 06:30 : update: spawned thread for update job id 2
Mar 15 06:30 : client: [1] command returned 0
Mar 15 06:30 : update: starting: incomplete2/albums by artist/Get Up Kids, The
Mar 15 06:30 : update: removing incomplete2/albums by artist/Get Up Kids, The/1999-09-28 Something to Write Home About/06 Ten Minutes.mp3
Mar 15 06:30 : simple_db: removing empty directories from DB
Mar 15 06:30 : update: removing incomplete2/albums by artist/Get Up Kids, The/Compilations/2001-11-27 Eudora/13 Anne Arbour.mp3
Mar 15 06:30 : simple_db: sorting DB
Mar 15 06:30 : simple_db: writing DB
Mar 15 06:30 : update: finished: incomplete2/albums by artist/Get Up Kids, The

> musicpd --version
Music Player Daemon 0.20.6

Copyright (C) 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2017 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

Storage plugins:
 local

Decoders plugins:
 [mad] mp3 mp2
 [oggflac] ogg oga
 [flac] flac
 [dsdiff] dff
 [dsf] dsf
 [faad] aac
 [pcm]

Filters:


Tag plugins:
 id3tag

Output plugins:
 null fifo oss recorder

Encoder plugins:
 null wave flac

Input plugins:
 file

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

Protocols:
 file://

Other features:
 icu tcp un

config file:
music_directory "/voss/music"
playlist_directory "/usr/local/var/mpd/playlists"
db_file "/usr/local/var/mpd/database"
log_file "/usr/local/var/mpd/log"
#error_file "/usr/local/var/mpd/error-log"
pid_file "/usr/local/var/mpd/pid"
state_file "/usr/local/var/mpd/state"
sticker_file "/usr/local/var/mpd/sticker"

user "mpd"
#group "nogroup"
port "6600"

#log_level "default"
restore_paused "yes"
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update "yes"

audio_output {
    type "oss"
    #name "My OSS Device"
    #device "/dev/uaudio0" # optional
    mixer_type "software" # optional
    #mixer_device "/dev/mixer" # optional
    #mixer_control "PCM" # optional
}
audio_output {
    type "null"
    name "My Null Output"
# mixer_type "none" # optional
}


replaygain "album"
#replaygain_preamp "0"
#replaygain_missing_preamp "0"
#replaygain_limit "yes"
volume_normalization "no"
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0010433

cirrus (administrator)

I can't reproduce this problem.

This looks like the inner-most exception handler did not catch the exception, but was instead caught by an upper-level catch-all exception handler.

That would be a serious toolchain bug. And I had to close a few bug reports here because they had encountered a very similar toolchain bug.

Which C++ compiler and which C++ standard library do you use?

The people with broken toolchains were all using clang and libc++. If that is what you're using, recompile MPD with gcc/libstdc++ instead.

~0010435

tungol (reporter)

Yeah, it was compiled with clang/libc++. I'll give it a test with gcc.

~0010449

cirrus (administrator)

Reopen if you believe this is not a toolchain bug.
+Notes

-Issue History
Date Modified Username Field Change
2017-03-15 08:15 tungol New Issue
2017-03-15 08:15 tungol Status new => assigned
2017-03-15 08:15 tungol Assigned To => cirrus
2017-03-16 12:12 cirrus Note Added: 0010433
2017-03-17 01:45 tungol Note Added: 0010435
2017-03-25 21:40 cirrus Status assigned => closed
2017-03-25 21:40 cirrus Resolution open => unable to reproduce
2017-03-25 21:40 cirrus Note Added: 0010449
+Issue History