Opened 11 years ago

Closed 6 years ago

#8083 closed bug (fixed)

media_addon_server causes other apps to freeze

Reported by: Disreali Owned by: axeld
Priority: normal Milestone: R1
Component: Servers/media_addon_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


My system has issues with sound and I am required to restart the Media Services often. I launch the Media pref and it hangs. I then press the PrtScrn key to launch the Screenshot app, but it does not launch until after the Media pref either stops hanging, which can take up to 2 minutes, or I kill the pref with ProcessController. When Screenshot window finally is visible and active, it no longer sees the issue that I wanted to capture.

Currently using hrev43005-2hn, but the issue has been around awhile. I was just reminded of it.

Attachments (5)

syslog_r43005-2hn_media-addon-server_crash_screenshot_wont_run.txt (972.9 KB ) - added by Disreali 11 years ago.
syslog with limited KDL investigation
r39011_Media_preflet-freeze.png (40.8 KB ) - added by Disreali 11 years ago.
screencap of Media pref hang/freeze
syslog_r43265-2a_media-addon-server_vision_freezes_when_sound_event_triggered.txt (198.9 KB ) - added by Disreali 11 years ago.
syslog_r43265_vision_crash_on nick-notification.txt (189.9 KB ) - added by Disreali 11 years ago.
syslog_hrev43314_media-addon_causes_mediaplayer_hang.txt (464.0 KB ) - added by Disreali 11 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 by Wim, 11 years ago

When the Media prefs hangs, can you launch other applications, or is this specific to Screenshot? Does the Media prefs always hang after you restart the Media services? Does the Media prefs hang on a system without the sound issues you mention, or is this problem specific to your situation?

in reply to:  1 comment:2 by Disreali, 11 years ago

As mentioned, my system has several audio issues including random crashes of media_addon_server during shutdown or any other time, needing to restart the Media Services several times in order to get sound at all, late buffers, and various other audio interrupt overruns. They all are tracked in other tickets, but could contributing factors in this issue with Screenshot.

Now to your questions.

Replying to Wim:

When the Media prefs hangs, can you launch other applications, or is this specific to Screenshot?

It seems specific to Screenshot. So far, Screenshot is the only app that fails to launch when the Media preflet hangs/freezes.

Does the Media prefs always hang after you restart the Media services?

No, it depends on the day, phase of the moon, whether a butterfly flaps its wings, etc.

Sorry. So far, it _seems_ to be completely random. Though, to be honest, I have got into the habit of restarting the MediaService at least twice after media related crashes. I would have to do more testing to give you a better answer. But then, the media_addon_server crashing also seems to be random too.

Does the Media prefs hang on a system without the sound issues you mention, or is this problem specific to your situation?

That I really can't answer. AFAIK, the issue of the Media preflet freezing seems to be something only I have noticed. it may be specific to my hardware.

This system is an Acer AM5620 Desktop. The listdev, listusb, and sysinfo for this system can be found on ticket:5904. I've uploaded the same files to many tickets, so I'm just giving the link to one that has all of them. If really you want, I will attach them to this ticket also.

Tickets that _may_ be useful are ticket:5339 and ticket:5863. They deal with media_addon_server crashing.

Thank your for any help you may provide.

comment:3 by axeld, 11 years ago

This may sound a bit too complicated, but what you could do to help the issue would be to attach stack traces of the threads involved. That could be done like this, for example:

  • drop into the kernel debugger (by pressing alt-sysreq-d).
  • find out the team IDs of the applications using the "teams" command. You are looking for media_server, media_addon_server, Media, and Screenshot. Note the numbers down.
  • find out the threads of those teams using the "threads <teamID>" command. Note those down as well (there will be quite a lot, though).
  • Then, use the "sc <threadID>" command on each of the threads, and post the resulting stack traces here. I don't remember if "sc" contains info about the thread, so posting the whole debug session would be most helpful.
  • exist the debugger using "cont".

Afterwards, you should find the debugging session in the /var/log/syslog file. You could try with a simple command once first, before you go through the whole thing, though :-)

comment:4 by Disreali, 11 years ago

Sorry, I though I already attached such a syslog with KDL info. I'll attach one if I made a copy.

by Disreali, 11 years ago

syslog with limited KDL investigation

comment:5 by marcusoverhagen, 11 years ago

Make sure serial debug output is disabled. I don't know why this kind of debug output ends in the syslog, but if it goes to the serial port, thats a sure way to kill performance.

