Problem with media servers


#1

Since a few nihghtlies ago, I’ve been experiencing a problem with the media server, in which as soon as I play some audio or video it crashes.
Here it’s the report:

Debug information for team /boot/system/servers/media_addon_server (390):
CPU(s): 2x Intel Pentium 4
Memory: 1014.25 MiB total, 231.07 MiB used
Haiku revision: hrev50162 Mar 21 2016 01:24:14 (BePC)

Active Threads:
thread 390: media_addon_server (main)
thread 394: BMediaRoster
thread 395: media_addon_server control
thread 396: System clock control
thread 430: multi_audio audio output
thread 447: Yeah baby, very shagadelic
thread 466: FireWire-0 control
thread 543: team 390 debug task
thread 422: Audio Mixer control
state: Call (BufferCache::GetBuffer: IDs mismatch)

	Frame		IP			Function Name
	-----------------------------------------------
	00000000	0x61e54112	commpage_syscall + 0x2 
		Disassembly:
			commpage_syscall:
			0x61e54110:             89e1  mov %esp, %ecx
			0x61e54112:             0f34  sysenter  <--

		Frame memory:
			
	0x7a2a2318	0x535a89	debugger + 0x39 
	0x7a2a23a0	0x1084557	BPrivate::BufferCache::GetBuffer(int32) + 0x143 
	0x7a2a2620	0x1055930	BBufferConsumer::HandleMessage(int32, void*, uint32) + 0x1a0 
	0x7a2a6660	0x1065cfa	BMediaNode::WaitForMessage(int64, uint32, void*) + 0x1e2 
	0x7a2a6730	0x106090e	BMediaEventLooper::ControlLoop() + 0x2a2 
	0x7a2a6770	0x1060d49	BMediaEventLooper::_ControlThreadStart(void*) + 0x35 
	0x7a2a6798	0x53cd21	thread_entry + 0x21 
	00000000	0x61e54250	commpage_thread_exit + 0 

	Registers:
		  eip:	0x61e54114
		  esp:	0x7a2a22dc
		  ebp:	0x7a2a2318
		  eax:	0x000000e1
		  ebx:	0x005e6db8
		  ecx:	0x7a2a22dc
		  edx:	0x61e54114
		  esi:	0x010a2fc0
		  edi:	0x19489b00
		   cs:	0x001b
		   ds:	0x0023
		   es:	0x0023
		   fs:	0x0063
		   gs:	0x0023
		   ss:	0x0023
		  st0:	0
		  st1:	0
		  st2:	0
		  st3:	0
		  st4:	0
		  st5:	0
		  st6:	4.41e+04
		  st7:	0.1
		  mm0:	{0, 0, 0, 0}
		  mm1:	{0, 0, 0, 0}
		  mm2:	{0, 0, 0, 0}
		  mm3:	{0, 0, 0, 0}
		  mm4:	{0, 0, 0, 0}
		  mm5:	{0, 0, 0, 0}
		  mm6:	{0xcccd, 0xcccc, 0xccc, 0xac44}
		  mm7:	{0, 0, 0xcd00, 0xcccc}
		 xmm0:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm1:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm2:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm3:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm4:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm5:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm6:	{0x14, 0xfecf, 0, 0, 0, 0, 0, 0}
		 xmm7:	{0, 0, 0, 0, 0, 0, 0, 0}
