XBMC randomly consumes system load (crash/hang)
#1
Hi. I built a home entertainment box recently with Ubuntu 10.04. I installed XBMC and got it working with my Cyberlink remote control and really love how sleek and easy it is.

However, it occasionally seems to crash/hang on me. I am not certain what is happening exactly. It randomly happens just after I push a remote control button. The image on screen freezes and the hard-drive light on the box goes crazy. I have tried SSHing into the box and on the odd occasion I am able to do so the system resources are under so much load that SSH is virtually useless. This problem probably occurs about 1 in 10-20 times I use the XBMC and the only way get out of it is to do a hard reset. This has been happening for a number of months and happened on this box when I originally tested it under Ubuntu 9.10. However, the problem still persists under a fresh install of Ubuntu 10.04.

I don't know how to best report the details of this problem to the forum. Is there a log file which gets created each time I use XBMC? (I could not find a xbmc_crashlog-datetime.log file I would guess because xbmc has not fully crashed in this case). I have tried enabling debug mode but this shows annoying CPU and memory stats on the screen and since the problem isn't easily reproducible I don't like running these stats on screen all the time. (Is it possible to run debugging mode without the on-screen stats?) What is the best way to log and report the problem to the forum?

Thanks,
Ken


System Info:
Ubuntu 10.04 (2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux)
AMD Phenom Quad Core 9550
4Gb of RAM
Reply
#2
XBMC crashed/hung on my again last night. Here are the last few lines of xbmc.log:

Code:
23:15:24 T:140455211948096 M:2554417152  NOTICE: DVDPlayer: Opening: /mnt/media/tv/DELETED.avi
23:15:24 T:140455211948096 M:2554417152 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:15:24 T:140454739875600 M:2554417152  NOTICE: Creating InputStream
23:15:24 T:140454739875600 M:2554417152  NOTICE: Creating Demuxer
23:15:24 T:140454739875600 M:2554281984  NOTICE: Opening video stream: 0 source: 256
23:15:24 T:140454739875600 M:2554281984  NOTICE: Creating video codec with codec id: 13
23:15:24 T:140454739875600 M:2554253312  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
23:15:24 T:140454739875600 M:2551107584  NOTICE: Creating video thread
23:15:24 T:140454739875600 M:2550939648  NOTICE: Opening audio stream: 1 source: 256
23:15:24 T:140454739875600 M:2550939648  NOTICE: Finding audio codec for: 86017
23:15:24 T:140454613919504 M:2550939648  NOTICE: running thread: video_thread
23:15:24 T:140454739875600 M:2550939648  NOTICE: Creating audio thread
23:15:24 T:140454605526800 M:2550939648  NOTICE: running thread: CDVDPlayerAudio::Process()
23:15:24 T:140454605526800 M:2540978176  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
23:15:24 T:140455211948096 M:2541400064   ERROR: XLCDproc::SetBackLight - Unable to write to socket
23:15:24 T:140454613919504 M:2541285376  NOTICE:  fps: 23.976025, pwidth: 640, pheight: 368, dwidth: 640, dheight: 368
23:15:24 T:140454613919504 M:2541285376  NOTICE: Display resolution DESKTOP : 1920x1080 @ 50.00 - Full Screen (12)
23:15:24 T:140455211948096 M:2540630016  NOTICE: Using GL_TEXTURE_2D
23:15:24 T:140455211948096 M:2540142592  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
23:15:25 T:140455211948096 M:2540412928  NOTICE: GL: NPOT texture support detected
23:15:33 T:140455211948096 M:2549411840  NOTICE: CDVDPlayer::CloseFile()
23:15:33 T:140455211948096 M:2549411840  NOTICE: DVDPlayer: waiting for threads to exit
23:15:33 T:140454739875600 M:2549411840  NOTICE: CDVDPlayer::OnExit()
23:15:33 T:140454739875600 M:2549411840  NOTICE: DVDPlayer: closing audio stream
23:15:33 T:140454739875600 M:2549411840  NOTICE: Closing audio stream
23:15:33 T:140454739875600 M:2549411840  NOTICE: Waiting for audio thread to exit
23:15:33 T:140454605526800 M:2549411840   ERROR: AddPackets - failed to add leftover bytes to render
23:15:33 T:140454605526800 M:2549411840  NOTICE: thread end: CDVDPlayerAudio::OnExit()
23:15:33 T:140454739875600 M:2549411840  NOTICE: Closing audio device
23:15:33 T:140454739875600 M:2548764672  NOTICE: Deleting audio codec
23:15:33 T:140454739875600 M:2548764672  NOTICE: DVDPlayer: closing video stream
23:15:33 T:140454739875600 M:2548764672  NOTICE: Closing video stream
23:15:33 T:140454739875600 M:2548764672  NOTICE: waiting for video thread to exit
23:15:33 T:140454613919504 M:2548764672  NOTICE: thread end: video_thread
23:15:33 T:140454739875600 M:2548764672  NOTICE: deleting video codec
23:15:33 T:140454739875600 M:2549026816  NOTICE: CDVDPlayer::OnExit() deleting demuxer
23:15:33 T:140454739875600 M:2549026816  NOTICE: CDVDPlayer::OnExit() deleting input stream
23:15:33 T:140455211948096 M:2549026816  NOTICE: DVDPlayer: finished waiting
23:15:33 T:140455211948096 M:2549026816  NOTICE: CDVDPlayer::CloseFile()
23:15:33 T:140455211948096 M:2549026816 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:15:33 T:140455211948096 M:2549026816  NOTICE: DVDPlayer: waiting for threads to exit
23:15:33 T:140455211948096 M:2549026816  NOTICE: DVDPlayer: finished waiting
23:15:33 T:140455211948096 M:2550874112   ERROR: XLCDproc::SetBackLight - Unable to write to socket
23:15:34 T:140455211948096 M:2551726080   ERROR: XLCDproc::SetBackLight - Unable to write to socket

