Xpra: Ticket #1455: xpra does not check for MIT-SHM - server logfile with MBs of error messages

If xpra server uses a display without extension MIT-SHM, the server log file gets filled with repeating error messages and can increase to a size of some MB within minutes.

Example: 2017-03-01 16:12:16,470 XShmWrapper.setup() XShmAttach(..) failed! Xlib: extension "MIT-SHM" missing on display ":500". Xlib: extension "MIT-SHM" missing on display ":500".

This can lead to an overfilled hard disk after some hours. xpra should check whether MIT-SHM is available and avoid to use it if it is missing.

Wed, 01 Mar 2017 15:46:08 GMT - Antoine Martin: owner changed; milestone set

Done in r15198. Please close if this works for you. (this may be applied to the v1.0.x LTS branch at some point)

Tested by adding -extension MIT-SHM to my xvfb command line.

FYI: you can also use this environment switch with older versions:

XPRA_XSHM=0 xpra start ..

Note: beware, the non-xshm codepath is not very well tested.

Sat, 11 Mar 2017 13:18:52 GMT - mviereck: status changed; resolution set

Much thanks for your hint with environment variable XPRA_XSHM! That does help me a lot, as I need to be compatible with older xpra versions. Now I set XPRA_XSHM whenever I connect to an X server without MIT-SHM and leave it away if X supports it. I still did not test your bug fix, sorry, as I was a bit confused how to get and compile r15198. So far, I did not encounter any problems with xpra and MIT-SHM disabled. I also did not have any problems before except the growing logfile.

Sun, 12 Mar 2017 08:52:12 GMT - Antoine Martin:

That does help me a lot, as I need to be compatible with older xpra versions.

FYI: the currently supported version (1.0 LTS) is compatible with older xpra versions going as far back as the previous LTS version (0.14.x), see wiki/Versions for details. (using anything else means version with lots of known bugs, including security issues..)

Sun, 12 Mar 2017 10:51:22 GMT - Antoine Martin: milestone changed

Sun, 01 Oct 2017 16:52:19 GMT - mviereck:

I found one case where disabling MIT-SHM causes an error. Having a custom X server without MIT-SHM, and starting xpra server with XPRA_XSHM=0 xpra shadow $DISPLAY --use-display, I get an empty black window with xpra attach and repeating server error messages:

2017-10-01 18:45:10,826 client 1: Attached to :101 (press Control-C to detach)
2017-10-01 18:45:11,064 Warning: failed to capture pixels of window 0x25c:
2017-10-01 18:45:11,065  unbound method get_image() must be called with GTKRootWindowModel instance as first argument (got XImageCapture instance instead)

With MIT-SHM enabled, everything works fine. xpra v2.1.2-r16903 on debian stretch (Not really an issue for me as I don't need this setup, just want to report.)

Mon, 02 Oct 2017 05:21:39 GMT - Antoine Martin:

Fixed in r17019 (will backport).

Related improvements:

Sat, 23 Jan 2021 05:24:46 GMT - migration script:

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