thread 428: Auich ICH control 
	state: Debugged

	Frame		IP			Function Name
	-----------------------------------------------
	00000000	0x61e54112	commpage_syscall + 0x2 
		Disassembly:
			commpage_syscall:
			0x61e54110:             89e1  mov %esp, %ecx
			0x61e54112:             0f34  sysenter  <--

		Frame memory:
			
	0x708961e8	0x53c0bc	read_port_etc + 0x34 
	0x7089a240	0x1065b6d	BMediaNode::WaitForMessage(int64, uint32, void*) + 0x55 
	0x7089a310	0x106090e	BMediaEventLooper::ControlLoop() + 0x2a2 
	0x7089a350	0x1060d49	BMediaEventLooper::_ControlThreadStart(void*) + 0x35 
	0x7089a378	0x53cd21	thread_entry + 0x21 
	00000000	0x61e54250	commpage_thread_exit + 0 

	Registers:
		  eip:	0x61e54114
		  esp:	0x708961ac
		  ebp:	0x708961e8
		  eax:	0x000000da
		  ebx:	0x005e6db8
		  ecx:	0x708961ac
		  edx:	0x61e54114
		  esi:	0x05acad8e
		  edi:	0x70896234
		   cs:	0x001b
		   ds:	0x0023
		   es:	0x0023
		   fs:	0x0063
		   gs:	0x0023
		   ss:	0x0023
		  st0:	0
		  st1:	0
		  st2:	0
		  st3:	0
		  st4:	0
		  st5:	0
		  st6:	1.04e+05
		  st7:	8.55e+04
		  mm0:	{0, 0, 0, 0}
		  mm1:	{0, 0, 0, 0}
		  mm2:	{0, 0, 0, 0}
		  mm3:	{0, 0, 0, 0}
		  mm4:	{0, 0, 0, 0}
		  mm5:	{0, 0, 0, 0}
		  mm6:	{0, 0, 0, 0xcb23}
		  mm7:	{0x9b6d, 0x9c7a, 0x8305, 0xa713}
		 xmm0:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm1:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm2:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm3:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm4:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm5:	{0, 0, 0, 0, 0, 0, 0, 0}
		 xmm6:	{0x14, 0xfecf, 0, 0, 0, 0, 0, 0}
		 xmm7:	{0, 0, 0, 0, 0, 0, 0, 0}

Loaded Images:
ID Text Base Text End Data Base Data End Type Name
--------------------------------------------------------------------------------
1414 0x002e6000 0x00317000 0x00317000 0x00325000 lib /boot/system/lib/libstdc++.r4.so
1421 0x00488000 0x00491000 0x00491000 0x00493000 lib /boot/system/lib/libicuio.so.56.1
1416 0x0050b000 0x005dd000 0x005dd000 0x00628000 lib /boot/system/lib/libroot.so
1426 0x0087f000 0x00898000 0x00898000 0x00899000 lib /boot/system/lib/libz.so.1.2.8
1425 0x0089f000 0x00a02000 0x00a02000 0x00a33000 lib /boot/system/lib/libicuuc.so.56.1
1589 0x00b36000 0x00b4b000 0x00b4b000 0x00b4f000 add-on /boot/system/add-ons/media/hmulti_audio.media_addon
1403 0x00b9c000 0x00e61000 0x00e61000 0x00ef7000 lib /boot/system/lib/libbe.so
1555 0x00f22000 0x00f3c000 0x00f3c000 0x00f40000 add-on /boot/system/add-ons/media/mixer.media_addon
1423 0x00fe5000 0x00ff0000 0x00ff0000 0x00ff3000 lib /boot/system/lib/libiculx.so.56.1
1404 0x01013000 0x010aa000 0x010aa000 0x010c9000 lib /boot/system/lib/libmedia.so
1401 0x010d4000 0x010f2000 0x010f2000 0x010f5000 lib /boot/system/runtime_loader
1424 0x013e4000 0x0141d000 0x0141d000 0x01454000 lib /boot/system/lib/libicutu.so.56.1
1413 0x01503000 0x0151d000 0x0151d000 0x01524000 lib /boot/system/lib/libgame.so
1675 0x01695000 0x0169f000 0x0169f000 0x016a1000 add-on /boot/system/add-ons/media/firewire_dv.media_addon
1422 0x016e6000 0x0173a000 0x0173a000 0x01744000 lib /boot/system/lib/libicule.so.56.1
1402 0x0178c000 0x017a0000 0x017a0000 0x017a3000 app /boot/system/servers/media_addon_server
1419 0x01987000 0x01c12000 0x01c12000 0x01c7a000 lib /boot/system/lib/libicui18n.so.56.1
1417 0x01ce3000 0x034c9000 0x034c9000 0x034ca000 lib /boot/system/lib/libicudata.so.56.1
1400 0x61e54000 0x61e5c000 0x00000000 0x00000000 system commpage