I rebooted and tried watching and stopping the video and below are the last few lines from the xbmc.log file which did not hang:

Code:
23:20:48 T:139952231520320 M:2554290176  NOTICE: DVDPlayer: Opening: /mnt/media/tv/DELETED.avi
23:20:48 T:139952231520320 M:2554290176 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:20:48 T:139951720978192 M:2554290176  NOTICE: Creating InputStream
23:20:48 T:139951720978192 M:2554290176  NOTICE: Creating Demuxer
23:20:48 T:139951720978192 M:2554290176  NOTICE: Opening video stream: 0 source: 256
23:20:48 T:139951720978192 M:2554290176  NOTICE: Creating video codec with codec id: 13
23:20:48 T:139951720978192 M:2554290176  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
23:20:48 T:139951720978192 M:2552049664  NOTICE: Creating video thread
23:20:48 T:139951720978192 M:2552049664  NOTICE: Opening audio stream: 1 source: 256
23:20:48 T:139951695800080 M:2552049664  NOTICE: running thread: video_thread
23:20:48 T:139951720978192 M:2552049664  NOTICE: Finding audio codec for: 86017
23:20:48 T:139951720978192 M:2552049664  NOTICE: Creating audio thread
23:20:48 T:139951687407376 M:2552049664  NOTICE: running thread: CDVDPlayerAudio::Process()
23:20:48 T:139951687407376 M:2552049664  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
23:20:49 T:139951695800080 M:2552107008  NOTICE:  fps: 23.976025, pwidth: 640, pheight: 368, dwidth: 640, dheight: 368
23:20:49 T:139951695800080 M:2552107008  NOTICE: Display resolution DESKTOP : 1920x1080 @ 50.00 - Full Screen (12)
23:20:49 T:139952231520320 M:2552729600  NOTICE: Using GL_TEXTURE_2D
23:20:49 T:139952231520320 M:2552729600  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
23:20:49 T:139952231520320 M:2552729600  NOTICE: GL: NPOT texture support detected
23:20:49 T:139952231520320 M:2552729600   ERROR: XLCDproc::SetBackLight - Unable to write to socket
23:20:51 T:139952231520320 M:2550685696  NOTICE: CDVDPlayer::CloseFile()
23:20:51 T:139952231520320 M:2550685696  NOTICE: DVDPlayer: waiting for threads to exit
23:20:51 T:139951720978192 M:2550685696  NOTICE: CDVDPlayer::OnExit()
23:20:51 T:139951720978192 M:2550685696  NOTICE: DVDPlayer: closing audio stream
23:20:51 T:139951720978192 M:2550685696  NOTICE: Closing audio stream
23:20:51 T:139951720978192 M:2550685696  NOTICE: Waiting for audio thread to exit
23:20:51 T:139951687407376 M:2550685696   ERROR: AddPackets - failed to add leftover bytes to render
23:20:51 T:139951687407376 M:2550685696  NOTICE: thread end: CDVDPlayerAudio::OnExit()
23:20:51 T:139951720978192 M:2550685696  NOTICE: Closing audio device
23:20:51 T:139951720978192 M:2550038528  NOTICE: Deleting audio codec
23:20:51 T:139951720978192 M:2550038528  NOTICE: DVDPlayer: closing video stream
23:20:51 T:139951720978192 M:2550038528  NOTICE: Closing video stream
23:20:51 T:139951720978192 M:2550038528  NOTICE: waiting for video thread to exit
23:20:51 T:139951695800080 M:2550149120  NOTICE: thread end: video_thread
23:20:51 T:139951720978192 M:2550149120  NOTICE: deleting video codec
23:20:51 T:139951720978192 M:2550411264  NOTICE: CDVDPlayer::OnExit() deleting demuxer
23:20:51 T:139951720978192 M:2550411264  NOTICE: CDVDPlayer::OnExit() deleting input stream
23:20:51 T:139952231520320 M:2550411264  NOTICE: DVDPlayer: finished waiting
23:20:51 T:139952231520320 M:2550411264  NOTICE: CDVDPlayer::CloseFile()
23:20:51 T:139952231520320 M:2550411264 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:20:51 T:139952231520320 M:2550411264  NOTICE: DVDPlayer: waiting for threads to exit
23:20:51 T:139952231520320 M:2550411264  NOTICE: DVDPlayer: finished waiting
23:20:51 T:139952231520320 M:2551934976   ERROR: XLCDproc::SetBackLight - Unable to write to socket
23:20:51 T:139952231520320 M:2553110528   ERROR: XLCDproc::SetBackLight - Unable to write to socket
23:20:55 T:139952231520320 M:2553036800  NOTICE: Storing total System Uptime
23:20:55 T:139952231520320 M:2553036800  NOTICE: Saving settings
23:20:55 T:139952231520320 M:2553036800  NOTICE: stop all
23:20:55 T:139952231520320 M:2553036800  NOTICE: ES: Stopping event server
23:20:55 T:139952231520320 M:2553036800  NOTICE: stopping zeroconf publishing
23:20:56 T:139951887378192 M:2553176064  NOTICE: ES: UDP Event server stopped
23:20:56 T:139951927289616 M:2553176064  NOTICE: DS: DBUS server stopped
23:20:56 T:139952231520320 M:2553176064  NOTICE: stop dvd detect media
23:20:56 T:139952231520320 M:2553176064  NOTICE: stop sap announcement listener
23:20:56 T:139952231520320 M:2553176064  NOTICE: clean cached files!
23:20:56 T:139952231520320 M:2553176064  NOTICE: unload skin
23:20:56 T:139952231520320 M:2556604416  NOTICE: stop python
23:20:56 T:139952231520320 M:2556604416  NOTICE: stopped
23:20:56 T:139952231520320 M:2556604416  NOTICE: destroy
23:20:56 T:139952231520320 M:2556604416  NOTICE: unload sections

