XBMC randomly consumes system load (crash/hang)
#16
kenm_uk Wrote: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!

Nothing, the xbmc script that launches xbmc.bin will automatically start gdb with the core dump on a crash and make a backtrace which it puts in the crashlog.
Reply
#17
bobo1on1 Wrote:Nothing, the xbmc script that launches xbmc.bin will automatically start gdb with the core dump on a crash and make a backtrace which it puts in the crashlog.

Thanks for the info. I suppose the problem is that XBMC does not "crash". It really causes the system to "hang".

And Fred says
Quote:I will note that a kill or kill -9 on xbmc.bin during the crash does absolutely nothing. It does not kill.
but I assume he means "hang" instead of "crash", right?

Do you know how to force a crash so that some useful gdb crashlogs are produced? Or are the xbmc.log files useful enough?
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
#18
bobo1on1 Wrote:Nothing, the xbmc script that launches xbmc.bin will automatically start gdb with the core dump on a crash and make a backtrace which it puts in the crashlog.

One issue I am seeing here is that XBMC never crashes to a dump. The CPU spikes to the point that the system is 100% unresponsive. A hard reset (button) is required to restart the system.
Reply
#19
webmosher Wrote:One issue I am seeing here is that XBMC never crashes to a dump. The CPU spikes to the point that the system is 100% unresponsive. A hard reset (button) is required to restart the system.

Yes, that is my experience too... XBMC does not "crash". Instead the system "hangs" with full CPU load and what appears like full IO load has my hard drive light is virtually always lit at this point -- doing what I don't know.
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
#20
kenm_uk Wrote: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?
To replicate, I simply leave XBMC itself running on a HOME screen that has a multi-image background (fanart). Basically, in Confluence, you can set a folder as the background and it will cycle through the images. Eventually, my XBMC crashes. It does not crash on a page that uses a single background.

Its random in the aspect that I don't know which image might be causing the problem, but it ALWAYS crashes. I haven't gone so far as to time the event to see if it always happens at a specific moment, but that's something I might try. Like you, I will also sometimes crash when browsing the library, but I cannot reproduce this reliably.

I am running XBMC-Live, so I have no Gnome desktop. I crash to "nothingness". In fact, when it crashes, the monitor always loses video signal. Usually when testing, I am connected via SSH and I might get 30 seconds to a couple minutes of time to try some things before the entire system hangs completely. Then I start over.
Reply
#21
webmosher Wrote:To replicate, I simply leave XBMC itself running on a HOME screen that has a multi-image background (fanart). Basically, in Confluence, you can set a folder as the background and it will cycle through the images. Eventually, my XBMC crashes. It does not crash on a page that uses a single background.

Its random in the aspect that I don't know which image might be causing the problem, but it ALWAYS crashes. I haven't gone so far as to time the event to see if it always happens at a specific moment, but that's something I might try. Like you, I will also sometimes crash when browsing the library, but I cannot reproduce this reliably.

Thanks. I am using XBMC on a Ubuntu 10.04 installation. This box is mainly a file server, home entertainment machine with a minimal number of additional packages on top of the basic Ubuntu install. I had this problem using Ubuntu 9.10 as well. I am not using any sort of multi-background fanart setup. I am simply using the basic Confluence theme and using the machine to play music and videos. Sometimes I use a wireless keyboard/mouse but usually just a CyberLink remote through LIRC. The system hangs occur randomly and I don't know how to reproduce them. The system "hangs" with CPU load and hard drive load hitting the roof. SSHing into the box is virtually impossible unless I have an extreme level of patience but usually I just hit the reset button.

I am surprised there are not more users with this issue.
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
#22
kenm_uk Wrote:Thanks. I am using XBMC on a Ubuntu 10.04 installation. This box is mainly a file server, home entertainment machine with a minimal number of additional packages on top of the basic Ubuntu install. I had this problem using Ubuntu 9.10 as well. I am not using any sort of multi-background fanart setup. I am simply using the basic Confluence theme and using the machine to play music and videos. Sometimes I use a wireless keyboard/mouse but usually just a CyberLink remote through LIRC. The system hangs occur randomly and I don't know how to reproduce them. The system "hangs" with CPU load and hard drive load hitting the roof. SSHing into the box is virtually impossible unless I have an extreme level of patience but usually I just hit the reset button.

