Bug 1212180 - Displays a blank window on F22+ (due to qt4 issue with Xshm when X not run as root)
Summary: Displays a blank window on F22+ (due to qt4 issue with Xshm when X not run as...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: liveusb-creator
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker RejectedFreezeExcept...
: 1215405 1219281 (view as bug list)
Depends On: qt4-no-root
Blocks: F23BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2015-04-15 18:20 UTC by Gerard Ryan
Modified: 2016-09-20 02:46 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-10 07:24:00 UTC


Attachments (Terms of Use)
Fix, set graphics system to native in the code (690 bytes, patch)
2015-05-25 13:37 UTC, Jaroslav Reznik
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1196237 None None None Never

Internal Links: 1196237

Description Gerard Ryan 2015-04-15 18:20:06 UTC
Description of problem:
When I try to launch, I get asked for password as normal, then the window shows, but the main pain is just blank/gray.

Running `sudo liveusb-creator` gives the following ominous looking output:

[grdryn@athlone ~]$ \sudo liveusb-creator
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x120
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xae
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x240000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x240000f
[grdryn@athlone ~]$ 


Version-Release number of selected component (if applicable):
liveusb-creator.noarch 3.13.3-1.fc22

How reproducible:
100%, I've just installed.

Comment 1 Fedora Blocker Bugs Application 2015-04-16 08:37:32 UTC
Proposed as a Blocker for 22-final by Fedora user lbrabec using the blocker tracking app because:

 liveusb-creator works on stable Fedora (21), but doesn't work on F22.

Proposing as final blocker, because it violates criterion:
Release-blocking live and dedicated installer images must boot when written to optical media of an appropriate size (if applicable) and when written to a USB stick with any of the officially supported methods.

Comment 2 Adam Williamson 2015-04-16 16:08:05 UTC
Note, hplip graphical utilities (for HP printers - also Qt apps expecting to be run as root) have the same issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1196237#c12

Comment 3 Jaroslav Reznik 2015-04-17 10:58:54 UTC
It works for me properly in both GNOME (WS) and KDE Fedora 22 Beta RC3. The same version of liveusb-creator.

Comment 4 Gerard Ryan 2015-04-18 00:46:28 UTC
(In reply to Jaroslav Reznik from comment #3)
> It works for me properly in both GNOME (WS) and KDE Fedora 22 Beta RC3. The
> same version of liveusb-creator.

In a clean VM, installed from alpha workstation media, updated to latest package set, I can see it working fine.

I don't know why it won't work on my equally updated desktop system. If Adam is seeing something similar, then there must be some oddity somewhere.

I can confirm that there are controls in the window, it seems like they're just covered by this 'blank'. If I click around, things happen.

Comment 5 Andrew Travneff 2015-04-20 11:20:32 UTC
Seems related, imho: bug #1185893

Comment 6 Adam Williamson 2015-04-20 14:26:58 UTC
Yeah, I think we should call this a dupe.

*** This bug has been marked as a duplicate of bug 1185893 ***

Comment 7 Hans de Goede 2015-04-20 14:50:44 UTC
Hi,

As explained in bug 1185893 this has been discussed on the xorg-devel list and we do not consider this an Xorg bug, the problem is lack of proper error checking of the MIT SHM extension related X calls in the app / toolkit. This actually is a feature because people are now getting proper protection of unauthorized accesses to their shared memory segments where before anyone could access them (as the X-server was doing the accessing and it ran as root). So I'm re-opening this.

Also gui apps should really not run as root, ever. I realize this is sometimes easiest, but we should not ship anything setup this way ootb and/or depending on this (running as root).

Note I've also discussed this with the some qt people and it is fixed in qt5, and currently there are no plans to fix this for qt4, there answer to this problem is: Do not run gui apps as root.

Note that there is a workaround  for qt4 described in bug 1185893:

kcalc --graphicssystem native

So this can be worked around by making live-usb-creator to the same from code, and / or modifying the launcher. This is a workaround though and in the long run live-usb-creator should really be split in a front-end and a back-end, with the front-end not running as root.

Regards,

Hans

Comment 8 Petr Schindler 2015-04-20 18:16:41 UTC
Discussed at today's blocker review meeting [1].

This bug was rejected as F22 Final Blocker but accepted as F23 Beta Blocker - bugs in the USB creation tools are considered most important for *subsequent* releases, so this is a 23 Beta blocker under the footnotes of "All release-blocking images must boot in their supported configurations." in the Beta criteria

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2015-04-20/

Comment 9 Adam Williamson 2015-05-06 23:16:44 UTC
*** Bug 1219281 has been marked as a duplicate of this bug. ***

Comment 10 satellitgo 2015-05-07 00:37:06 UTC
note liveusb-creator does this even if started as root terminal command in f22 workstation TC-2 install

Comment 11 Adam Williamson 2015-05-07 00:39:48 UTC
yes. the bug affects exactly apps which run as root. when run from the menus it also runs as root, that's why it prompts you for a password before running.

Comment 12 satellitgo 2015-05-11 00:23:43 UTC
LUC works in f22 Plasma x86 TC-3 install to HD
also works in cinnamon and mate in a multi DE setup in yumex

Only in workstation x86 TC-3 does it start with a white window with no visible content?  Theme?

Comment 13 satellitgo 2015-05-11 13:05:00 UTC
workstation x86_64 TC-3:

# liveusb-creator
Qt: Session management error: None of the authentication protocols specified are supported
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /root/.config/ibus/bus
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon 
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x123
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xac
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x1e0000f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)

Comment 14 Dan Mossor [danofsatx] 2015-05-11 19:55:23 UTC
Discussed at the 2015-05-11 blocker review meeting[0]. Voted as RejectedFreezeException.

AGREED: 1212180 - RejectedFreezeException - there's no need for an FE here, a regular update will handle the problem fine (adamw, 18:14:20)

[0]: http://meetbot.fedoraproject.org/fedora-blocker-review/2015-05-11/

Comment 15 Adam Williamson 2015-05-11 20:53:58 UTC
satellit: probably the change to run X as a regular user is only active in Workstation, and X still runs as root on other spins. Haven't checked, though.

Comment 16 Hans de Goede 2015-05-12 07:09:18 UTC
(In reply to Adam Williamson from comment #15)
> satellit: probably the change to run X as a regular user is only active in
> Workstation, and X still runs as root on other spins. Haven't checked,
> though.

That is more or less correct, X will run as regular user when started by gdm or by startx (without a vt arg), in other cases it still runs as root.

Comment 17 vincentvdk 2015-05-17 13:43:38 UTC
I can confirm this bug after updating to the latest packages. Worked fine with the Beta3 default install.

Comment 18 Kamil Páral 2015-05-25 08:38:30 UTC
*** Bug 1215405 has been marked as a duplicate of this bug. ***

Comment 19 Jaroslav Reznik 2015-05-25 13:37:06 UTC
Created attachment 1029467 [details]
Fix, set graphics system to native in the code

Setting graphics system to native seems to fix/workaround this issue. In case we will need F22 version for release, I can build the patched package as provenpackager.

Comment 20 Jaroslav Reznik 2015-05-25 13:51:48 UTC
The other options is to run LUC by "QT_GRAPHICSSYSTEM=native liveusb-creator" as it doesn't accept -graphicssytem option.

Comment 21 Fedora Update System 2015-05-25 18:52:24 UTC
liveusb-creator-3.14.1-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/liveusb-creator-3.14.1-1.fc22

Comment 22 satellitgo 2015-05-25 19:40:11 UTC
I installedhttps://admin.fedoraproject.org/updates/liveusb-creator-3.14.1-1.fc22 in Gnome 3.16.2 installation with software installer
Works well; wrote USB of fedora-live-i686-22-3 (dd)

Comment 23 Herbert Carl Meyer 2015-05-26 18:57:43 UTC
This bug also effects unetbootin. I installed the livusb 3.14.1-1.f22 from above, and produced non-working USB's, for other, soon to be reported bugs. dnf gave me a unetbootin from f22 with this bug, I am going to try a downgrade to an f20 package of unetbootin.

Comment 24 Kamil Páral 2015-05-27 08:00:47 UTC
Hello Herbert,
please read https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB to see how to create a bootable USB. Unetbootin is very much not recommended. All bugs reported against liveusb-creator are appreciated. The easiest way to create the USB is probably gnome-disk-utility.

Comment 25 Herbert Carl Meyer 2015-05-27 13:27:25 UTC
(In reply to Kamil Páral from comment #24)
> Hello Herbert,
> please read https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB to
> see how to create a bootable USB. Unetbootin is very much not recommended.
> All bugs reported against liveusb-creator are appreciated. The easiest way
> to create the USB is probably gnome-disk-utility.

I have read and followed these instructions, they produce an unbootable usb. I have tried several combinations of settings, i.e. cp vs dd, with and without persistent storage, etc. None of these work. The fault is with Live USB, dvd's produced from the iso's work. When I am less annoyed I will file a bug report.

What is also true is that the X bug is effecting other programs that need root privileges. Unetbotin is another, as are the HP printer setups mentioned above.

Comment 26 Fedora Update System 2015-05-27 16:26:37 UTC
liveusb-creator-3.14.1-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Shatadru Bandyopadhyay 2015-05-27 21:07:42 UTC
unetbootin still shows blanks screen and throws the error :
~~~
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x131
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0x80
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3000010
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3000010
~~~

Comment 28 Sumit Bhardwaj 2015-06-12 19:10:53 UTC
Live USB Creator 3.14.2-1 is already in stable updates and fixes this issue for me.

Comment 29 Adam Williamson 2015-06-30 00:06:05 UTC
Please file a separate bug for unetbootin. This issue has to be fixed separately in each affected app; each affected app needs its own bug report.

Comment 30 Rex Dieter 2015-06-30 12:04:40 UTC
unetbootin is bug #1229874  (I just made the tracker bug #1236528 to keep track of all the related issues)

Comment 31 Kamil Páral 2015-08-10 07:24:00 UTC
I just tested liveusb-creator-3.14.2-1.fc22.noarch, it displays fine. Closing this bug.


Note You need to log in before you can comment on or make changes to this bug.