Can anyone see from these logs why XBMC crashed/hung on me from the results of the first log file?

Thanks!
Reply
#3
Related thread: http://forum.xbmc.org/showthread.php?p=553778

However, that thread seems to discuss a problem with ATI. I am using Nvidia.
Reply
#4
I have had a very similar issue, but I have been unable to find any specific error in a log file that indicates the source of the problem. The symptoms are as follows:

CPU load spikes very high.
XBMC seems to crash, but no crashlog, no core dumps.
Entire system becomes totally unresponsive. SSH hangs, all SMB shares hang.
Reset button required to restart.

Things I have looked for:
Crashes/errors in XBMC.
XOrg problems (have tried with 190 and 256 nVidia drivers).
Kernel problems/crashes.

Nothing is conclusive, the entire system simply hangs before the crash and there are no errors of note.

There is a workaround in my case: If I leave the XBMC GUI on a menu item that has no rotating background images/fanart, the system remains stable. I have seen this hang happen simply sitting on a fanart enabled page and if I leave XBMC sitting in in a movie or TV episode view. It has also occurred during playback of music. Watching a movie or TV show, I have never seen the problem happen. For me... this indicates an XBMC problem, but I can't see anything in logs that screams out.

Since someone else is having the problem, I will attach a pastebin later today with full debugging. Hopefully that will assist.

Thanks,
F
Reply
#5
Here are more details on this issue...

Issue is reproducable by simply setting a home background to multi-image and waiting. A home background with single image is fine. I suspected maybe I might have a corrupt JPG, so I ran a JPG check tool last week and cleaned all the bad files it says it found. I also applied this to the XBMC cached images.

Setup of this test: For all crashes, before setting XBMC to crash, I stopped all extra services except xbmc-live (including lirc, LCDp, apache, etc). All tests were done with Confluence skin in case there might be an issue with other skins, and just to be more consistent with the distribution package.

Here is a TOP monitor output, with threads displayed JUST before it goes frozen. This was a pretty lucky grab:
http://pastebin.ca/1899444