I am surprised there are not more users with this issue.

Hmm.. you've given me a few ideas here on things to look for. For one, most of my drives are in external enclosures (USB), so I don't always see the lights for the drives. I am going to detach those drives when I do testing this evening just so I know its not contributing to the issues.

I did run 10.04, but had some issues with some sound card oddness with Lucid. At the time, I did not have major issues with XBMC, but I was sticking with the 25xxx series builds because the addons weren't merged yet.

When I test with SSH, I am always connected before I attempt to cause a crash. Usually I shutdown all other non-essential services to 1) give myself just a touch more CPU breathing room for the impending crash and 2) to ensure the services are not contributing to the crash.
Reply
#23
Well, here is a bit more information. Not sure if this will help at all.

I also did some hardware monitoring on these sessions. I saw no adverse issues, no temperature spikes, no spikes in memory usage.

I have determined that this is not related to any specific JPG file issue. Two identical files in the multi-image directory will cause the issue. One file will not have any problem. In general, I have found that the issue takes 7-10 minutes to cause the hang.

I experimented with killing the process in the middle of the hang. I was never able to fully kill the entire process (so it was always consuming 99% CPU), but I was able to kill Xorg, and specific threads attached to XBMC. Killing Xorg did not kill XBMC's runaway process.

I did find that sending sysrq signals to the kernel seems to work, but I cannot get a terminal to display, so I cannot see any information it might be providing. I found that sending a SIGSEGV while XBMC was running normally would cause a crashdump. I tried this during the hang, but did not get a core dump.