Areas:
ID Base End Size (KiB) Protection Locking Name
--------------------------------------------------------------------------------
4449 0x00101000 0x00109000 32 rw-S full shared buffer list clone
4444 0x00109000 0x0010a000 4 rw-S full __timesource_buf_3
4455 0x0010a000 0x0010b000 4 rw-S full __cloned_timesource_buf_3
7326 0x0010b000 0x00114000 36 rw-S full a cloned BBuffer
4033 0x00115000 0x00116000 4 rw-S full timesource_buf_1
4002 0x00121000 0x00131000 64 rw- full rld heap
4452 0x00131000 0x0013d000 48 rw-S full a cloned BBuffer
4453 0x0013d000 0x00149000 48 rw-S full a cloned BBuffer
4769 0x00149000 0x00155000 48 rw-S full a cloned BBuffer
4454 0x00160000 0x0016c000 48 rw-S full a cloned BBuffer
4770 0x0016c000 0x00178000 48 rw-S full a cloned BBuffer
4771 0x00178000 0x00184000 48 rw-S full a cloned BBuffer
3982 0x001b2000 0x001ba000 32 rw- full rld heap
3939 0x002e6000 0x00317000 196 r-x full libstdc++.r4.so_seg0ro
3940 0x00317000 0x00322000 44 rw- full libstdc++.r4.so_seg1rw
3941 0x00322000 0x00325000 12 rw- full libstdc++.r4.so_seg2rw
3956 0x00488000 0x00491000 36 r-x full libicuio.so.56.1_seg0ro
3957 0x00491000 0x00493000 8 rw- full libicuio.so.56.1_seg1rw
3912 0x004c7000 0x004c8000 4 rw-S full rld_debug
3944 0x0050b000 0x005dd000 840 r-x full libroot.so_seg0ro
3945 0x005dd000 0x005f0000 76 rw- full libroot.so_seg1rw
3946 0x005f0000 0x00628000 224 rw- full libroot.so_seg2rw
3911 0x0068c000 0x0069c000 64 rw- full rld heap
3968 0x0087f000 0x00898000 100 r-x full libz.so.1.2.8_seg0ro
3969 0x00898000 0x00899000 4 rw- full libz.so.1.2.8_seg1rw
3965 0x0089f000 0x00a02000 1420 r-x full libicuuc.so.56.1_seg0ro
3966 0x00a02000 0x00a32000 192 rw- full libicuuc.so.56.1_seg1rw
3967 0x00a32000 0x00a33000 4 rw- full libicuuc.so.56.1_seg2rw
4420 0x00b36000 0x00b4b000 84 r-x full hmulti_audio.media_addon_seg0ro
4421 0x00b4b000 0x00b4f000 16 rw- full hmulti_audio.media_addon_seg1rw
3915 0x00b9c000 0x00e61000 2836 r-x full libbe.so_seg0ro
3916 0x00e61000 0x00ef5000 592 rw- full libbe.so_seg1rw
3917 0x00ef5000 0x00ef7000 8 rw- full libbe.so_seg2rw
4331 0x00f22000 0x00f3c000 104 r-x full mixer.media_addon_seg0ro
4332 0x00f3c000 0x00f40000 16 rw- full mixer.media_addon_seg1rw
3960 0x00fe5000 0x00ff0000 44 r-x full libiculx.so.56.1_seg0ro
3961 0x00ff0000 0x00ff3000 12 rw- full libiculx.so.56.1_seg1rw
3918 0x01013000 0x010aa000 604 r-x full libmedia.so_seg0ro
3919 0x010aa000 0x010c8000 120 rw- full libmedia.so_seg1rw
3920 0x010c8000 0x010c9000 4 rw- full libmedia.so_seg2rw
3908 0x010d4000 0x010f2000 120 r-x full runtime_loader_seg0ro
3909 0x010f2000 0x010f4000 8 rw- full runtime_loader_seg1rw
3910 0x010f4000 0x010f5000 4 rw- full runtime_loader_bss1
3962 0x013e4000 0x0141d000 228 r-x full libicutu.so.56.1_seg0ro
3963 0x0141d000 0x01422000 20 rw- full libicutu.so.56.1_seg1rw
3964 0x01422000 0x01454000 200 rw- full libicutu.so.56.1_seg2rw
3922 0x01503000 0x0151d000 104 r-x full libgame.so_seg0ro
3938 0x0151d000 0x01524000 28 rw- full libgame.so_seg1rw
4804 0x01695000 0x0169f000 40 r-x full firewire_dv.media_addon_seg0ro
4805 0x0169f000 0x016a1000 8 rw- full firewire_dv.media_addon_seg1rw
3958 0x016e6000 0x0173a000 336 r-x full libicule.so.56.1_seg0ro
3959 0x0173a000 0x01744000 40 rw- full libicule.so.56.1_seg1rw
3913 0x0178c000 0x017a0000 80 r-x full media_addon_server_seg0ro
3914 0x017a0000 0x017a3000 12 rw- full media_addon_server_seg1rw
3951 0x01987000 0x01c12000 2604 r-x full libicui18n.so.56.1_seg0ro
3952 0x01c12000 0x01c79000 412 rw- full libicui18n.so.56.1_seg1rw
3954 0x01c79000 0x01c7a000 4 rw- full libicui18n.so.56.1_seg2rw
3947 0x01ce3000 0x034c9000 24472 r-x full libicudata.so.56.1_seg0ro
3948 0x034c9000 0x034ca000 4 rw- full libicudata.so.56.1_seg1rw
4003 0x193f4000 0x194f4000 1024 rw- full heap
3907 0x61e54000 0x61e5c000 32 r-xSk full commpage
3904 0x61f59000 0x61f5d000 16 rw- full user area
4024 0x61fd9000 0x61fda000 4 rw-S full server_memory
4443 0x70857000 0x7089c000 276 rw-s full Auich ICH control_428_stack
4032 0x70a2e000 0x70a73000 276 rw-s full System clock control_396_stack
4807 0x70bed000 0x70c32000 276 rw-s full FireWire-0 control_466_stack
4693 0x7108b000 0x710d0000 276 rw-s full Yeah baby, very shagadelic_447

