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 841496 - Subscription manager bash-completions prevents gdm from starting
Summary: Subscription manager bash-completions prevents gdm from starting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771481
TreeView+ depends on / blocked
 
Reported: 2012-07-19 07:54 UTC by Karel Piwko
Modified: 2013-02-21 08:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 08:55:26 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0350 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-02-20 20:53:35 UTC

Description Karel Piwko 2012-07-19 07:54:04 UTC
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 22:04:20 UTC
how do I enable bash completion?

Comment 3 Bryan Kearney 2012-11-12 18:42:17 UTC
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 11:44:25 UTC
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 21:02:52 UTC
are you using sh instead of bash?

Comment 6 Karel Piwko 2012-12-10 08:01:19 UTC
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 20:45:53 UTC
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 15:15:59 UTC
Created attachment 663013 [details]
Latest version of the file.

Comment 10 Bryan Kearney 2012-12-13 15:16:42 UTC
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 19:10:56 UTC
commit 957f409233b8501fa05a1b460c94aaf489626caa
Author: Bryan Kearney <bkearney>
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 08:04:19 UTC
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 20:08:50 UTC
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 08:55:26 UTC
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.