Opened 13 years ago
Closed 8 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 |
Description
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)
Change History (19)
follow-up: 2 comment:1 by , 13 years ago
comment:2 by , 13 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 , 13 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 , 13 years ago
Sorry, I though I already attached such a syslog with KDL info. I'll attach one if I made a copy.
by , 13 years ago
Attachment: | syslog_r43005-2hn_media-addon-server_crash_screenshot_wont_run.txt added |
---|
syslog with limited KDL investigation
comment:5 by , 13 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 https://dev.haiku-os.org/ticket/5339#comment:13
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 , 13 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 , 13 years ago
Attachment: | r39011_Media_preflet-freeze.png added |
---|
screencap of Media pref hang/freeze
comment:7 by , 13 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 , 13 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 , 13 years ago
Component: | - General → Servers/media_addon_server |
---|---|
Owner: | changed from | to
Summary: | Screenshot does not launch until previous hanging app resolves → media_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.
by , 13 years ago
comment:10 by , 13 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 , 13 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.
by , 13 years ago
Attachment: | syslog_r43265_vision_crash_on nick-notification.txt added |
---|
comment:12 by , 13 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.
by , 13 years ago
Attachment: | syslog_hrev43314_media-addon_causes_mediaplayer_hang.txt added |
---|
comment:14 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The media_server is far more stable now, this issue isn't replicable anymore.
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?