Forum

Full Version: Out Of Memory freeze
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,
I have a problem with xbian freezing on out of memory, I got working rtorrent + sickrage, but when it's trying to download 2+ files - my raspberry keeps freezing on RPI1 like here:
http://forum.xbian.org/printthread.php?tid=2693
on RPI2 without saying anything.
I suspected it may be out of memory casue i installed syslog and here's output before freeze:
Terminal
Mar 7 15:23:10 xbian kernel: <30>[ 24.876932] udevd[1114]: starting version 175
Mar 7 15:23:10 xbian kernel: [ 25.335103] bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated
Mar 7 15:23:10 xbian kernel: [ 25.335606] bcm2708_spi bcm2708_spi.0: SPI Controller at 0x3f204000 (irq 80)
Mar 7 15:23:10 xbian kernel: [ 25.400182] bcm2708_i2c_init_pinmode(1,2)
Mar 7 15:23:10 xbian kernel: [ 25.400203] bcm2708_i2c_init_pinmode(1,3)
Mar 7 15:23:10 xbian kernel: [ 25.400711] bcm2708_i2c bcm2708_i2c.1: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
Mar 7 15:23:10 xbian kernel: [ 25.572035] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Mar 7 15:23:10 xbian kernel: [ 25.807001] pcm512x 1-004d: Failed to reset device: -5
Mar 7 15:23:10 xbian kernel: [ 25.807049] pcm512x: probe of 1-004d failed with error -5
Mar 7 15:23:10 xbian kernel: [ 25.807197] pcm512x 1-004c: Failed to reset device: -5
Mar 7 15:23:10 xbian kernel: [ 25.807226] pcm512x: probe of 1-004c failed with error -5
Mar 7 15:23:10 xbian kernel: <12>[ 31.875105] init: failsafe main process (512) killed by TERM signal
Mar 7 15:23:10 xbian kernel: <12>[ 35.713325] init: wait-for-state (xbmcxbmc-loaded) main process (1578) killed by TERM signal
Mar 7 15:23:10 xbian kernel: <12>[ 42.803300] init: xbmc-failed-start main process (930) killed by TERM signal
Mar 7 15:23:10 xbian kernel: <12>[ 42.829024] init: wait-for-state (zram-swapxbmc-done) main process (1275) killed by TERM signal
Mar 7 15:23:10 xbian kernel: [ 43.100164] Adding 84988k swap on /dev/mmcblk0p3. Priority:0 extents:1 across:84988k SSFS
Mar 7 15:23:10 xbian kernel: <12>[ 48.414153] init: rtorrent main process (2261) terminated with status 255
Mar 7 15:23:10 xbian kernel: <12>[ 48.414349] init: rtorrent main process ended, respawning
Mar 7 15:23:10 xbian kernel: <12>[ 48.505727] init: rtorrent main process (2350) terminated with status 255
Mar 7 15:23:10 xbian kernel: <12>[ 48.505895] init: rtorrent main process ended, respawning
Mar 7 15:23:10 xbian kernel: <12>[ 48.595088] init: rtorrent main process (2374) terminated with status 255
Mar 7 15:23:10 xbian kernel: <12>[ 48.595306] init: rtorrent respawning too fast, stopped
Then it's freeze.

I suspect it may be because my swap is really small:
Terminal
root@xbian /var/log # free -m
total used free shared buffers cached
Mem: 738 243 494 0 2 144
-/+ buffers/cache: 97 640
Swap: 82 0 82
Terminal
root@xbian /var/log # swapon -s
Filename Type Size Used Priority
/dev/mmcblk0p3 partition 84988 0 0

I'm running it from usb harddrive, here's my cmdline.txt
Terminal
telnet zswap.enabled=1 zswap.compressor=lz4 partswap sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0 console=tty1 root=LABEL=xbian-copy rootflags=subvol=root/@,thread_pool=2,autodefrag,compress=lz4,commit=120 rootfstype=btrfs rootwait smsc95xx.turbo_mode=N logo.nologo quiet noswap loglevel=0 mod_scsi.scan=sync partswap startevent=mountall splash nohdparm --startup-event mountall

Best wishes
koper89
You can try adding a swap file

http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