3906 0x711b2000 0x721b3000 16388 rw-s full media_addon_server_390_stack
4026 0x721b3000 0x721d3000 128 rw-S full server_memory
4448 0x7a1f6000 0x7a23b000 276 rw-s full multi_audio audio output_430_st
4334 0x7a263000 0x7a2a8000 276 rw-s full Audio Mixer control_422_stack
4030 0x7a4ab000 0x7a4f0000 276 rw-s full media_addon_server control_395

4028 0x7a560000 0x7a5a5000 276 rw-s full _BMediaRoster__394_stack

Protection Flags: r - read, w - write, x - execute, s - stack, o - overcommit, c - cloneable, S - shared, k - kernel

Semaphores:
ID Count Last Holder Name
------------------------------------------------------------
2030 0 0 some BBlockCache lock
2031 0 0 Catalog
2032 0 0 some BLocker
2033 0 0 some BLocker
2034 0 0 token space
2035 0 0 BLooperList lock
2036 0 0 AppServerLink_sLock
2037 0 0 LocaleRosterData
2038 0 0 some BLocker
2054 0 0 Catalog
2055 0 0 media plugin manager
2056 0 0 shared buffer list
2057 0 422 port pool
2058 0 0 add-on manager
2059 0 0 media theme lock
2060 0 0 BMediaRoster::Roster locker
2061 0 0 some BLocker
2062 0 0 GameSound device lock
2063 0 0 BMessageQueue Lock
2064 0 0 AppLooperPort
2076 0 0 screen list
2077 0 0 clipboard
2078 0 0 width buffer
2079 0 0 BMessageQueue Lock
2080 0 0 BMediaRoster
2084 0 0 dormant node manager locker
2085 0 428 time source object manager
2089 0 0 BTimeSource slavenodes
2276 0 0 Catalog
2277 0 0 BControllable lock
2278 0 0 BTimedEventQueue locker
2279 0 0 BTimedEventQueue locker
2280 0 0 mixer core lock
2281 0 0 mixer settings lock
2300 0 0 Catalog
2302 0 0 BTimeSource slavenodes
2303 0 0 BTimedEventQueue locker
2304 0 0 BTimedEventQueue locker
2305 0 0 BControllable lock
2306 0 0 multi audio buffers
2313 0 430 multi_audio out buffer free
2317 2 447 buffer reclaim sem
2482 -1 0 mix thread wait
2638 0 0 BControllable lock
2639 0 0 BTimedEventQueue locker
2640 0 0 BTimedEventQueue locker
2641 0 0 some BLocker

