Bug 1203780 - startx stopped to work for me as user
Summary: startx stopped to work for me as user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-19 16:18 UTC by Zdenek Kabelac
Modified: 2015-05-26 03:19 UTC (History)
3 users (show)

Fixed In Version: xorg-x11-server-1.17.1-12.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-12 20:44:25 UTC
Type: Bug


Attachments (Terms of Use)
xsession-errors (1.62 KB, text/plain)
2015-04-15 06:50 UTC, Zdenek Kabelac
no flags Details
Xorg.log (4.84 KB, text/plain)
2015-04-15 06:51 UTC, Zdenek Kabelac
no flags Details

Description Zdenek Kabelac 2015-03-19 16:18:21 UTC
Description of problem:

After my todays rawhide sync I could not longer 'startx' my Xsession from console as a user.

Xorg crashes here:

(gdb) bt
#0  0x00007fa4b5872ad8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007fa4b587476a in __GI_abort () at abort.c:89
#2  0x000000000059c2fe in OsAbort () at utils.c:1342
#3  0x00000000005a2b97 in FatalError (f=f@entry=0x5b4904 "%s: VT_ACTIVATE failed: %s\n") at log.c:928
#4  0x000000000049fad1 in switch_to (vt=2, from=0x5b498d "xf86CloseConsole") at lnx_init.c:72
#5  0x00000000004a03f3 in xf86CloseConsole () at lnx_init.c:324
#6  0x000000000047b485 in ddxGiveUp (error=error@entry=EXIT_ERR_ABORT) at xf86Init.c:1068
#7  0x000000000047b53a in AbortDDX (error=error@entry=EXIT_ERR_ABORT) at xf86Init.c:1121
#8  0x00000000005a1ed2 in AbortServer () at log.c:784
#9  0x00000000005a2bcd in FatalError (f=f@entry=0x5b4904 "%s: VT_ACTIVATE failed: %s\n") at log.c:925
#10 0x000000000049fad1 in switch_to (vt=2, from=0x5b497d "xf86OpenConsole") at lnx_init.c:72
#11 0x000000000049fd69 in xf86OpenConsole () at lnx_init.c:211
#12 0x000000000047d27d in InitOutput (pScreenInfo=pScreenInfo@entry=0x834880 <screenInfo>, argc=argc@entry=7, 
    argv=argv@entry=0x7ffcca246fc8) at xf86Init.c:550
#13 0x000000000043e07a in dix_main (argc=7, argv=0x7ffcca246fc8, envp=<optimized out>) at main.c:202
#14 0x00007fa4b585d840 in __libc_start_main (main=0x428650 <main>, argc=7, argv=0x7ffcca246fc8, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcca246fb8) at libc-start.c:289
#15 0x0000000000428689 in _start ()



And basically Xorg has not enough privilidges to create a X session for me.

So I've copied   /usr/libexec/Xorg to /usr/bin/Xorg 
Add suid bit - and it works for me now.

So not sure what is wrong - but I'd suspect  /usr/libexec/Xorg.wrap.


Version-Release number of selected component (if applicable):
xorg-x11-server-Xorg-1.17.1-7.fc23.x86_64

How reproducible:


Steps to Reproduce:
1. log on console as a user
2. startx
3.

Actual results:


Expected results:


Additional info:

Comment 1 Hans de Goede 2015-03-20 13:40:34 UTC
Hi,

I wonder what exactly is going on here, can you please attach Xorg.log from an attempt startx ?
(X should print where it has stored it when it fails).

Thanks,

Hans

Comment 2 Zdenek Kabelac 2015-04-15 06:49:45 UTC
Ok - so I've been wondering myself as well.

It appears - my own 'startx' wrapper is the problem -

So here it is how it looks like:

--
#!/bin/sh

mv  $HOME/.xsession-errors $HOME/.xsession-errors-$(date +%F-%X)
TTY=$(basename $(tty))
VT=vt0${TTY: -1:1}
exec /usr/bin/startx "$@" -- $VT  >$HOME/.xsession-errors 2>&1
--

This used to work for many years (I had been using it since early days of systemd introduction where this has been the only way to get usable X).

Attaching also .xsession + Xorg.log

When I drop 'tty games' it now works again with wrapper.

So unsure what has changed - but 'tty' is no longer possible to be passed as an option to startx.

Comment 3 Zdenek Kabelac 2015-04-15 06:50:35 UTC
Created attachment 1014593 [details]
xsession-errors

Comment 4 Zdenek Kabelac 2015-04-15 06:51:15 UTC
Created attachment 1014594 [details]
Xorg.log

Comment 5 Hans de Goede 2015-04-30 12:59:58 UTC
Hi,

Thanks for the bug report.

This should be fixed by the following packages which should be in the next rawhide compose:

-xorg-x11-xinit-1.3.4-8.fc23

This one fixes "startx -- vt2" not working when you type this while actually on vt2

xorg-x11-server-1.17.1-10.fc23

This one fixes "startx -- vt7" not working when you type this while not on vt7

Note btw that startx now does the 'tty magic' itself, and will set things up so that the Xorg process is not running as root, where as doing "startx -- vt2" manually (while on vt2) will run Xorg as root.

"startx -- vt7" while not on vt7 will allways run Xorg as root as opening a new vt requires root rights.

Please let me know if these builds fix your issue.

Regards,

Hans

Comment 6 Fedora Update System 2015-05-11 14:59:17 UTC
xorg-x11-xinit-1.3.4-8.fc22,xorg-x11-server-1.17.1-11.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/xorg-x11-xinit-1.3.4-8.fc22,xorg-x11-server-1.17.1-11.fc22