Three debug logs three separate crashes from XBMC:
http://pastebin.ca/1899445
http://pastebin.ca/1899446
http://pastebin.ca/1899448

Again, nothing of significance in any other Linux system logs. If there is something you think I might need to look for, or try, just let me know. Now that I can see the threads, I am pretty sure XBMC is actually causing the hang.

I'm off to browse through tickets to see if someone else caught this so I can amend my issues.

Thanks,
Fred
Reply
#6
Given you can crash it at will by the looks, I suggest you look to get things further tracked down by successively halving the size of the folder you're showing to track down to one or more particular files that are screwing things up.

Once found, we can see whether others can reproduce it.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
webmosher Wrote:The symptoms are as follows:
CPU load spikes very high.
XBMC seems to crash, but no crashlog, no core dumps.
Entire system becomes totally unresponsive. SSH hangs, all SMB shares hang.
Reset button required to restart.

Thanks webmosher. This seems to be the same problem I am experiencing.

jmarshall Wrote:Given you can crash it at will by the looks, I suggest you look to get things further tracked down by successively halving the size of the folder you're showing to track down to one or more particular files that are screwing things up.

Do you think it is a particular media file which is causing XBMC to hang the system? Do you think it is a audio/video file or a fanart file?
Reply
#8
Im trying to figure out a crashing issue also. Just finally updated to july 10 svn and just going through my list of movies seems to cause it to crash and go back to ubuntu desktop.


22:47:31 T:2863176560 M:2984726528 INFO: ffmpeg[AAA89B70]: Duration: 01:35:16.87, start: 0.000000, bitrate: 6568 kb/s
22:47:31 T:2863176560 M:2984726528 INFO: ffmpeg[AAA89B70]: Stream #0.0(eng): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc
22:47:31 T:2863176560 M:2984726528 INFO: ffmpeg[AAA89B70]: Stream #0.1: Audio: dca, 48000 Hz, 6 channels, s16
22:47:31 T:2854783856 M:2985488384 DEBUG: Thread 2854783856 terminating
22:47:31 T:2854783856 M:2985488384 DEBUG: thread start, auto delete: 0
22:47:31 T:2863176560 M:2985488384 DEBUG: Open - probing detected format [matroska]


seems to be getting killed while looking up media info

hmmm
Reply
#9
I had another system hang. The hard drive light flashes in an almost permanently on status and the machine is under such a high load that trying to get any sort of debugging info is almost impossible.

Is there any way to limit XBMC to have a limited amount of system resources so that I can kill it and obtain a crash report? Is it possible to always run it under a different "nice" value and if so how would I do this? Is there another way of limiting its available resources? Could it be set up to crash after a certain level of resources are consumed as opposed to consuming resources infinitely? How might one implement some sort of limits?

Thanks.


