xpra icon
Bug tracker and wiki

Opened 10 months ago

Closed 9 months ago

Last modified 2 months ago

#1455 closed task (fixed)

xpra does not check for MIT-SHM - server logfile with MBs of error messages

Reported by: mviereck Owned by: mviereck
Priority: minor Milestone: 2.0
Component: server Version: 1.0.x
Keywords: MIT-SHM Cc: bachbaum24@…

Description

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.

Change History (6)

comment:1 Changed 10 months ago by Antoine Martin

Milestone: 2.1
Owner: changed from Antoine Martin to mviereck

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.

comment:2 Changed 9 months ago by mviereck

Resolution: fixed
Status: newclosed

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.

comment:3 Changed 9 months ago by 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..)

comment:4 Changed 9 months ago by Antoine Martin

Milestone: 2.12.0

comment:5 Changed 2 months ago by 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.)

Last edited 2 months ago by mviereck (previous) (diff)

comment:6 Changed 2 months ago by Antoine Martin

Fixed in r17019 (will backport).

Related improvements:

  • r17018: log warning if xshm not available
  • r17020: use correct bytes-per-pixel
Note: See TracTickets for help on using tickets.