Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1046190

Summary: [VMware 6.5 BUG]:RHEL6.5 initctl start/stop cause xorg coredump and user logging out
Product: Red Hat Enterprise Linux 6 Reporter: shiyao <shiyaoy>
Component: upstartAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: high    
Version: 6.5CC: agspoon, ayadav, bsarathy, jsavanyo, lnykryn, psklenar, shiyaoy, vmware-gos-qa
Target Milestone: rcKeywords: ZStream
Target Release: ---Flags: shiyaoy: needinfo-
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: upstart-0.6.5-15.el6 Doc Type: Bug Fix
Doc Text:
Cause: Upstart was resetting the console to defaults not only for jobs with "console owner", but also for "console output". Consequence: When stopping a service with natice upstart job and "console output" settings, xorg coredumped. Fix: Upstart is now resetting the console to defaults only for jobs with "console owner".
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-22 07:15:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1070830, 1073330    
Attachments:
Description Flags
xorg coredump under /var/spool/abrt
none
/var/log/messages none

Description shiyao 2013-12-24 02:46:09 UTC
Description of problem:
initctl start a job with "console output" in its conf file will cause xorg coredump and user logging out

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
It's a clean rhel6.5 virtual machine.
1. Create a script
#cat /root/shiyao
echo "shiyao: $1" >> /tmp/shiyao
#
2.Then created a job:
#cat /etc/init/shiyao.conf
console output

pre-start exec sh /root/shiyao start
pre-stop exec sh /root/shiyao stop
#
3.Running "initctl start shiyao" 

Actual results:
It will cause the user logging out and xorg coredump .

Expected results:
User will not log out.

Additional info:

Comment 1 shiyao 2013-12-24 02:49:00 UTC
I'm not sure if it's an upstart issue or an xorg issue. Anyway, thanks for looking at this issue.

Comment 3 shiyao 2013-12-24 04:56:30 UTC
Created attachment 841062 [details]
xorg coredump under /var/spool/abrt

Comment 4 shiyao 2013-12-24 05:00:01 UTC
Created attachment 841064 [details]
/var/log/messages