The end of the xbmc.old.log is:
Code:
22:10:01 T:140209409935424 M:2493030400  NOTICE: DVDPlayer: Opening: /home/media/somefile.avi
22:10:01 T:140209409935424 M:2493030400 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:10:01 T:140208913762064 M:2493030400  NOTICE: Creating InputStream
22:10:01 T:140208913762064 M:2493030400  NOTICE: Creating Demuxer
22:10:02 T:140208913762064 M:2487468032  NOTICE: Opening video stream: 0 source: 256
22:10:02 T:140208913762064 M:2487468032  NOTICE: Creating video codec with codec id: 13
22:10:02 T:140208913762064 M:2487468032  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
22:10:02 T:140208913762064 M:2487316480  NOTICE: Creating video thread
22:10:02 T:140208913762064 M:2487316480  NOTICE: Opening audio stream: 1 source: 256
22:10:02 T:140208896976656 M:2487316480  NOTICE: running thread: video_thread
22:10:02 T:140208913762064 M:2487316480  NOTICE: Finding audio codec for: 86017
22:10:02 T:140208913762064 M:2487316480  NOTICE: Creating audio thread
22:10:02 T:140208888583952 M:2487316480  NOTICE: running thread: CDVDPlayerAudio::Process()
22:10:02 T:140208896976656 M:2487164928  NOTICE:  fps: 25.000000, pwidth: 640, pheight: 336, dwidth: 640, dheight: 336
22:10:02 T:140208896976656 M:2487164928  NOTICE: Display resolution DESKTOP : 1920x1080 @ 50.00 - Full Screen (12)
22:10:02 T:140208888583952 M:2487164928  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
22:10:02 T:140209409935424 M:2473431040  NOTICE: Using GL_TEXTURE_2D
22:10:02 T:140209409935424 M:2473431040  NOTICE: GL: Selecting Single Pass YUV 2 RGB shader
22:10:02 T:140209409935424 M:2473431040  NOTICE: GL: NPOT texture support detected
22:10:02 T:140209409935424 M:2473431040  NOTICE: CDVDPlayer::CloseFile()
22:10:02 T:140209409935424 M:2473431040  NOTICE: DVDPlayer: waiting for threads to exit
22:10:02 T:140208913762064 M:2473431040  NOTICE: CDVDPlayer::OnExit()
22:10:02 T:140208913762064 M:2473431040  NOTICE: DVDPlayer: closing audio stream
22:10:02 T:140208913762064 M:2473431040  NOTICE: Closing audio stream
22:10:02 T:140208913762064 M:2473431040  NOTICE: Waiting for audio thread to exit
22:10:02 T:140208888583952 M:2473431040   ERROR: AddPackets - failed to add leftover bytes to render
22:10:02 T:140208888583952 M:2473431040  NOTICE: thread end: CDVDPlayerAudio::OnExit()
22:10:02 T:140208913762064 M:2473431040  NOTICE: Closing audio device
22:10:02 T:140208913762064 M:2472755200  NOTICE: Deleting audio codec
22:10:02 T:140208913762064 M:2472755200  NOTICE: DVDPlayer: closing video stream
22:10:02 T:140208913762064 M:2472755200  NOTICE: Closing video stream
22:10:02 T:140208913762064 M:2472755200  NOTICE: waiting for video thread to exit
22:10:02 T:140208896976656 M:2472755200  NOTICE: thread end: video_thread
22:10:02 T:140208913762064 M:2472755200  NOTICE: deleting video codec
22:10:02 T:140208913762064 M:2472755200  NOTICE: CDVDPlayer::OnExit() deleting demuxer
22:10:02 T:140208913762064 M:2472755200  NOTICE: CDVDPlayer::OnExit() deleting input stream
22:10:02 T:140209409935424 M:2472755200  NOTICE: DVDPlayer: finished waiting
22:10:02 T:140209409935424 M:2485096448   ERROR: XLCDproc::SetBackLight - Unable to write to socket
22:10:02 T:140209409935424 M:2488651776   ERROR: XLCDproc::SetBackLight - Unable to write to socket
Reply
#10
renice -n 20 -p `pidof xbmc.bin` should do the trick, just type that after you log in.
Reply
#11
bobo1on1 Wrote:renice -n 20 -p `pidof xbmc.bin` should do the trick, just type that after you log in.

Thanks. I'll try running XBMC in a lower priority mode and then next time it crashes I will follow the advice at http://forum.xbmc.org/showpost.php?p=554780&postcount=7:

althekiller Wrote:kill the process with killall -SEGV xbmc.bin. Should dump a crash report in your ~.

Is there anything else I can do to help find the cause of this problem?
Reply
#12
Make sure gdb is installed when you do that and post the crashlog on pastebin.
Reply
#13
bobo1on1 Wrote:Make sure gdb is installed when you do that and post the crashlog on pastebin.

Can you please be a bit more specific? I have never used the gnu project debugger. What do I need to do before launching XBMC or after it hangs the system and I try to force it to crash? I am using Ubuntu 10.04 if that helps (and gdb is already installed).
Thanks!
Home Entertainment PC: XBMC running on Ubuntu 10.04
AMD 9950 Phenom Quad on ASUS M3N-H/HDMI motherboard with 4GB RAM and two SATAII drives.
Reply
#14
I have tried pairing down my directories to find a specific bad JPG, but its a tedious process. I am down to about 40 images on my last iteration. I will note that a kill or kill -9 on xbmc.bin during the crash does absolutely nothing. It does not kill. I have not actually attempted to kill Xorg or other processes, but that might work. Perhaps I should try to get Xorg to shutdown.

I can try attaching gdb to the process and see if I can do that later tonight.

Thanks,
Fred
Reply
#15
webmosher Wrote:Issue is reproducable by...

Hi Fred, Could you please explain how you are able to reproduce XBMC hanging the system? By home background are you referring to XBMC or Gnome?

My experience is that it has been random and not apparently reproducible. I rarely use the mouse as I use an CyberLink remote + LIRC. I am also using the default XBMC theme and have not added any new ones. I will try more tests if I can figure out how to reproduce the problem.

Thanks,
Ken
Home Entertainment PC: XBMC running on Ubuntu 10.04
AMD 9950 Phenom Quad on ASUS M3N-H/HDMI motherboard with 4GB RAM and two SATAII drives.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC randomly consumes system load (crash/hang)0