Xpra: Ticket #1425: codec selftest crash on osx

Since we now run the unit tests on every build (r14871), I have seen the occasional failure in the codec self tests.

I thought I had seen it crash in vpx, which was previously disabled but got re-enabled in r14876.

Running by hand, I got this:

x264 148 max width=8192
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / YUV422P / YUV422P passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / RGB / RGB passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / BGRX / BGRX passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / BGR / BGR passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / YUV420P / YUV420P passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / BGRA / BGRA passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / YUV444P / YUV444P passed
<module 'xpra.codecs.enc_x264.encoder' from '/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/codecs/enc_x264/encoder.so'>: h264 / YUV422P / YUV422P passed
Segmentation fault: 11

Sadly, this is not easily reproducible: I've just ran it 20+ times with and without gdb attached... no crash.

Maybe we should bump x264, just in case.



Tue, 31 Jan 2017 14:15:34 GMT - Antoine Martin: attachment set

to disable enc_vpx on osx


Tue, 31 Jan 2017 14:37:10 GMT - Antoine Martin: status, description changed; resolution set

Eventually got a stacktrace:

cd unittest
XPRA_ALL_DEBUG=1 PYTHONPATH=. gdb  --args /Users/osx/gtk/inst/bin/python ./unit/codecs/codecs_selftest_test.py
(gdb) run
(..)
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00000001045d183d in x264_plane_copy_deinterleave_rgb_ssse3 () from /Users/osx/gtk/inst/lib/libx264.148.dylib
(gdb) bt
#0  0x00000001045d183d in x264_plane_copy_deinterleave_rgb_ssse3 () from /Users/osx/gtk/inst/lib/libx264.148.dylib
#1  0x00000000000000c0 in ?? ()
#2  0x0000000000000040 in ?? ()
#3  0x0000000000000003 in ?? ()
#4  0x000000010453ebfe in x264_frame_copy_picture () from /Users/osx/gtk/inst/lib/libx264.148.dylib
#5  0x00000000000000c0 in ?? ()
#6  0x0000000000000003 in ?? ()
#7  0x0000000000000040 in ?? ()
#8  0x0e001ce200000400 in ?? ()
#9  0x0000000100952820 in ?? ()
#10 0x00007fff5fbfc800 in ?? ()
#11 0x00000000ffffffff in ?? ()
#12 0x00000001019e9620 in ?? ()
#13 0x0000000100952820 in ?? ()
#14 0x00007fff5fbfc780 in ?? ()
#15 0x00000001045b04eb in x264_encoder_encode () from /Users/osx/gtk/inst/lib/libx264.148.dylib
#16 0x0000000000000000 in ?? ()
(gdb)

Fairly reliable too. (got it a few times, always in the same place) I bumped x264 version in r14928, still managed to hit the crash. Looks like it is failing during the RGB or BGR tests (24bits per pixel packed), so r14930 disables those (backported in r14931) and I haven't seen the crashes since! We don't use them on any platform anyway: screen buffers are always stored in 32bit formats.

OTOH, other options would have been:


Sat, 23 Jan 2021 05:23:58 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1425