Comment 5 shiyao 2013-12-24 05:10:32 UTC
Version-Release number of selected component (if applicable):
# rpm -qa|grep upstart
upstart-0.6.5-12.el6_4.1.x86_64
# rpm -qa|grep xorg
xorg-x11-drv-wacom-0.16.1-4.el6.x86_64
xorg-x11-drv-voodoo-1.2.5-3.el6.x86_64
xorg-x11-drv-sis-0.10.7-2.el6.x86_64
xorg-x11-drv-openchrome-0.3.0-3.20120806git.el6.x86_64
xorg-x11-drv-i740-1.3.4-5.el6.x86_64
xorg-x11-drv-cirrus-1.5.1-2.el6.x86_64
xorg-x11-drv-nouveau-1.0.1-4.el6.x86_64
xorg-x11-drv-vesa-2.3.2-4.el6.x86_64
xorg-x11-fonts-misc-7.2-9.1.el6.noarch
xorg-x11-drv-tdfx-1.4.5-2.el6.x86_64
xorg-x11-drv-r128-6.9.1-1.el6.x86_64
xorg-x11-drv-mga-1.6.1-10.el6.x86_64
xorg-x11-drv-fbdev-0.4.3-2.el6.x86_64
xorg-x11-drivers-7.3-13.4.el6.x86_64
xorg-x11-server-common-1.13.0-18.el6.x86_64
xorg-x11-fonts-Type1-7.2-9.1.el6.noarch
xorg-x11-xauth-1.0.2-7.1.el6.x86_64
xorg-x11-xinit-1.0.9-14.el6.x86_64
xorg-x11-font-utils-7.2-11.el6.x86_64
xorg-x11-drv-evdev-2.7.3-5.el6.x86_64
xorg-x11-fonts-ISO8859-1-100dpi-7.2-9.1.el6.noarch
xorg-x11-drv-vmmouse-12.9.0-10.el6.x86_64
xorg-x11-drv-synaptics-1.6.2-13.el6.x86_64
xorg-x11-drv-savage-2.3.6-2.el6.x86_64
xorg-x11-drv-qxl-0.1.0-7.el6.x86_64
xorg-x11-drv-mutouch-1.3.0-4.el6.x86_64
xorg-x11-drv-mach64-6.9.3-4.1.el6_4.x86_64
xorg-x11-drv-hyperpen-1.4.1-4.el6.x86_64
xorg-x11-drv-elographics-1.4.1-2.el6.x86_64
xorg-x11-drv-apm-1.2.5-5.el6.x86_64
xorg-x11-drv-ati-firmware-7.1.0-1.el6.noarch
xorg-x11-drv-ati-7.1.0-1.el6.x86_64
xorg-x11-utils-7.5-6.el6.x86_64
xorg-x11-xkb-utils-7.7-4.el6.x86_64
xorg-x11-server-Xorg-1.13.0-18.el6.x86_64
xorg-x11-fonts-100dpi-7.2-9.1.el6.noarch
xorg-x11-drv-xgi-1.6.0-18.20121114git.el6.x86_64
xorg-x11-drv-v4l-0.2.0-6.el6.x86_64
xorg-x11-drv-sisusb-0.9.6-2.el6.x86_64
xorg-x11-drv-s3virge-1.10.6-2.el6.x86_64
xorg-x11-drv-penmount-1.5.0-4.el6.x86_64
xorg-x11-drv-mouse-1.8.1-7.el6.x86_64
xorg-x11-drv-keyboard-1.6.2-7.el6.x86_64
xorg-x11-drv-glint-1.2.8-3.el6.x86_64
xorg-x11-drv-dummy-0.3.6-2.el6.x86_64
xorg-x11-drv-aiptek-1.4.1-4.el6.x86_64
xorg-x11-drv-void-1.4.0-3.el6.x86_64
xorg-x11-drv-trident-1.3.6-4.el6.x86_64
xorg-x11-drv-rendition-4.2.5-2.el6.x86_64
xorg-x11-drv-modesetting-0.5.0-1.el6.x86_64
xorg-x11-drv-fpit-1.4.0-5.el6.x86_64
xorg-x11-drv-acecad-1.5.0-6.el6.x86_64
xorg-x11-glamor-0.5.0-6.20130401git81aadb8.el6.x86_64
xorg-x11-server-utils-7.5-13.el6.x86_64
xorg-x11-drv-vmware-12.0.2-3.20120718gite5ac80d8f.el6.x86_64
xorg-x11-drv-siliconmotion-1.7.7-2.el6.x86_64
xorg-x11-drv-nv-2.1.20-4.el6.x86_64
xorg-x11-drv-i128-1.3.6-3.el6.x86_64
xorg-x11-drv-ast-0.97.0-2.el6.x86_64
xorg-x11-drv-intel-2.21.12-2.el6.x86_64

==========================================
RHEL6.4 didn't hit this issue.


Thanks,
Shiyao

