xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 5 years ago

Closed 5 years ago

Last modified 16 months ago

#1425 closed defect (fixed)

codec selftest crash on osx

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: critical Milestone: 2.0
Component: platforms Version: trunk
Keywords: osx Cc:

Description (last modified by Antoine Martin)

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.

Attachments (1)

enc_vpx-osx-disable.patch (2.0 KB) - added by Antoine Martin 5 years ago.
to disable enc_vpx on osx

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by Antoine Martin

Attachment: enc_vpx-osx-disable.patch added

to disable enc_vpx on osx

comment:1 Changed 5 years ago by Antoine Martin

Description: modified (diff)
Resolution: fixed
Status: newclosed

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 ?? ()

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:

  • turn off x264 on OSX
  • turn off ssse3? (there are no switches to configure... would have required tweaking the ifdefs)
  • maybe the tests are faulty, or maybe the buffers need padding for ssse access?

comment:2 Changed 16 months ago by migration script

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

Note: See TracTickets for help on using tickets.