Lastly, I attached strace to the process while it was running. During the hang the first event is a timeout on a poll -- poll([{fd=20, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout) -- I then immediately sent a SIGSEGV. The process didn't die, but there is additional output. Then the trace hangs:
Code:
clock_gettime(CLOCK_MONOTONIC, {1181, 674278814}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 674329938}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 674593379}) = 0
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
read(9, "MemTotal:        2059116 kB\nMemF"..., 1024) = 1024
read(9, "    0\nHugePages_Rsvd:        0\nH"..., 1024) = 140
read(9, "", 1024)                       = 0
read(9, "", 1024)                       = 0
_llseek(9, 0, [0], SEEK_SET)            = 0
gettimeofday({1279156778, 552543}, NULL) = 0
getpid()                                = 2014
poll([{fd=20, events=POLLIN|POLLPRI}], 1, 1000) = 1 ([{fd=20, revents=POLLIN|POLLPRI}])
ioctl(20, 0xc0104652, 0xbff245e0)       = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690040878}) = 0
nanosleep({0, 0}, NULL)                 = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690193970}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690227214}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690259341}) = 0
read(16, 0xbff23630, 4112)              = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1279156778, 565657}, NULL) = 0
read(15, 0xb7709000, 4096)              = -1 EAGAIN (Resource temporarily unavailable)
read(10, 0x9553530, 4096)               = -1 EAGAIN (Resource temporarily unavailable)
select(11, [10], NULL, NULL, {0, 0})    = 0 (Timeout)
clock_gettime(CLOCK_MONOTONIC, {1181, 690529487}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690580611}) = 0
clock_gettime(CLOCK_MONOTONIC, {1181, 690836230}) = 0
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
time(NULL)                              = 1279156778
read(9, "MemTotal:        2059116 kB\nMemF"..., 1024) = 1024
read(9, "    0\nHugePages_Rsvd:        0\nH"..., 1024) = 140
read(9, "", 1024)                       = 0
read(9, "", 1024)                       = 0
_llseek(9, 0, [0], SEEK_SET)            = 0
gettimeofday({1279156778, 568864}, NULL) = 0
getpid()                                = 2014
poll([{fd=20, events=POLLIN|POLLPRI}], 1, 1000) = 0 (Timeout)
poll([{fd=20, events=POLLIN|POLLPRI}], 1, 1000) = ? ERESTART_RESTARTBLOCK (To be restarted)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTART}, {0x3e8f0f0, [], 0}, 8) = 0
futex(0xb7478bd8, FUTEX_WAIT, 2135, NULL) = 0
ioctl(25, 0x4122, 0xbff243d0)           = 0
poll([{fd=24, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=24, revents=POLLIN}])
ioctl(25, 0x4122, 0)                    = 0
read(24, "\1\0\0\0\237\4\0\0\236\220\250\34\1\0\0\0", 64) = 16
ioctl(25, 0x4122, 0x10)                 = 0
poll([{fd=24, events=POLLIN|POLLERR|POLLNVAL}], 1, -1) = 1 ([{fd=24, revents=POLLIN}])
ioctl(25, 0x4122, 0)                    = 0
ioctl(24, 0x54a1, 0xbff23cf8)           = 0
gettimeofday({1279156780, 377509}, NULL) = 0
read(24, "\1\0\0\0\237\4\0\0009I\355\35\1\0\0\0", 64) = 16
read(24, 0xbff23e48, 64)                = -1 EAGAIN (Resource temporarily unavailable)
ioctl(24, 0x54a1, 0xbff23f18)           = 0
read(24, 0xbff23ea8, 64)                = -1 EAGAIN (Resource temporarily unavailable)
close(24)                               = 0
semop(65537, 0xbff23f34, 2)             = 0
munmap(0xb5a44000, 32768)               = 0
close(25)                               = 0
munmap(0xb5a4d000, 4096)                = 0
munmap(0xb5a4c000, 4096)                = 0
shmdt(0xb5a34000)                       = 0
shmctl(131074, IPC_64|IPC_STAT, 0xbff23eac) = 0
shmctl(131074, IPC_64|IPC_RMID, 0)      = 0
shmdt(0xb5a4e000)                       = 0
shmctl(98305, IPC_64|IPC_STAT, 0xbff23eac) = 0
shmctl(98305, IPC_64|IPC_RMID, 0)       = 0
semctl(65537, 0, IPC_64|IPC_RMID, 0xbff23ef8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTART}, {SIG_DFL, [INT], SA_RESTART}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, [TERM], SA_RESTART}, {0x3e96800, [TERM], SA_RESTART}, 8) = 0
poll([{fd=10, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=10, revents=POLLOUT}])
writev(10, [{"_\1\2\0\v\0@\0+\0\1\0", 12}, {NULL, 0}, {"", 0}], 3) = 12
poll([{fd=10, events=POLLIN}], 1, -1)   = 1 ([{fd=10, revents=POLLIN}])
read(10, "\1\0\322\0\0\0\0\0\1\0\0\0\0\0\0\0\"\0\0\0H\377\36\10H\vU\10\0\0\0\0", 4096) = 32
read(10, 0x9553530, 4096)               = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=10, revents=POLLOUT}])
writev(10, [{"\33\1\2\0\0\0\0\0 \0\2\0\0\0\0\0+\0\1\0", 20}, {NULL, 0}, {"", 0}], 3) = 20
poll([{fd=10, events=POLLIN}], 1, -1)   = 1 ([{fd=10, revents=POLLIN}])
read(10, "\n\3\324\0\16\0@\0\00229\10L\rN\10<\rN\10L\rN\10\0\0\0\0\210t\240\277"..., 4096) = 64
read(10, 0x9553530, 4096)               = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=10, revents=POLLOUT}])
writev(10, [{"\202\2\2\0\0\0\0\0+\0\1\0", 12}, {NULL, 0}, {"", 0}], 3) = 12
poll([{fd=10, events=POLLIN}], 1, -1

I think my biggest frustration is that I cannot get it to crash to a coredump. I am hoping this might give someone a good place I can try to look next.

Anyhow, back to my single image backgrounds.

Thanks,
Fred
Reply
#24
My box just hung again. I have been running "nice xbmc" so trying to SSH in to the box is still slow but not quite as painful. Then I ran "sudo killall -SEGV xbmc.bin" which stopped xbmc after a number of seconds. I have the crashlog uploaded to: http://pastebin.ca/1901362.
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
#25
Big Grin 
So I'll post my findings regarding system setup and when this all happens.
I also have this problem for quite a while, and i dunno what the real cause is.

System setup
* Intel CPU 64bit
* nVidia onboard chipset
* Ubuntu Karmic Koala, minimal setup (see installation setup)
* XBMC Camelot + Ellipsis skin (Team Blackbolt) or Aeon showmix 2.5.
* Audio over HDMI
* Logitech diNovo mini, which looses connection often at startup time.

Installation setups
* I've used the XBMSetup script. It's just fantastic, and Karmic compatible.
Though, nvidia ppa's need to reconfigured. They mess up alot of the fun, but not an extreme difficult issue to fix yourself in the setup script.
Karmic installation is minimal.

Environmental setup
* I'm using my movies over the network, 1Gb connection. All movies are to be found on a Synology NAS. Could a network polling be a cause?

Behaviour remarks
* Starting up XBMC stays stable. I'll do some tests to reassure and post my findings.
BUT xbmc hangs under the following conditions:
* streaming internet music after a long time. (music keeps on playing for some reason, but all the rest is irresponsive, only reboot helps)
* once a movie has played (never had a hang-up during a movie!) and you leave the system as it's running in standby. After a while, the HDD led stays up and that's the sign to me that he's hangin'.

So if I see the posts in this thread, I conclude some things if we're talking about the same root cause:
A JPG cannot be the reason for a hang-up.
The fact that multiple things are on the home screen MAYBE.
Though it is not the same behaviour on my system.
Starting up and leaving the home screen does not hang.
But playing a movie and going to the same home screen does hang.
It surely gives me the impression of some sort of a memory leak problem.
The scrolling rss text on the home screen for instance, or the smoke animation on the background (Ellipsis skin).

Anyone that can give me an advice into further investigating this problem?
Reply
#26
johan_tre Wrote:Behaviour remarks
* Starting up XBMC stays stable. I'll do some tests to reassure and post my findings.
BUT xbmc hangs under the following conditions:
* streaming internet music after a long time. (music keeps on playing for some reason, but all the rest is irresponsive, only reboot helps)
* once a movie has played (never had a hang-up during a movie!) and you leave the system as it's running in standby. After a while, the HDD led stays up and that's the sign to me that he's hangin'.

So if I see the posts in this thread, I conclude some things if we're talking about the same root cause:
A JPG cannot be the reason for a hang-up.
The fact that multiple things are on the home screen MAYBE.
Though it is not the same behaviour on my system.
Starting up and leaving the home screen does not hang.
But playing a movie and going to the same home screen does hang.
It surely gives me the impression of some sort of a memory leak problem.
The scrolling rss text on the home screen for instance, or the smoke animation on the background (Ellipsis skin).

Anyone that can give me an advice into further investigating this problem?

Same with me. It does not hang during a movie but if I stop/pause the movie then that is when it occasionally hangs. It is so random, though, that I can't begin to guess what is causing the problem. Sometimes this happens when XBMC has been open only a few minutes, sometimes after many hours. And usually it does not hang.
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
#27
johan_tre Wrote:Environmental setup
* I'm using my movies over the network, 1Gb connection. All movies are to be found on a Synology NAS. Could a network polling be a cause?

My media setup is non-network: Ubuntu and /home parition etc installed to hard drive 1. Media stored on hard drive 2.
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
#28
woow quick-as-a-bullet reply mate! thx!

* That seems to leave out a network problem then Smile
* Can you do the same test as me?
- Start up, wait for a few hours, hang/no-hang?
- Start up, play a movie, and leave also for a few hours on home screen, hang/no-hang?

I've found a large core file and log's on my xbmc profile folder. They're deleted now, after the following hangup I'll try to investigate that one too.
Reply
#29
johan_tre Wrote:* Can you do the same test as me?
- Start up, wait for a few hours, hang/no-hang?
- Start up, play a movie, and leave also for a few hours on home screen, hang/no-hang?

The problem there is that my experience with the machine hanging is so random and unpredictable that I am not sure a few of the tests you mention would be very reliable. I know that XBMC will start up and idle for a few hours and exit just fine about 4/5 times. I also know it will play a movie and idle for a few hours and exit just fine about 4/5 times. It's that 20% of the time it plays a movie, I press stop on my remote, the screen starts to go back to the menu and poof...frozen screen and hard drive light on full time.

I wonder if it has something to do with the mouse. Sometimes I use the mouse and sometimes I don't. I'll pay more attention to whether that has an effect or not.
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
#30
mouse is never used in my case.
supposing we have the same problem, you can skip that one Smile
Reply

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