xvfb-run munges stdout and stderr together

Bug #1059947 reported by Robert Collins
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

It executes the supplied command thusly:
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1

This should be
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@"

Leaving the caller to redirect stderr to stdout, or to supply a single fd at their discretion. The side effect of munging the two fd's together is that programs which provide structured data on stdout have their output streams corrupted if they, or any subprocesses they have, happen to write to stderr at an inopportune time.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Leon Blakey (thelq) wrote :

Any updates? This still exists 4 years later in xvfb 2:1.16.4-1 . The only workaround is to copy the entire script locally and remove those 4 characters.

Also the package is xvfb, not xorg-server

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the source package is xorg-server

changing this would break a ton of autopkgtests that use xvfb-run which now get errors like:

testsuite FAIL stderr: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
             '/tmp/runtime-ubuntu'

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

This bug was fixed in the package xorg-server - 2:1.19.4-1ubuntu2

---------------
xorg-server (2:1.19.4-1ubuntu2) artful; urgency=medium

  * xvfb-run: Keep redirecting stderr to stdout, autopkgtests need it.

 -- Timo Aaltonen <email address hidden> Wed, 11 Oct 2017 11:12:57 +0300

Changed in xorg-server (Ubuntu):
status: Confirmed → Fix Released
Timo Aaltonen (tjaalton)
Changed in xorg-server (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Brad Isbell (brad-2) wrote :

This bug is still present in xvfb 2:1.20.13-1ubuntu1~20.04.2. It prevents us from using `xvfb-run` when we need to disambiguate STDOUT and STDERR.

I'm not familiar with the problem of autopkgtests, but is this still an issue? Can autopkgtests be fixed?

If we're an impasse, does it make sense to turn this into a feature request to add a flag to change the redirection behavior?

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.