[Beignet] Unrecoverable system lockup when allocating too much memory

Rebecca N. Palmer rebecca_palmer at zoho.com
Fri Nov 6 14:05:42 PST 2015


> (The example in
> https://bugs.launchpad.net/ubuntu/+source/pyopencl/+bug/1354086 no
> longer hangs, so the "rapidly allocating and freeing pyopencl objects
> doesn't actually free the memory" aspect has evidently been fixed, but
> keeping too many objects for the available memory still does hang.

On further investigation, it isn't that simple:

-Create and keep (large_array_test.py): With swap, creates the objects 
in swap (becoming slow but not actually hanging), then errors out on 
trying to do arithmetic on them.  Without swap, errors out in object 
creation, but not before the kernel's OOM killer terminates a few pieces 
of the desktop (according to the log, it thinks my test is only using 
~50MB, so it (like gnome-system-monitor) evidently can't see GPU memory 
use).
-Rapid create-then-free (arraybug_test.py) using the result (naive 
pyopencl.clmath): Doesn't hang, but may segfault on exit.  (Kernel log: 
python3[8857]: segfault at 20 ip 00007fa5caac3c84 sp 00007ffca782b2a0 
error 4 in libpthread-2.21.so[7fa5caaba000+18000] ; I can't be more 
specific because it doesn't crash under gdb).
-Rapid create-then-free throwing away the result (this would be a bug in 
a real program, but probably shouldn't hang the entire system): With 
swap, starts using it, hence becoming slow but not actually hanging 
(though I haven't taken it to the point of actually filling the swap). 
Without swap, hangs (at least screen output does: desktop clock frozen, 
mouse pointer minimally responsive), with disk activity (!); 
Alt+SysRq+s,u,b restarts, but usually doesn't write the log).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arraybug_test.py
Type: text/x-python
Size: 5510 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20151106/318386e9/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: large_array_test.py
Type: text/x-python
Size: 2205 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20151106/318386e9/attachment-0001.py>


More information about the Beignet mailing list