[
http://dev.sourcefabric.org/browse/LS-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26349#action_26349
]
Samuel Mimram commented on LS-626:
----------------------------------
Hi,
Short summary: I could not reproduce but I found a way of explaining (and
fixing) your crash. Could you please try to update to the latest hg and see if
it fixes your problem?
Here is my analysis of the crash: the stacktrace indicates that there is an
error in free in ocaml_faad_mp4_decode which has the following shape:
value ocaml_faad_mp4_decode(value m, value track, value sample, value dh)
{
...
unsned char *inbuf;
unsigned int inbuflen;
ret = mp4ff_read_sample(mp->ff, t, s, &inbuf, &inbuflen);
data = NeAACDecDecode(dec, &frameInfo, inbuf, inbuflen);
free(inbuf);
...
}
So a natural candidate for a free error would be a case where inbuf is never
initialized and then freed. And if we look at the code for mp4ff_read_sample
which is supposed to initialize inubuf we see:
int32_t mp4ff_read_sample(mp4ff_t *f, const int32_t track, const int32_t
sample, uint8_t **audio_buffer, uint32_t *bytes)
{
*bytes = mp4ff_audio_frame_size(f, track, sample);
if (*bytes==0) return 0;
*audio_buffer = (uint8_t*)malloc(*bytes);
...
}
Bingo! When the frame size is 0, audio_buffer is never initialized. So,
initializing inbuf to NULL in ocaml_faad_mp4_decode should fix the problem
(which is what my patch does), I checked that NeAACDecDecode behaves in a
sensible way in this case. However, I am a bit surprised that it cannot be
reproduced here...
HTH
> Segfault in libc
> ----------------
>
> Key: LS-626
> URL: http://dev.sourcefabric.org/browse/LS-626
> Project: Liquidsoap
> Issue Type: Bug
> Components: Liquidsoap
> Affects Versions: 1.0
> Environment: Ubuntu 12.04 LTS
> Linux microserver 3.2.0-23-lowlatency #31-Ubuntu SMP PREEMPT Wed Apr 11
> 02:24:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> HP Microserver - AMD Turion II Neo N40L - 64bit
> Reporter: Francesco P. Sileno
> Priority: Critical
> Attachments: crash-bis.tar.gz, crash.tar.gz, deliradio.liq,
> deliradio.log, kern.log, test.liq
>
>
> With random times, liquidsoap crashes and kernel report following message:
> Aug 4 13:41:07 microserver kernel: [321135.085369] liquidsoap[18490]:
> segfault at 11 ip 00007f033db9402c sp 00007f0327d10588 error 4 in
> libc-2.15.so[7f033db11000+1b3000]
> Nothing strange seems to be reported in the logs.
> The user with which liquidsoap is running on, has been given maximum realtime
> priority trough limits.conf.
> The anomaly could be in the music archive, really messed up and sometime with
> corrupted file name, so messed up that current version of Airtime can not
> correctly handle it (see
> http://forum.sourcefabric.org/discussion/14321/force-reindex-of-media-files).
> I'm attaching both configuration and log file. And kernel log, with all the
> crashes reported.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl