Opened 8 years ago

Closed 4 years ago

#7180 closed bug (fixed)

Media Server crashing when shutting down/used with cortex/randomly with media files (float_to_float())

Reported by: stargatefan Owned by: pulkomandy
Priority: normal Milestone: R1
Component: Add-Ons/Media/Mixer Version: R1/Development
Keywords: Cc: black.belt.jimmy@…, degea@…
Blocked By: Blocking: #10344, #10492, #11339
Has a Patch: no Platform: All

Description (last modified by diver)

Was trying to use cortex to see if inputs and output worked. I was met with failure.

Thread 2492 caused an exception: Segment violation
[...]
[Switching to team /boot/system/servers/media_addon_server (2474) thread Audio Mixer control (2492)]
0x00956d89 in Resampler::float_to_float ()
   from /boot/system/add-ons/media/mixer.media_addon
(gdb) bt
#0  0x00956d89 in Resampler::float_to_float ()
   from /boot/system/add-ons/media/mixer.media_addon
#1  0x0095289f in MixerInput::BufferReceived ()
   from /boot/system/add-ons/media/mixer.media_addon
#2  0x00950222 in MixerCore::BufferReceived ()
   from /boot/system/add-ons/media/mixer.media_addon
#3  0x0094d58f in AudioMixer::HandleInputBuffer ()
   from /boot/system/add-ons/media/mixer.media_addon
#4  0x0094d5fa in AudioMixer::HandleEvent ()
   from /boot/system/add-ons/media/mixer.media_addon
#5  0x004c443b in BMediaEventLooper::DispatchEvent ()
   from /boot/system/lib/libmedia.so
#6  0x004c4ab7 in BMediaEventLooper::ControlLoop ()
   from /boot/system/lib/libmedia.so
#7  0x004c43a9 in BMediaEventLooper::_ControlThreadStart ()
   from /boot/system/lib/libmedia.so
#8  0x00657060 in thread_entry () from /boot/system/lib/libroot.so
#9  0x701c5fec in ?? ()
(gdb) 

Change History (15)

comment:1 Changed 8 years ago by stargatefan

Summary: Media Server crashing when used with CortexMedia Server crashing when shttuing down/used with cortex/randomly with media files

Still seeing random crashes with media server at shut down. It also has trouble with files that may or may not have missing frames. Problem seemed to drop up in the 402xx series IIRC. I could try to narrow it down but it could just be a flue to. I have seen it on the nightlies to0.

Easy to reproduce Install nightly iso with hda, shut machine down. gcc4 hybrid hrev40356

Thread 200 called debugger(): oops
[...]
[Switching to team /boot/system/servers/media_addon_server (145) thread Audio Mixer control (200)]
0xffff0114 in ?? ()
(gdb) bt
#0  0xffff0114 in ?? ()
#1  0x006541db in debugger () from /boot/system/lib/libroot.so
#2  0x004bb80e in BBuffer::SetHeader () from /boot/system/lib/libmedia.so
#3  0x004bc840 in BBufferConsumer::HandleMessage ()
   from /boot/system/lib/libmedia.so
#4  0x004cac58 in BMediaNode::WaitForMessage ()
   from /boot/system/lib/libmedia.so
#5  0x004c597e in BMediaEventLooper::ControlLoop ()
   from /boot/system/lib/libmedia.so
#6  0x004c53a9 in BMediaEventLooper::_ControlThreadStart ()
   from /boot/system/lib/libmedia.so
#7  0x00658070 in thread_entry () from /boot/system/lib/libroot.so
#8  0x701c5fec in ?? ()
(gdb)
Last edited 5 years ago by diver (previous) (diff)

comment:2 Changed 8 years ago by bbjimmy

Cc: black.belt.jimmy@… added

comment:3 Changed 5 years ago by diver

Component: Servers/media_serverServers/media_addon_server
Description: modified (diff)

comment:4 Changed 5 years ago by diver

Blocking: 10344 added

comment:5 Changed 5 years ago by diver

Component: Servers/media_addon_serverAdd-Ons/Media/Mixer
Description: modified (diff)
Owner: changed from axeld to pulkomandy
Status: newassigned
Version: R1/alpha2R1/Development

comment:6 Changed 5 years ago by pulkomandy

Blocking: 10344 removed

(In #10344) the crash is in the resampler code. Switching from "linear interpolation" to "drop/repeat sample" is a safer way to avoid this problem (even for apps not generating 48kHz output). the drop/repeat code is ok, only the interpolated one is buggy (seem to do an out of bounds access from time to time).

Also, reopening this as a separate issue, the backtrace in #7180 isn't the same.

comment:7 Changed 5 years ago by pulkomandy

Blocking: 10344 added

(In #10344) Oops, you're right, I was looking at the stacktrace in the first comment there.

comment:8 Changed 5 years ago by pulkomandy

Blocking: 10344 removed

And, @stargatefan: your problem is unrelated, if it still happens, please open a separate ticket.

comment:9 Changed 5 years ago by pulkomandy

Blocked By: 10344 added

comment:10 Changed 5 years ago by diver

Blocking: 10492 added

comment:11 Changed 5 years ago by diver

Blocked By: 10344 removed
Blocking: 10344 added

comment:12 Changed 5 years ago by diver

Blocking: 11339 added

comment:13 Changed 5 years ago by ttcoder

Cc: degea@… added
Summary: Media Server crashing when shttuing down/used with cortex/randomly with media filesMedia Server crashing when shutting down/used with cortex/randomly with media files (float_to_float())

Had that one occur reliably a few seconds after boot-up (not shutting down) after doing a sorta 'manual' upgrade to 47896 last week.. Once in int_to_float and the rest of the times in float_to_float(). Scared the heck out of me :-).. Now did a proper (pkgman) update to 47991 and audio works correctly. I always use drop/repeate samples BTW, never interpolation. Anyway I blame it on the cranky manual update, hope to never see this again :-)

comment:14 Changed 4 years ago by Barrett

After my patch at #6188 this should be checked as the two bugs seems two effects of the same cause.

comment:15 Changed 4 years ago by Barrett

Resolution: fixed
Status: assignedclosed

Fixed in hrev49503.

Note: See TracTickets for help on using tickets.