Wednesday, July 05, 2006

Xine out of memory error message

If you see this when starting xine (1.1.1):

This is xine (X11 gui) - a free video player v0.99.4.
(c) 2000-2004 The xine Team.
video_decoder: can't create new thread (Cannot allocate memory)
abort: video_decoder.c:510: _x_video_decoder_init: Aborting.

check your "ulimit -v". Xine seems to hog at least 256MB of virtual address space, even if it's not actually backing that with physical memory.

Ordinarily, I use the ulimit mechanism to automatically kill runaway processes that are sucking too much vmem (on the assumption that it is all backed with pmem). Without ulimit, Linux would be swapping so badly that I wouldn't be able to run "top" to kill the offending process.

But now, I have to up this figure just for xine...


kotnik said...


Could you be kind to tell me how to use ulimit to kill runaway processes? Just a short "where to look" will be fine.


Clarence Dang said...

Put this in /etc/profile:

ulimit -S -v 307200 >/dev/null 2>&1

As soon as process starts using more than 300MB of virtual memory, it will be killed. This is not particularly nice but is better than the system swapping out of control.