Bug 651414 - Mediatomb crashes on Fedora 14
Summary: Mediatomb crashes on Fedora 14
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mediatomb
Version: 14
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-09 14:45 UTC by Phil Anderson
Modified: 2010-12-17 08:28 UTC (History)
2 users (show)

Fixed In Version: mediatomb-0.12.1-3.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-17 08:25:06 UTC


Attachments (Terms of Use)

Description Phil Anderson 2010-11-09 14:45:28 UTC
Description of problem:
Mediatomb crashes soon after starting on Fedora 14.

Version-Release number of selected component (if applicable):
mediatomb-0.12.1-2.fc14.x86_64

How reproducible:
100%


Steps to Reproduce:
1.  Start service and do anything (watch media, add directory, etc)
  
Actual results:
Service crashes.  If run in a console, the following stack trace is produced:
MediaTomb UPnP Server version 0.12.1 - http://mediatomb.cc/

===============================================================================
Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
MediaTomb is free software, covered by the GNU General Public License version 2

*** buffer overflow detected ***: mediatomb terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7fee9e6de987]
/lib64/libc.so.6(+0xfb8b0)[0x7fee9e6dc8b0]
/lib64/libc.so.6(+0xfacf9)[0x7fee9e6dbcf9]
/lib64/libc.so.6(_IO_default_xsputn+0xd8)[0x7fee9e655d48]
/lib64/libc.so.6(_IO_vfprintf+0xfbb)[0x7fee9e627dab]
/lib64/libc.so.6(__vsprintf_chk+0x9d)[0x7fee9e6dbd9d]
/lib64/libc.so.6(__sprintf_chk+0x7f)[0x7fee9e6dbcdf]
mediatomb(_Z12secondsToHMSi+0xa1)[0x4d1bc1]
mediatomb(_ZN15LibMP4V2Handler12fillMetadataEN3zmm3RefI7CdsItemEE+0x36c)[0x48ab5c]
mediatomb(_ZN15MetadataHandler11setMetadataEN3zmm3RefI7CdsItemEE+0x31c)[0x486ffc]
mediatomb(_ZN14ContentManager20createObjectFromFileEN3zmm6StringEbb+0x716)[0x4719a6]
mediatomb(_ZN14ContentManager12addRecursiveEN3zmm6StringEbNS0_3RefI11GenericTaskEE+0x2ef)[0x47953f]
mediatomb(_ZN14ContentManager12addRecursiveEN3zmm6StringEbNS0_3RefI11GenericTaskEE+0x78e)[0x4799de]
mediatomb(_ZN14ContentManager8_addFileEN3zmm6StringES1_bbNS0_3RefI11GenericTaskEE+0x27e)[0x47be1e]
mediatomb(_ZN13CMAddFileTask3runEv+0xce)[0x47c4de]
mediatomb(_ZN14ContentManager10threadProcEv+0x346)[0x472326]
mediatomb(_ZN14ContentManager16staticThreadProcEPv+0x9)[0x472669]
/lib64/libpthread.so.0(+0x6d5b)[0x7feea02eed5b]
/lib64/libc.so.6(clone+0x6d)[0x7fee9e6c527d]

Expected results:
It shouldn't crash

Comment 1 Phil Anderson 2010-11-09 14:48:34 UTC
Please note that a local rpmbuild --rebuild mediatomb-0.12.1-2.fc14.src.rpm and a subsequent reinstalling the package fixes the following problem for me.  A fresh database didn't fix it.

I'm not sure if anyone else is experiencing this, but if so, maybe you should push a rebuild?

Comment 2 Rich Mattes 2010-11-12 23:31:28 UTC
I have submitted and update for fedora 14, please try it and let me know if you are still experiencing problems.  You can wait a day or so and install the update from updates-testing, or you can download the .rpm from koji directly and try it.


koji build:
http://koji.fedoraproject.org/koji/buildinfo?buildID=204787

update:
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-3.fc14

Comment 3 Phil Anderson 2010-11-14 23:39:25 UTC
So far the build is running well.

Comment 4 Rich Mattes 2010-11-15 02:52:35 UTC
Great!  I'm going to close this bug as fixed then.  If you encounter any more problems, please file another bug.

Comment 5 Phil Anderson 2010-11-17 01:27:20 UTC
I was wrong.  It seems to be crashing just as much.

There must be some different compiler version/settings in the official Fedora 14 build environment to my local builds.

Comment 6 Phil Anderson 2010-11-17 02:09:12 UTC
In tools.cc, there is a buffer overrun in sprintf if we have media that is more than 999 hours long:
    // XXX:XX:XX
    char *str = (char *)malloc(10); 
    sprintf(str, "%02d:%02d:%02d", h, m, s);


I'm still working out why mediatomb thinks my 45 minute mp4 file is 1288 hours long, when it worked properly under Fedora 13.

Comment 7 Phil Anderson 2010-11-17 02:29:30 UTC
mp4info is showing a dodgy value for my file, so the problem is either the file, or libmp4v2.  Mediatomb should handle it a bit more gracefully than crashing out.

Comment 8 Rich Mattes 2010-11-22 07:12:06 UTC
Thanks for taking the time to track down this bug.  I'm building new packages with a patch that limits 'h' to 999.  If you can, please test the below packages and see if they work:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2615282

If they fix your problem, I'll submit the patch upstream and push updated packages.

Comment 9 Phil Anderson 2010-11-24 09:52:42 UTC
Thanks,  I did a couple of tests and it seems to fix the crash.

Comment 10 Fedora Update System 2010-12-07 14:10:02 UTC
mediatomb-0.12.1-3.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-3.fc13

Comment 11 Fedora Update System 2010-12-07 14:10:10 UTC
mediatomb-0.12.1-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-4.fc14

Comment 12 Fedora Update System 2010-12-07 20:15:20 UTC
mediatomb-0.12.1-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mediatomb'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mediatomb-0.12.1-3.fc13

Comment 13 Fedora Update System 2010-12-17 08:25:01 UTC
mediatomb-0.12.1-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-12-17 08:28:45 UTC
mediatomb-0.12.1-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.