Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453928 - media-sound/mpd-0.16.8 with media-libs/libmikmod-3.2.0 - segfault trying to parse MOD files into library
Summary: media-sound/mpd-0.16.8 with media-libs/libmikmod-3.2.0 - segfault trying to p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Christoph Mende (RETIRED)
URL: http://bugs.musicpd.org/view.php?id=3658
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 01:28 UTC by Khumba
Modified: 2013-04-10 11:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,5.54 KB, text/plain)
2013-01-25 01:28 UTC, Khumba
Details
.mpdconf (mpdconf,410 bytes, text/plain)
2013-01-25 01:29 UTC, Khumba
Details
mpd.log (mpd-log.txt,306 bytes, text/plain)
2013-01-25 01:30 UTC, Khumba
Details
Backtrace (mpd-backtrace.txt,18.70 KB, text/plain)
2013-01-25 01:30 UTC, Khumba
Details
emerge --info from a working system (oops not actually) (emerge-info-from.txt,5.63 KB, text/plain)
2013-01-26 17:55 UTC, Khumba
Details
Backtrace for mpd-0.17.3 compiled at -O0 (mpd-backtrace-0.17.3-O0.txt,17.49 KB, text/plain)
2013-01-26 18:34 UTC, Khumba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Khumba 2013-01-25 01:28:59 UTC
Created attachment 336784 [details]
emerge --info

I'm setting up a new stable amd64 system, and when media-sound/mpd-3.2.2 tries to parse my library on first start, it segfaults when trying to parse the first .mod file it sees.

It's using media-sound/libmikmod-3.2.0, not modplug, and consistently segfaults with the same backtrace with every file I've tried (different mod files in my collection and a random one from modarchive.org).  Upgrading to media-sound/mpd-0.17.3 (~amd64) doesn't help.

mpd with USE="-mikmod modplug" works fine.  Using media-sound/mikmod-3.2.2 on top of libmikmod also works fine, so it sounds like there's bad interaction between mpd and libmikmod.
Comment 1 Khumba 2013-01-25 01:29:40 UTC
Created attachment 336786 [details]
.mpdconf
Comment 2 Khumba 2013-01-25 01:30:10 UTC
Created attachment 336788 [details]
mpd.log
Comment 3 Khumba 2013-01-25 01:30:35 UTC
Created attachment 336790 [details]
Backtrace
Comment 4 Khumba 2013-01-26 17:55:59 UTC
Created attachment 336932 [details]
emerge --info from a working system (oops not actually)

I copied all my music from another machine where mpd works fine, even if I delete .mpd and have it reload everything, so I'm attaching the emerge --info of the working system.  Neither has anything relevant in package.accept_keywords.

And of course s/mpd-3.2.2/mpd-0.16.8/ above :).
Comment 5 Khumba 2013-01-26 18:12:54 UTC
Comment on attachment 336932 [details]
emerge --info from a working system (oops not actually)

Apologies, ignore the last comment, on the other system I had USE="mikmod modplug" set so modplug seems to takes priority and that makes things work fine.  USE="mikmod -modplug" crashes mpd on the other system too.
Comment 6 Christoph Mende (RETIRED) gentoo-dev 2013-01-26 18:15:40 UTC
Please try mpd-0.17.3 and/or give me a link to a free MOD file so I can reproduce it.
Comment 7 Khumba 2013-01-26 18:34:21 UTC
Created attachment 336936 [details]
Backtrace for mpd-0.17.3 compiled at -O0

Thanks for the quick reply.  Switched back to mpd-0.17.3 for now; still crashes in the same spot, with the only .mod file in my collection being at ~/Media/Music/order_of_death_ii.mod downloadable from here:

http://modarchive.org/index.php?request=view_by_moduleid&query=78091

Uploaded a new backtrace for 0.17.3, compiled with -O0 since it still crashes then.
Comment 8 Christoph Mende (RETIRED) gentoo-dev 2013-01-26 18:36:03 UTC
Thanks, I've filed the bug upstream as I don't know the libmikmod interface.
Comment 9 Christoph Mende (RETIRED) gentoo-dev 2013-03-27 17:02:00 UTC
So, mpd upstream said this is a libmikmod bug and cannot be fixed in mpd. Can you maybe try a current libmikmod snapshot?
Comment 10 Christoph Mende (RETIRED) gentoo-dev 2013-04-10 11:12:06 UTC
I've poked around some more and found the problem. This is indeed an mpd problem, which uses free() to try and free an aligned pointer. This doesn't work and should be done with MikMod_free(). I've written and applied a patch for this and added 0.17.4-r1 to the tree.
Please test this version and report back.