Request to backport fix for endianness issue in TigerVNC vncviewer

Bug #1929790 reported by bugproxy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Medium
Skipper Bug Screeners
tigervnc (Ubuntu)
Fix Released
Medium
Skipper Bug Screeners
Hirsute
Fix Released
Medium
Unassigned
Impish
Fix Released
Medium
Skipper Bug Screeners

Bug Description

SRU Justification:
==================

[Impact]

 * TigerVNC 1.11.0 contains a (pixel order) regression that causes
   vncviewer to display incorrect colors when vncviewer and X11 server
   use different endianness
   (e.g. when using X11 forwarding via SSH between an amd64 desktop
    and a Linux on s390x).

 * The regression was originally reported in github issue
   https://github.com/TigerVNC/tigervnc/issues/1073
   and fixed in github pull request
   https://github.com/TigerVNC/tigervnc/pull/1084

 * The issue got fixed by a respin of the
   ARGB runtime XImage byteorder selection.

[Test Plan]

 * Setup two systems with different endianness, ideally:
   a (little endian) Ubuntu (Desktop) system (amd64) and
   a (big endian) Ubuntu (Server) system (s390x)

 * Install tigervnc-standalone-server and tigervnc-xorg-extension on the s390x
   and tigervnc-vieweron the amd64 system (incl. all dependencies).

 * now start the server with: vncserver

 * run the client: xtigervncviewer <server-IP>:1

 * detailed instructions how to reproduce the bug

 * The issue results in the display of wrong colors, 'similar' to:
   https://github.com/TigerVNC/tigervnc/issues/738

 * Another (regression) test will be using both,
   tigervnc server and client, on amd64 only.

[Where problems could occur]

 * An onerousness patch would maybe not solve the endian problem
   and wrong colors (maybe different) still exist,

 * or in worst case it may have an impact on system combinations
   that use the same endianness.

 * The latter one is very unlikely, since there is only line 126
   that enters to code that handles the endianness.

 * And the fix here is a respin of the original runtime ARGB
   selection pull request, hence one that worked already before.

 * And the changes are very limited and only cover 3 lines
   of a single if/else statement in vncviewer/Surface_X11.cxx

[Other Info]

 * The reported issue is a regression that got (upstream) introduced into 1.10.

 * It is fixed be code that is known to work and that was tested on different
   platforms.

 * The patch is upstream accepted with v1.11.90 since Aug 28, 2020,

 * hence it's highly like no longer needed once Debian/Ubuntu pick up
   the next upstream version, since it's fixed with > 1.10.

 * Patched tigervnc versions are available for impish and hirsute via the PPA:
   https://launchpad.net/~fheimes/+archive/ubuntu/lp1929790

 * And the issue was in detail discussed upstream at:
   https://github.com/TigerVNC/tigervnc/issues/1073
   https://github.com/TigerVNC/tigervnc/pull/1084

__________

---Problem Description---
TigerVNC 1.11.0 contains a regression that causes vncviewer to display
incorrect colors when vncviewer and X11 server use different endianness (e.g.,
when using X11 forwarding via SSH between an x86-64 desktop and a Linux system
on s390x). The regression was originally reported in github issue
https://github.com/TigerVNC/tigervnc/issues/1073 and fixed in github pull
request https://github.com/TigerVNC/tigervnc/pull/1084

The regression caused vncviewer to always use the system byte order for pixel
values instead of the byte order required by the X11 display. With the fix,
vncviewer queries the X11 display for the required byte order.

As of now, the fix has not made it into a release yet. Please consider
backporting the fix (upstream commit 7ab92639848). I confirmed that this commit
cleanly applies on top of release 1.11.0 and fixes the regression.

---uname output---
Linux s390x

Machine Type = x15

---Debugger---
A debugger is not configured

---Steps to Reproduce---
 See also https://github.com/TigerVNC/tigervnc/issues/1252

- From a Linux x86 system, connect to a Linux system on s390x via SSH with X forwarding
- Start a Xvnc session on that Linux system

tigervncserver :0 -geometry 800x600 -depth 32

- Start vncviewer on the same Linux system

xtigervncviewer :0

- On vncviewer's window on your origin X session, observe incorrect colors.
- Optionally, start X11 programs such as xlogo, xclock, or xeyes to make the problem obvious
- Optionally, connect to the vnc session directly (i.e., with a vnc client on the origin system) to compare

Userspace tool common name: vncviewer

The userspace tool has the following bit modes: 64-bit

Userspace rpm: tigervnc-viewer

Userspace tool obtained from project website: na

Related branches

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-192826 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Changed in ubuntu-z-systems:
importance: Undecided → Medium
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: linux (Ubuntu) → tigervnc (Ubuntu)
Frank Heimes (fheimes)
tags: added: universe
Revision history for this message
Frank Heimes (fheimes) wrote :

tigervnc debdiff (impish)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "tigervnc debdiff (impish)" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Frank Heimes (fheimes) wrote :

tigervnc debdiff (hirsute)

Revision history for this message
Frank Heimes (fheimes) wrote :

Patched tigervnc versions are now available for impish and hirsute via the following PPA:
https://launchpad.net/~fheimes/+archive/ubuntu/lp1929790

Changed in ubuntu-z-systems:
status: New → In Progress
Changed in tigervnc (Ubuntu):
status: New → In Progress
Frank Heimes (fheimes)
tags: added: ubuntu-sponsors
description: updated
Changed in tigervnc (Ubuntu Hirsute):
status: New → In Progress
Frank Heimes (fheimes)
description: updated
description: updated
Revision history for this message
Frank Heimes (fheimes) wrote :

debdiff impish (updated)

Revision history for this message
Frank Heimes (fheimes) wrote :

debdiff hirsute (updated)

Revision history for this message
Frank Heimes (fheimes) wrote :

@Christian, I've updated both merge proposals according to your feedback.
(I had to replace the existing MPs, so please see the new ones, incl. their links, below the bug description above.)

Revision history for this message
bugproxy (bugproxy) wrote : tigervnc debdiff (impish)

Default Comment by Bridge

Revision history for this message
bugproxy (bugproxy) wrote : tigervnc debdiff (hirsute)

Default Comment by Bridge

Mathew Hodson (mhodson)
Changed in tigervnc (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in tigervnc (Ubuntu Impish):
importance: Undecided → Medium
Revision history for this message
Christian Ehrhardt  (paelzer) wrote (last edit ):

FYI: Reviewed and sponsored to impish-proposed and hirsute-unapproved

Revision history for this message
Frank Heimes (fheimes) wrote (last edit ):

Thx!
The patched version already landed in the impish queue:
tigervnc | 1.11.0+dfsg-2ubuntu1 | impish-proposed/universe
hence updating the impish entry to Fix Committed.

Changed in tigervnc (Ubuntu Hirsute):
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in tigervnc (Ubuntu Impish):
status: In Progress → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

FYI: Reviewed and sponsored to impish-proposed and focal-unapproved

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tigervnc - 1.11.0+dfsg-2ubuntu1

---------------
tigervnc (1.11.0+dfsg-2ubuntu1) impish; urgency=medium

  * debian/patch/0001-Update-Surface_X11.cxx.patch
    TigerVNC 1.11.0 contains a regression that causes vncviewer to display
    incorrect colors when vncviewer and X11 server use different endianness.
    (LP: #1929790)

 -- Frank Heimes <email address hidden> Mon, 20 Sep 2021 19:57:36 +0200

Changed in tigervnc (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted tigervnc into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tigervnc/1.11.0+dfsg-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in tigervnc (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Robie Basak (racb) wrote :

Unsubscribing sponsors.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-09-24 05:16 EDT-------
Hello,

I have tested the new packages in hirsute on s390x and confirm that they fix the reported bug.

Systems: s390x with hirsute and hirsute-proposed added to apt sources, amd64 with Fedora (currently have no Ubuntu environment on an amd53 system).

TEST CASE:
- start tigervncserver :1 on s390x
- connect with VNC client (vinagre) from amd64
- start xterm, xclock, xlogo, xeyes
- connect with ssh -X from amd64 to s390x system, then start xtigervncviewer :1 on s390x

Test case executed once with tigervnc from hirsute and once again after upgrading the tigervnc packages (tigervnc-common, tigervnc-standalone-server, tigervnc-viewer, tigervnc-xorg-extension) to hirsute-proposed.

VERIFICATION DONE
Incorrect colors reproduce when running xtigervncviewer on s390x with X11 forwarding to amd64 with hirsute packages (i.e., bug reproduces).
Colors are displayed correctly when running xtigervncviewer on s390x with X11 forwarding to amd64 with packages from hirsute-proposed.
Colors are displayed correctly when connecting with a VNC client from amd64, both with packages in hirsute and with the updated packages in hirsute-proposed.

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx for the verification, Marius - I'm adjusting the tags accordingly ...

tags: added: verification-done verification-done-hirsute
removed: ubuntu-sponsors verification-needed verification-needed-hirsute
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tigervnc - 1.11.0+dfsg-2ubuntu0.1

---------------
tigervnc (1.11.0+dfsg-2ubuntu0.1) hirsute; urgency=medium

  * debian/patch/0001-Update-Surface_X11.cxx.patch
    TigerVNC 1.11.0 contains a regression that causes vncviewer to display
    incorrect colors when vncviewer and X11 server use different endianness.
    (LP: #1929790)

 -- Frank Heimes <email address hidden> Mon, 20 Sep 2021 20:41:22 +0200

Changed in tigervnc (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for tigervnc has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2022-02-07 07:54 EDT-------
The bug was fixed with successful verification on hirsute, hence closing this bug.
Status update: ->CLOSED

tags: added: targetmilestone-inin2104
removed: targetmilestone-inin---
Revision history for this message
Frank Heimes (fheimes) wrote :

Meanwhile 'bookworm' has a 1.12, we should sync/merge this to jammy - which is on my todo list ...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.