Xpra: Ticket #2076: x264 general protection fault

The xpra x264 library on xpra's yum repo segmentation faults. When I compile from source and overwrite 152 with my own it works (mine is a newer version, but I don't know if the issue is version, compile options, or something else entirely).

I could not find any report of a problem like this in bug tracker, and I'm not sure if this problem is even worth reporting, but it does lead to a quick segfault unless I disable or replace x264. If anybody is interested I can try to collect some diagnostics, but I'm not sure what to collect. It's 100% reproducible for me.

Some background info:

This ends up in the log

Dec 11 15:38:09 curry kernel: traps: xpra[37413] general protection ip:7fb7e5245a94 sp:7fb79bb3b078 error:0 in libx264.so.152[7fb7e5183000+121000]
Dec 11 15:48:10 curry kernel: traps: xpra[41370] general protection ip:7f6b04989a94 sp:7f6ac733a078 error:0 in libx264.so.152[7f6b048c7000+121000]
Dec 11 15:49:12 curry kernel: traps: xpra[45134] general protection ip:7f7a011eda94 sp:7f79d5b0c578 error:0 in libx264.so.152[7f7a0112b000+121000]
Dec 11 15:53:06 curry kernel: traps: xpra[47191] general protection ip:7f62dfd24a94 sp:7f629f964578 error:0 in libx264.so.152[7f62dfc62000+121000]
Dec 11 15:59:11 curry kernel: traps: xpra[49621] general protection ip:7fa42df49a94 sp:7fa411118078 error:0 in libx264.so.152[7fa42de87000+121000]
Dec 11 16:04:52 curry kernel: traps: xpra[52090] general protection ip:7f29d6ed0a94 sp:7f298eff5078 error:0 in libx264.so.152[7f29d6e0e000+121000]

Wed, 12 Dec 2018 17:28:36 GMT - Antoine Martin: owner changed

Are you on centos 7.6? It probably just needs a full rebuild - there must have been some ABI breakage somewhere.

Wed, 12 Dec 2018 17:29:25 GMT - Antoine Martin:

In the meantime, you can disable x264 and run with just the other codecs, vpx is good enough to replace it.

Thu, 13 Dec 2018 06:48:09 GMT - Antoine Martin:

Just finished a full rebuild of all the packages for centos 7.6 A simple yum update should give you the updated packages since the new dist tag el7_6 is higher than el7_5. Does that fix things?

Fri, 14 Dec 2018 00:16:33 GMT - Nathan Hallquist:

Yum update with winswitch enabled now brings me to this error, which I resolved by removing lz4.i686. I think this happens because the lz4 version at the winswitch yum repo is newer than stock.

Protected multilib versions: lz4-1.8.3-1.el7_6.x86_64 != lz4-1.7.5-2.el7.i686

I did a yum reinstall to be extra sure, but I'm still getting segfault with winswitch x264 rpm.

[nathan@curry ~]$ !505
rpm -qf /usr/lib64/xpra/libx264.so.152
[nathan@curry ~]$

Thu, 27 Dec 2018 01:06:51 GMT - Nathan Hallquist:

When I compile x264 with the spec file in the svn repo it works. I'm running:

[nathan@curry ~]$ nasm --version
NASM version 2.14 compiled on Nov  7 2018
[nathan@curry ~]$

Thu, 10 Jan 2019 06:14:29 GMT - Antoine Martin:

I think this can happen when the library in the repository is newer than the one that was used for building xpra's x264 module. I have forced a rebuild of the beta centos 7.6 repository (r21313 + r21314) and tested OK in a VM.

@nathan_lstc: does the beta repo work for you?

Fri, 11 Jan 2019 03:31:14 GMT - Nathan Hallquist:

It will take a few days to test. The only computer where I've had this problem is live using a trunk version that I've compiled. I'll need to coordinate a test with the user.

Mon, 14 Jan 2019 23:00:08 GMT - Nathan Hallquist:

I'm still getting this even with the most recent software from the yum repo. I can also replicate this if I compile my own xpra from source using the devel package from the yum repo.

I want to emphasize that this problem happens only one one computer and on no other. Also, I can't be entirely sure that this computer isn't broken in some subtle way, but I see no other signs.

This problem replicates on this computer whether or not I use the devel package from the yum repo or whether I compile that particular release of x264 by hand.

I have found that the only reliable fix is to upgrade to the latest x264 and then recompile xpra.

I'm going to ask arround and see if I can't find some other computer with the same CPU or motherboard to check if the problem replicates on all computers having that exactly CPU (maybe). Just not sure.

Alternatively, is there some small x264 test I can run to try to isolate the problem? I suppose I could also try something like gdb, but I'm not exactly sure how to do that with XPRA.

Mon, 14 Jan 2019 23:38:39 GMT - Nathan Hallquist:

I botched the yum update. It works. Sorry about that.

Mon, 14 Jan 2019 23:39:48 GMT - Nathan Hallquist:

I should have been more clear: the latest betas work. (I failed to refresh my yum repo properly)

Replying to Nathan Hallquist:

I botched the yum update. It works. Sorry about that.

Wed, 16 Jan 2019 04:16:29 GMT - Antoine Martin: owner, status changed

Pushed all the packages to the stable repo with the 2.4.3 update. (along with pillow-5.4.1, Cython 0.29.2, netifaces 0.10.7, xxhash 1.3.0, websocket-client 0.54.0, etc)

Someone reported a problem with the centos 7.x builds though... Re: Xpra 2.4.3: cosmetic and assorted fixes

Thu, 17 Jan 2019 12:26:05 GMT - Antoine Martin: status changed; resolution set

Sat, 23 Jan 2021 05:41:34 GMT - migration script:

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