xpra icon
Bug tracker and wiki

Opened 5 weeks ago

Closed 42 hours ago

#2076 closed defect (fixed)

x264 general protection fault

Reported by: Nathan Hallquist Owned by: Antoine Martin
Priority: major Milestone: 2.5
Component: encodings Version: 2.4.x
Keywords: Cc:


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:

  • centos 7
  • uname:
    Linux curry 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
  • 128gb ram

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]

Change History (12)

comment:1 Changed 5 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to Nathan Hallquist

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

comment:2 Changed 5 weeks ago by Antoine Martin

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

comment:3 Changed 5 weeks ago by 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?

comment:4 Changed 5 weeks ago by 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 ~]$

comment:5 in reply to:  4 Changed 3 weeks ago by 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 ~]$

comment:6 Changed 9 days ago by 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?

Last edited 9 days ago by Antoine Martin (previous) (diff)

comment:7 Changed 8 days ago by 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.

comment:8 Changed 4 days ago by 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.

comment:9 Changed 4 days ago by Nathan Hallquist

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

comment:10 in reply to:  9 Changed 4 days ago by 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.

comment:11 Changed 3 days ago by Antoine Martin

Owner: changed from Nathan Hallquist to Antoine Martin
Status: newassigned

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

comment:12 Changed 42 hours ago by Antoine Martin

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.