Sorry, for my English


#2

Can you please file a bug report on haiku-os.org? This is the official way to report a bug, Thanks!


#3

I added this debugger call some time ago, in the hope that it would help me to identify some underlying problems, it’s the first time I know a machine experience this specific problem. It would be useful to keep track of how it evolves on your machine. Unfortunately I can’t replicate all issues with my hardware, but as AndrewZ suggested please fill a bug report and thanks for reporting.


#4

Okay, i created the report at the bug tracker
Also, I found out it’s cause by a hardware conflict with my Firewire PCI card


#5

The bug not fixed? I have similar issue:

Debug information for team /boot/system/servers/media_addon_server (517):

CPU(s): 2x AMD Athlon II
Memory: 7.50 GiB total, 417.52 MiB used
Haiku revision: hrev51792 Feb 8 2018 06:41:01 (BePC)

Active Threads:
thread 517: media_addon_server (main)
thread 524: BMediaRoster
thread 525: media_addon_server control
thread 526: System clock control
thread 556: multi_audio audio output
thread 569: Audio Mixer control
thread 585: FireWire-0 control
thread 586: Yeah baby, very shagadelic
thread 587: team 517 debug task
thread 554: HD Audio control
state: Call (BufferCache::GetBuffer: IDs mismatch)

A while ago I replaced MB (to MSI 880GMA-E55), and new have FireWire. After system starts, media addon crashes, but when media services restarted again all seem working ok (with playing audio).

Is it my problem related to:
https://dev.haiku-os.org/ticket/12448
?


#6

And occurs that MediaPlayer crashing media addons only when I played before something from another partition (I tryed ext4 partition and fat32 on stick). Even without rebooting some times. Strange things…

…And if file was played from another partition by MediaPlayer and closed, and then MediaPlayer started again (even after Haiku restart) occurs:


#7

That last error message is because MediaHlayer always tries to resume playback from where it was when you quitted it. This does not work when the disk is not mounted anymore, but we should probably silence that error in this case.


#8

Yes, as you can read below in the ticket you have to blacklist the firewire driver.


#9

I disabled firewire in BIOS.


#10

Even better. Since I found the cause of this bug I considered removing this driver from build. It’d better to move it to an optional package, but I’m not sure how many people really use it. On the other hand I can’t debug it since I don’t have such a platform…

So expect it to be removed from build in one of the next hrevs.


#11

Can I provide you with some info needed for debugging? Can I debug driver with your guidance?
Can it be done? Is it very complicated?
…But I realised that seem I do not have any FireWire equipment to plug in…


#12

Could we fix it? Shouldn’t the driver leave the media server alone when there are no devices plugged on the firewire port anyways?


#13

I’m very clear about my position on the project, so I’m not going to do this.

I wonder if there’s a single device that work on this driver. In any case doesn’t seem like a good idea to include it in the beta.