Bug 841496 - Subscription manager bash-completions prevents gdm from starting
Subscription manager bash-completions prevents gdm from starting
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Bryan Kearney
Entitlement Bugs
: Reopened
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-07-19 03:54 EDT by Karel Piwko
Modified: 2013-02-21 03:55 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:55:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Latest version of the file. (5.38 KB, application/x-shellscript)
2012-12-13 10:15 EST, Bryan Kearney
no flags Details

  None (edit)
Description Karel Piwko 2012-07-19 03:54:04 EDT
Description of problem:

When updating from RHEL 6.2 to RHEL 6.3, system does not boot into graphical UI anymore.


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


How reproducible:

Always.

Steps to Reproduce:
1. Have a RHEL 6.2 machine with subscription manager updated to RHEL 6.3 (or basically RHEL 6.3 machine as well)
2. Have bash-completion enabled
3. Boot the machine
  
Actual results:

Blank screen.

Expected results:

GDM login screen.

Additional info:

Following messages are written in /var/log/messages:

Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3010) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3063) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3085) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3101) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3117) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3133) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3149) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3165) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3181) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process (3197) terminated with status 2
Jul 18 18:27:09 kapy-ntb-x220 init: prefdm main process ended, respawning

This basically means that:

/etc/X11/prefdm has something wrong inside, tracking /usr/sbin/gdm shows that import of /etc/profile fails with error code 2.

This is caused by bash completion enabled for subscription manager and gdm running in /bin/sh shell:

sh-4.1$ . /etc/bash_completion.d/subscription-manager
sh: `_subscription-manager_list': not a valid identifier
sh: `_subscription-manager_refresh': not a valid identifier
sh: `_subscription-manager_register': not a valid identifier
sh: `_subscription-manager_subscribe': not a valid identifier
sh: `_subscription-manager_unregister': not a valid identifier
sh: `_subscription-manager_unsubscribe': not a valid identifier
sh: `_subscription-manager_clean': not a valid identifier
sh: `_subscription-manager_config': not a valid identifier
sh: `_subscription-manager_environments': not a valid identifier
sh: `_subscription-manager_facts': not a valid identifier
sh: `_subscription-manager_identity': not a valid identifier
sh: `_subscription-manager_import': not a valid identifier
sh: `_subscription-manager_orgs': not a valid identifier
sh: `_subscription-manager_redeem': not a valid identifier
sh: `_subscription-manager_release': not a valid identifier
sh: `_subscription-manager_repos': not a valid identifier
sh: `_subscription-manager_service-level': not a valid identifier
sh: `_subscription-manager': not a valid identifier

Removing /etc/bash_completion.d/subscription_manager fixes the gdm startup.
Comment 2 Bryan Kearney 2012-11-09 17:04:20 EST
how do I enable bash completion?
Comment 3 Bryan Kearney 2012-11-12 13:42:17 EST
I installed a 6.2 machine, and upgraded to 6.3 I was not able to reproduce. In addition, I took a RHEl 6.2 machine and then applied:

subscription-manager-0.99.19-1.el6.x86_64
subscription-manager-firstboot-0.99.19-1.el6.x86_64
subscription-manager-gnome-0.99.19-1.el6.x86_64


and rebooted. Was no able to reproduce.
Comment 4 Karel Piwko 2012-11-13 06:44:25 EST
Bryan, you need to install bash completion package.

yum install bash-completion

Obviously, without bash completion it works fine.
Comment 5 Bryan Kearney 2012-12-04 16:02:52 EST
are you using sh instead of bash?
Comment 6 Karel Piwko 2012-12-10 03:01:19 EST
Well, yes. But it is not my intention, /bin/sh instead of /bin/bash is used in GDM/Xorg start scripts.
Comment 7 Bryan Kearney 2012-12-12 15:45:53 EST
This is what I attempted in order to recreate the problem. Please let me know if this is different from your steps:

1) Install the GOLD copy of the RHEL 6.2.
2) Install the bash-completion from epel (1.3.5.el6) 
3) Install the subscripition-manager from 6.3 (0.99.19-1)
4) reboot

Given that 4 works, I assume I can not recreate it.
Comment 9 Bryan Kearney 2012-12-13 10:15:59 EST
Created attachment 663013 [details]
Latest version of the file.
Comment 10 Bryan Kearney 2012-12-13 10:16:42 EST
Spoke with Karel, and we agreed that if the file can be sourced under sh then this bug would be fixed. The patch is submitted upstream at

https://github.com/candlepin/subscription-manager/pull/454
Comment 11 Bryan Kearney 2012-12-13 14:10:56 EST
commit 957f409233b8501fa05a1b460c94aaf489626caa
Author: Bryan Kearney <bkearney@redhat.com>
Date:   Thu Dec 13 09:43:25 2012 -0500

    841496: Do not use hyphens in bash completion files as these are invalid for identifiers in the sh shell.
Comment 12 Karel Piwko 2012-12-14 03:04:19 EST
Latest version of the file makes possible to reboot into graphical environment and bash completion works fine. Thanks for fixing that!
Comment 14 J.C. Molet 2012-12-18 15:08:50 EST
subscription-manager-1.1.16-1.el6.x86_64

Testing with the above version, I have not been able to reproduce this bug with bash-completion installed.  GDM starts as normal.

Marking VERIFIED.
Comment 16 errata-xmlrpc 2013-02-21 03:55:26 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0350.html

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