Comment 6 Craig 2014-01-17 22:36:13 UTC
(In reply to shiyao from comment #5)
> Version-Release number of selected component (if applicable):
> # rpm -qa|grep upstart
> upstart-0.6.5-12.el6_4.1.x86_64
> # rpm -qa|grep xorg
> xorg-x11-drv-wacom-0.16.1-4.el6.x86_64
> xorg-x11-drv-voodoo-1.2.5-3.el6.x86_64
> xorg-x11-drv-sis-0.10.7-2.el6.x86_64
> xorg-x11-drv-openchrome-0.3.0-3.20120806git.el6.x86_64
> xorg-x11-drv-i740-1.3.4-5.el6.x86_64
> xorg-x11-drv-cirrus-1.5.1-2.el6.x86_64
> xorg-x11-drv-nouveau-1.0.1-4.el6.x86_64
> xorg-x11-drv-vesa-2.3.2-4.el6.x86_64
> xorg-x11-fonts-misc-7.2-9.1.el6.noarch
> xorg-x11-drv-tdfx-1.4.5-2.el6.x86_64
> xorg-x11-drv-r128-6.9.1-1.el6.x86_64
> xorg-x11-drv-mga-1.6.1-10.el6.x86_64
> xorg-x11-drv-fbdev-0.4.3-2.el6.x86_64
> xorg-x11-drivers-7.3-13.4.el6.x86_64
> xorg-x11-server-common-1.13.0-18.el6.x86_64
> xorg-x11-fonts-Type1-7.2-9.1.el6.noarch
> xorg-x11-xauth-1.0.2-7.1.el6.x86_64
> xorg-x11-xinit-1.0.9-14.el6.x86_64
> xorg-x11-font-utils-7.2-11.el6.x86_64
> xorg-x11-drv-evdev-2.7.3-5.el6.x86_64
> xorg-x11-fonts-ISO8859-1-100dpi-7.2-9.1.el6.noarch
> xorg-x11-drv-vmmouse-12.9.0-10.el6.x86_64
> xorg-x11-drv-synaptics-1.6.2-13.el6.x86_64
> xorg-x11-drv-savage-2.3.6-2.el6.x86_64
> xorg-x11-drv-qxl-0.1.0-7.el6.x86_64
> xorg-x11-drv-mutouch-1.3.0-4.el6.x86_64
> xorg-x11-drv-mach64-6.9.3-4.1.el6_4.x86_64
> xorg-x11-drv-hyperpen-1.4.1-4.el6.x86_64
> xorg-x11-drv-elographics-1.4.1-2.el6.x86_64
> xorg-x11-drv-apm-1.2.5-5.el6.x86_64
> xorg-x11-drv-ati-firmware-7.1.0-1.el6.noarch
> xorg-x11-drv-ati-7.1.0-1.el6.x86_64
> xorg-x11-utils-7.5-6.el6.x86_64
> xorg-x11-xkb-utils-7.7-4.el6.x86_64
> xorg-x11-server-Xorg-1.13.0-18.el6.x86_64
> xorg-x11-fonts-100dpi-7.2-9.1.el6.noarch
> xorg-x11-drv-xgi-1.6.0-18.20121114git.el6.x86_64
> xorg-x11-drv-v4l-0.2.0-6.el6.x86_64
> xorg-x11-drv-sisusb-0.9.6-2.el6.x86_64
> xorg-x11-drv-s3virge-1.10.6-2.el6.x86_64
> xorg-x11-drv-penmount-1.5.0-4.el6.x86_64
> xorg-x11-drv-mouse-1.8.1-7.el6.x86_64
> xorg-x11-drv-keyboard-1.6.2-7.el6.x86_64
> xorg-x11-drv-glint-1.2.8-3.el6.x86_64
> xorg-x11-drv-dummy-0.3.6-2.el6.x86_64
> xorg-x11-drv-aiptek-1.4.1-4.el6.x86_64
> xorg-x11-drv-void-1.4.0-3.el6.x86_64
> xorg-x11-drv-trident-1.3.6-4.el6.x86_64
> xorg-x11-drv-rendition-4.2.5-2.el6.x86_64
> xorg-x11-drv-modesetting-0.5.0-1.el6.x86_64
> xorg-x11-drv-fpit-1.4.0-5.el6.x86_64
> xorg-x11-drv-acecad-1.5.0-6.el6.x86_64
> xorg-x11-glamor-0.5.0-6.20130401git81aadb8.el6.x86_64
> xorg-x11-server-utils-7.5-13.el6.x86_64
> xorg-x11-drv-vmware-12.0.2-3.20120718gite5ac80d8f.el6.x86_64
> xorg-x11-drv-siliconmotion-1.7.7-2.el6.x86_64
> xorg-x11-drv-nv-2.1.20-4.el6.x86_64
> xorg-x11-drv-i128-1.3.6-3.el6.x86_64
> xorg-x11-drv-ast-0.97.0-2.el6.x86_64
> xorg-x11-drv-intel-2.21.12-2.el6.x86_64
> 
> ==========================================
> RHEL6.4 didn't hit this issue.
> 
> 
> Thanks,
> Shiyao

We have run into this too.  Tracked it down to the latest update of the upstart package (upstart-0.6.5-12.el6_4.1).  This release added the patch "upstart-0.6.5-echo.patch" as documented here - http://rhn.redhat.com/errata/RHBA-2013-0971.html

The end result of this patch is that if you include the "console output|owner" directive in an init file, it causes upstart to "reset" the console to "sane" values.  Xorg is normally running on tty1 and is somehow plumbed to the console (I don't know how).  When the tty settings get changed, a "return" becomes a SIGQUIT signal, and other characters send other signals.  The end result is that Xorg exits, and dumps the user out.

Reverting this package update (upstart) fixes this issue (though others may remain as described in the errata).

I don't have any suggestions as to how to resolve this, but it seems tied to the fact that /dev/console and /dev/tty1 are somehow linked.

Craig

Comment 7 Lukáš Nykrýn 2014-01-23 14:43:44 UTC
*** Bug 1043775 has been marked as a duplicate of this bug. ***

Comment 8 Lukáš Nykrýn 2014-01-23 14:47:32 UTC
I am not sure what to do with this one. Xorg should not crash, so for now I will reassign this to them to get their opinion, but I will still try to investigate if this is possible to fix on upstart side.

Comment 9 Lukáš Nykrýn 2014-01-23 16:31:56 UTC
Hmm actually solution could be quite easy, but I still that someone from Xorg should look at this. Meanwhile lets try this fix in upstart, from my quick testing it looks that it fixes the issue and does not brake the use-case from 746801. Can you please also try it?

http://lnykryn.fedorapeople.org/upstart/

From 245f3d3e796169650d561de63a985f21c672bdc7 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn>
Date: Thu, 23 Jan 2014 16:00:37 +0100
Subject: [PATCH] aaaa

---
 init/system.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/init/system.c b/init/system.c
index 7f88863..fa93095 100644
--- a/init/system.c
+++ b/init/system.c
@@ -113,9 +113,10 @@ system_setup_console (ConsoleType type,
 		if (fd < 0)
 			nih_return_system_error (-1);
 
-		if (type == CONSOLE_OWNER)
+		if (type == CONSOLE_OWNER) {
 			ioctl (fd, TIOCSCTTY, 1);
-		reset = 1;
+			reset = 1;
+		}
 		break;
 	case CONSOLE_NONE:
 		/* No console really means /dev/null */
-- 
1.8.4.2

Comment 10 shiyao 2014-01-24 06:17:23 UTC
(In reply to Lukáš Nykrýn from comment #9)
> Hmm actually solution could be quite easy, but I still that someone from
> Xorg should look at this. Meanwhile lets try this fix in upstart, from my
> quick testing it looks that it fixes the issue and does not brake the
> use-case from 746801. Can you please also try it?
> 
> http://lnykryn.fedorapeople.org/upstart/
> 
> From 245f3d3e796169650d561de63a985f21c672bdc7 Mon Sep 17 00:00:00 2001
> From: Lukas Nykryn <lnykryn>
> Date: Thu, 23 Jan 2014 16:00:37 +0100
> Subject: [PATCH] aaaa
> 
> ---
>  init/system.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/init/system.c b/init/system.c
> index 7f88863..fa93095 100644
> --- a/init/system.c
> +++ b/init/system.c
> @@ -113,9 +113,10 @@ system_setup_console (ConsoleType type,
>  		if (fd < 0)
>  			nih_return_system_error (-1);
>  
> -		if (type == CONSOLE_OWNER)
> +		if (type == CONSOLE_OWNER) {
>  			ioctl (fd, TIOCSCTTY, 1);
> -		reset = 1;
> +			reset = 1;
> +		}
>  		break;
>  	case CONSOLE_NONE:
>  		/* No console really means /dev/null */
> -- 
> 1.8.4.2


Hi Lukáš,

Thanks for your reply. I tried upstart-0.6.5-13.el6.1.x86_64.rpm in your link, but the problem still exists.

Any input followed by pressing ENTER in the terminal after "initctl start/stop shiyao" will cause user logging out.

Thanks,
Shiyao

Comment 11 Lukáš Nykrýn 2014-01-24 11:58:55 UTC
Hmm that is weird, with your exact reproducer it appears to be fixed on my machine. Have you rebooted the machine after upgrade? Because if I am not mistaken the version of upstart in rhel does not support re-execution of the init.

Comment 12 shiyao 2014-02-04 11:08:46 UTC
Sorry for delay since I'm on PTO. 
Yes I didn't reboot the system so I saw the bug again. After rebooting, the bug didn't appear any more. Many Thanks!

Thanks,
Shiyao

Comment 13 Lukáš Nykrýn 2014-02-07 09:39:58 UTC
Thanks for testing!