It's the fasted method to add swap space without touching partitioning
Do you think it may solve the problem? And is there any advantage of swap partition or there's no real difference between swap file and swap partition?
(9th Mar, 2015 06:40 PM)koper89 Wrote: [ -> ]Do you think it may solve the problem? And is there any advantage of swap partition or there's no real difference between swap file and swap partition?

I don't known if it can solve, but at least you can exclude out of memory errors. I suggested swap file cause it's the fastest way to add swap space and, if you don't need it anymore, you can easily delete it.
It's not that, it's a bug in the network driver. I am working on it.

XBian includes a small swap partition, you can see in the log where it activated it.

*edit*
Your issue appears to not be XBian related exactly, it's rtorrent misbehaving and bringing down the system with it.
I have a kernel for the RPi 2 I would like you to try.
(10th Mar, 2015 02:36 AM)f1vefour Wrote: [ -> ]I have a kernel for the RPi 2 I would like you to try.
I would love to test it - where can i find it?

(9th Mar, 2015 11:47 PM)f1vefour Wrote: [ -> ]Your issue appears to not be XBian related exactly, it's rtorrent misbehaving and bringing down the system with it.
I can say that's it's in high peak of ram usage in rtorrent - when he's out of memory he is killed by term, I suppouse if there would be more swap this "threshold" would be higher but its just my assumption (I don't have much knowledge about linux)
Here is the kernel (RPi 2 only): https://db.tt/k0A4FzzV

After downloading do:
Terminal

sudo dpkg -i linux-image-bcm2836_3.18.9+_armhf.deb

Stress it like you have been and let me know if you still have issues.
Already installed, I'll try to stress it tomorrow and post here resultsWink
Thanks for help!
Thanks, the sooner the better. If it resolves your problem I can push the changes out.
(9th Mar, 2015 05:59 PM)Fabio72 Wrote: [ -> ]You can try adding a swap file

http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

It's the fasted method to add swap space without touching partitioning

This doesn't work on a btrfs file system,
link
(10th Mar, 2015 05:49 AM)koper89 Wrote: [ -> ]Already installed, I'll try to stress it tomorrow and post here resultsWink
Thanks for help!
I just started two torrents (legal - Ubuntu ISOs) with aria2c and the system appears to freeze even though it hasn't, the movie I have streaming continues to play. I don't know what to make of this really.

I have 50Mbit downstream and it was pulling in about 7 megabytes/sec until it becomes semi-unreponsive. I switched to a USB drive instead of the systems sdcard and it appeared to be worse.
(10th Mar, 2015 06:40 AM)Killerbee Wrote: [ -> ]
(9th Mar, 2015 05:59 PM)Fabio72 Wrote: [ -> ]You can try adding a swap file

http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

It's the fasted method to add swap space without touching partitioning

This doesn't work on a btrfs file system,
link

So is there a way to extend swap on xbian? (Can i f.e. resize my partition where btrfs filesystem is? and use what left to make swap partition? )


(10th Mar, 2015 06:58 AM)f1vefour Wrote: [ -> ]
(10th Mar, 2015 05:49 AM)koper89 Wrote: [ -> ]Already installed, I'll try to stress it tomorrow and post here resultsWink
Thanks for help!
I just started two torrents (legal - Ubuntu ISOs) with aria2c and the system appears to freeze even though it hasn't, the movie I have streaming continues to play. I don't know what to make of this really.

I have 50Mbit downstream and it was pulling in about 7 megabytes/sec until it becomes semi-unreponsive. I switched to a USB drive instead of the systems sdcard and it appeared to be worse.
I have 25Mbit downstream, but i'm using openvpn client connection - but thanks to RPi2 i got pretty high performance compared to RPi1 (RPi2 - 3MB/s down RPi1 max 1MB/s), but if in your case it's a freeze i suppouse it'll be in mine also, but let's wait till tomorrow currently its working like a charmSmile
Hopefully it continues to work for you, let me know tomorrow.
It stopped but i stressed it a lotSmile It seems like it lost time because it's back in pastBig Grin
Here are my logs:
syslog
http://pastebin.com/mbB9LTPg
kern.log
http://pastebin.com/0zgFe8Hd
Pages: 1 2
Reference URL's