KERN: Received buffer 22789772 usec late
KERN: sending notify

What are you doing that crashes media_addon_server? I don't see a crash in the syslog, but there is a debugger call because of memory corruption. See

15604	2011-11-01 19:48:07 KERN: debug_server: Thread 269 entered the debugger: Debugger call: `oops'
15605	2011-11-01 19:48:08 KERN: stack trace, current PC 0xffff0114  :
15606	2011-11-01 19:48:08 KERN:   (0x78174bac)  0x50a18a  SetHeader__7BBufferPC12media_header + 0x32
15607	2011-11-01 19:48:08 KERN:   (0x78174bdc)  0x50b1fe  HandleMessage__15BBufferConsumerlPCvUl + 0x1a

comment:6 by Disreali, 11 years ago

I did not know that I could be doing anything that causes media_addon_server to crash. Every so often, an error window pops up informing me that the media_addon_server has crashed and gives a choice of debugging or quitting the server. I normally select debug, which gives this gdb output, but since it is always the same, I did not bother to save it yesterday.

Regarding the syslog I attached to ticket:5339, I chose to run the gdb debug before I dropped to KDL. From your comment, it seems that may have been the wrong choice. Also, I attached the syslog to that ticket, because Screenshot was not listed by the 'teams' command, even though I tried to launch it.

I have set/uncommented "serial_debug_output false" in the kernel driver. Next time the server fails I will do the kdl stack-trace before doing the gdb debug.

by Disreali, 11 years ago

screencap of Media pref hang/freeze

comment:7 by Disreali, 11 years ago

I'm not sure if it helps, but I attached an older screen shot of the Media pref in the middle of a hang/freeze. I totally forgot I had this image. I was surprised that I had ever been able to get a screen capture of Media in this state. This shows that Sreenshot worked at least once on this system, though that was back in October 2010. I've not found any other screencaps that show the pref in the same state.

comment:8 by Wim, 11 years ago

In June 2010 I made changes to the Screenshot application to split it in a GUI and CLI part. After that no major changes were made. I am not sure if there is anything in the Screenshot application that can be fixed so it launches properly in your case, and if it is even worthwhile to try to pursue this.

Please correct me if I am wrong but it seems to me that to solve the issues you have with the media_addon_server the Screenshot application is not critical, and system logs and debug output are much more useful.

comment:9 by Disreali, 11 years ago

Component: - GeneralServers/media_addon_server
Owner: changed from nobody to axeld
Summary: Screenshot does not launch until previous hanging app resolvesmedia_addon_server causes other apps to freeze

Just found another app that freezes because of media_addon_server.

Vision froze when someone typed my nick and stayed that way for about 10-20 seconds. I finally thought to use ProcessController to kill media_addon_server. The instant I killed media-addon-server, Vision was responsive again. I then restarted the MediaServices via the Media pref.

I did not think to get KDL traces before I killed media-addon-server. I think the server does not properly initialize on bootup and it is not until a sound is played that it is noticed that the server is not working. ticket:7268 deals with that issue, and is most likely related to this. It seems that if media-addon-server is not working properly, any app that has a sound event will probably freeze when that event is triggered.

I'm attaching my syslog, even though it seems to me, to only have caught MediaServices being restarted after the addon was killed.

I will attempt to recreate and get kdl traces soon.

comment:10 by anevilyak, 11 years ago

For whoever decides to investigate this, Vision's simply using system_beep() there. If I recall the documentation correctly, that call isn't supposed to be synchronous though.

comment:11 by Disreali, 11 years ago

I Just got Vision to freeze on nick notification again. ProcessController showed that the media-addon-server:Audio-Mixer-Controller thread was spiking on CPU usage. Attaching syslog with KDL stacktraces of media-server, media-addon-server and Vision.

comment:12 by Disreali, 11 years ago

I completely forgot that MediaPlayer always hangs when first launched. MediaPlayer appears in the Deskbar, but there is no app window. I then need to kill MediaPlayer with ProcessController, kill media-addon-server, and then restart MediaServices via the Media pref at least once to get MP to work.

Attaching syslog kdl stacktrace of media-server, media_addon_server, and MediaPlayer.

comment:13 by Barrett, 6 years ago

A report about what is the current situation would be appreciated! :-)

comment:14 by Barrett, 6 years ago

Resolution: fixed
Status: newclosed

The media_server is far more stable now, this issue isn't replicable anymore.

Note: See TracTickets for help on using tickets.