-start fresh
-start with the default config, only changing the music directory to a small sub set of music folder
-start using the rcmpd script, as starting mpd from the command line might fail setting some variables, and *don't* start other needed services, such as avahi
-examine the log a few lines above the end to determine where it crashed -- it might be some particular music, or music folder, or file size limit?
-Don't create the database. If it is corrupted, delete it. mpd will rescan and recreate it. Perhaps the 'state' file stores some info? better delete it also (see my log)
You have a seg fault. Bad sign. Look at your log and try to eliminate the last music folder. mpd uses some other programs and either mpd or those auxiliary program or libraries didn't like some your music and crashed. Or it might be that you have just too many files? Or the box has not enough memory to hold your songs? Can't tell, see bellow my experience, luck.
-start fresh:
rcmpd stop # stop mpd...
ipkg remove mpd # will not remove user created files
rm -rf /var/lib/mpd /etc/mpd.conf # remove user created files
ipkg install mpd # it also creates mpd user and runs 'rcmpd status', which creates needed folders
edit /etc/mpd.conf and change *only* the music dir so it points to a *small* music folder (without sub-folders)
edit /etc/init.d/S81mpd and set the OPTS variable so it contains more options, such as
OPTS="--no-daemon --verbose"
rcmpd start # starts mpd, log is in /var/log/mpd/mpd.log
pstree -p # nice processes listing, you should see avahi-daemon and dbus-daemon running, besides several mpd instances
less /var/log/mpd/mpd.log # examine the log, <space> to next page, <ESC> '>' to the end, 'q' to quit, '/searchstring', 'n' next search occurence, 'N' previous, etc
I tested it with a small 1700 music files on 220 folders without problem. The database is only 360KB:
ls -l /var/lib/mpd
-rw-r--r-- 1 mpd multimed 360204 Apr 9 00:13 database
-rw-r--r-- 1 mpd multimed 188 Apr 9 00:18 state
-rw-r--r-- 1 mpd multimed 3072 Apr 9 00:13 sticker.sql
my log:
Apr 09 00:13 : avahi: Initializing interface
Apr 09 00:13 : avahi: Client changed to state 2
Apr 09 00:13 : avahi: Client is RUNNING
Apr 09 00:13 : avahi: Registering service _mpd._tcp/Music Player on DNS-320L
Apr 09 00:13 : avahi: Service group changed to state 0
Apr 09 00:13 : avahi: Service group is UNCOMMITED
Apr 09 00:13 : update: spawned thread for update job id 1
Apr 09 00:13 : state_file: Loading state file /var/lib/mpd/state
Apr 09 00:13 : state_file: failed to open /var/lib/mpd/state: No such file or directory # as expected, first run!
Apr 09 00:13 : inotify: initializing inotify
Apr 09 00:13 : update: starting
Apr 09 00:13 : reading John Lee Hooker/Various/1-15 Don_t Trust Nobody.mp3Apr 09 00:13 : added John Lee Hooker/Various/1-15 Don_t Trust Nobody.mp3
... cut to the end
Apr 09 00:13 : added Astor Piazzola/Grandes Sucessos de Astor Piazzola/Fracanapa.mp3
Apr 09 00:13 : removing empty directories from DB
Apr 09 00:13 : sorting DB
Apr 09 00:13 : writing DB
Apr 09 00:13 : update: finished
Apr 09 00:18 : state_file: Saving state file /var/lib/mpd/state
pstree -p
init(1)-+-avahi-daemon(979)
|-dbus-daemon(974)
|-mpd(987)---mpd(990)-+-mpd(991)
| |-mpd(992)
| |-mpd(994)
| `-mpd(995)
rcmpd stop