Comment 7 Fedora Update System 2015-05-11 19:03:51 UTC
Package xorg-x11-xinit-1.3.4-8.fc22, xorg-x11-server-1.17.1-11.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xorg-x11-xinit-1.3.4-8.fc22 xorg-x11-server-1.17.1-11.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-7981/xorg-x11-xinit-1.3.4-8.fc22,xorg-x11-server-1.17.1-11.fc22
then log in and leave karma (feedback).

Comment 8 Orion Poplawski 2015-05-12 14:33:00 UTC
This (xorg-x11-server-Xorg-1.17.1-10) has broken my use of Xorg w/dummy for testing in koji builds:

+ /usr/libexec/Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99
+ ctest -V -E octave
X.Org X Server 1.17.1
Release Date: 2015-02-10
X Protocol Version 11, Revision 0
Build Operating System:  3.19.1-201.fc21.x86_64 
Current Operating System: Linux buildvm-10.phx2.fedoraproject.org 3.19.1-201.fc21.x86_64 #1 SMP Wed Mar 18 04:29:24 UTC 2015 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.19.1-201.fc21.x86_64 root=UUID=07fbcf83-52d5-41f3-b1ed-d40657677039 ro console=ttyS0 LANG=en_US.UTF-8
Build Date: 30 April 2015  12:28:00PM
Build ID: xorg-x11-server 1.17.1-10.fc23 
Current version of pixman: 0.32.6
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "./xorg.log", Time: Thu Apr 30 16:08:25 2015
(++) Using config file: "./xorg.conf"
(++) Using config directory: "."
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) 
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)

Is there some other way I should be starting this now?

Comment 9 Hans de Goede 2015-05-12 14:57:45 UTC
Hi,

(In reply to Orion Poplawski from comment #8)
> This (xorg-x11-server-Xorg-1.17.1-10) has broken my use of Xorg w/dummy for
> testing in koji builds:
> 
> + /usr/libexec/Xorg -noreset +extension GLX +extension RANDR +extension
> RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . :99
> + ctest -V -E octave
> X.Org X Server 1.17.1
> Release Date: 2015-02-10
> X Protocol Version 11, Revision 0
> Build Operating System:  3.19.1-201.fc21.x86_64 
> Current Operating System: Linux buildvm-10.phx2.fedoraproject.org
> 3.19.1-201.fc21.x86_64 #1 SMP Wed Mar 18 04:29:24 UTC 2015 x86_64
> Kernel command line: BOOT_IMAGE=/vmlinuz-3.19.1-201.fc21.x86_64
> root=UUID=07fbcf83-52d5-41f3-b1ed-d40657677039 ro console=ttyS0
> LANG=en_US.UTF-8
> Build Date: 30 April 2015  12:28:00PM
> Build ID: xorg-x11-server 1.17.1-10.fc23 
> Current version of pixman: 0.32.6
> 	Before reporting problems, check http://wiki.x.org
> 	to make sure that you have the latest version.
> Markers: (--) probed, (**) from config file, (==) default setting,
> 	(++) from command line, (!!) notice, (II) informational,
> 	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
> (++) Log file: "./xorg.log", Time: Thu Apr 30 16:08:25 2015
> (++) Using config file: "./xorg.conf"
> (++) Using config directory: "."
> (==) Using system config directory "/usr/share/X11/xorg.conf.d"
> (EE) 
> Fatal server error:
> (EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)

Oops, that is unexpected side effect of the fix, I'll try to whip up a fixed fix tomorrow. In the mean time I've stopped the update from going to stable (it had gathered enough karma rather quickly). I'm going to leave it in testing to see if any other unexpected surprises show up.

Regards,

Hans

Comment 10 Fedora Update System 2015-05-12 20:44:25 UTC
xorg-x11-xinit-1.3.4-8.fc22, xorg-x11-server-1.17.1-11.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Hans de Goede 2015-05-13 07:17:09 UTC
(In reply to Fedora Update System from comment #10)
> xorg-x11-xinit-1.3.4-8.fc22, xorg-x11-server-1.17.1-11.fc22 has been pushed
> to the Fedora 22 stable repository.  If problems still persist, please make
> note of it in this bug report.

Hmm, that was not supposed to happen I told bodhi to not auto-push and withdraw the pending push reequest because of comment 8. Ah well I'll just do another update fixing this.

Comment 12 Hans de Goede 2015-05-13 11:49:20 UTC
(In reply to Orion Poplawski from comment #8)
> This (xorg-x11-server-Xorg-1.17.1-10) has broken my use of Xorg w/dummy for
> testing in koji builds:

I've started a scratch-build with a fixed fix in there, can you give it a try please and confirm that your use-case does work with this build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=9722031

Thanks,

Hans

Comment 13 Orion Poplawski 2015-05-18 19:13:59 UTC
(In reply to Hans de Goede from comment #12)
> I've started a scratch-build with a fixed fix in there, can you give it a
> try please and confirm that your use-case does work with this build:

Yes, that works.  Thanks!

Comment 14 Hans de Goede 2015-05-19 08:14:20 UTC
(In reply to Orion Poplawski from comment #13)
> (In reply to Hans de Goede from comment #12)
> > I've started a scratch-build with a fixed fix in there, can you give it a
> > try please and confirm that your use-case does work with this build:
> 
> Yes, that works.  Thanks!

Thanks for testing this. I've send a new version of the patches in question upstream, and I'll start an official build with the fixed patches right away.

Comment 15 Fedora Update System 2015-05-19 08:43:59 UTC
xorg-x11-server-1.17.1-12.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/xorg-x11-server-1.17.1-12.fc22

Comment 16 Fedora Update System 2015-05-26 03:19:04 UTC
xorg-x11-server-1.17.1-12.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


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