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 1242061 - race condition in gnome-welcome-tour may prevent getting-started invocation
Summary: race condition in gnome-welcome-tour may prevent getting-started invocation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-initial-setup
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Matthias Clasen
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-10 19:27 UTC by Vladimir Benes
Modified: 2015-11-19 08:28 UTC (History)
3 users (show)

Fixed In Version: gnome-initial-setup-3.14.4-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 08:28:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2157 0 normal SHIPPED_LIVE control-center bug fix and enhancement update 2015-11-19 08:48:59 UTC

Description Vladimir Benes 2015-07-10 19:27:14 UTC
Description of problem:
In gnome-initial-setup there is a script that's executed after new user is created. /usr/libexec/gnome-welcome-tour.

#! /bin/sh

cfgdir=${XDG_CONFIG_DIR:-$HOME/.config}

rm -f $cfgdir/run-welcome-tour

# Don't do anything if yelp isn't installed
yelp_path=$(which yelp 2>/dev/null)
if test -z "${yelp_path}"; then
    exit
fi

if [ ! -d $cfgdir/yelp ]; then
        mkdir $cfgdir/yelp
        cat <<EOF >>$cfgdir/yelp/yelp.cfg
[documents/help%3Agnome-help]
geometry=(1024, 709)
EOF
fi

yelp help:gnome-help/getting-started


I think this part:
cfgdir=${XDG_CONFIG_DIR:-$HOME/.config}

can be in some cases started too soon and cfgdir variable is not set and thus script crashes and thus yelp with getting started documentation is not executed.

I've added sleep 1 to the beginning of the script and it seems to help.t

Version-Release number of selected component (if applicable):
gnome-shell-3.14.4-13.el7.x86_64
gdm-3.14.2-5.el7.x86_64
gnome-initial-setup-3.14.4-1.el7.x86_64

How reproducible:
50% in automation

Steps to Reproduce:
1.delete all users and start gdm service
2.select lenguage, keyboard, timezone
3.add user and password
4.start using RHEL

Actual results:
sometimes, yelp is not shown

Expected results:
yelp should be always shown

Additional info:

Comment 2 Matthias Clasen 2015-07-13 11:13:59 UTC
I'm not sure I understand.
"The script crashes" means what exactly ?
What line fails, and in what way ?

Comment 3 Vladimir Benes 2015-07-13 11:55:36 UTC
(In reply to Matthias Clasen from comment #2)
> I'm not sure I understand.
we were debugging this with Rui and he was quite confused as well but this prevents yelp to be started very likely because of undefined variable here 
cfgdir=${XDG_CONFIG_DIR:-$HOME/.config}

> "The script crashes" means what exactly ?
the script very likely just exits sooner. We tried to add printfs into every single line and it exited just in the middle see:
http://fpaste.org/242674/14365366/ (line 308)

> What line fails, and in what way ?
the script was like this
http://fpaste.org/243768/88195143/

adding 2 seconds to the beginning of the script was just enough to make it passing. Not sure what was wrong. But it seems like same race condition that can be fixed with just a second or two just after /bin/sh line

Comment 4 Matthias Clasen 2015-07-15 14:48:31 UTC
Ray and I looked at this today, and reproduced the problem in two ways by tweaking the gnome-welcome-tour script:

1) adding a sufficient sleep after the rm -rf ~/.config/run-welcome-tour

2) changing the yelp call at the end to exec yelp ...

The race condition here is between the script removing the run-welcome-tour and then proceeding to launch yelp, and gnome-session monitoring the existence of the run-welcome-tour file and killing the autostarted script when the file disappears.

A simple fix is to delay removing the run-welcome-tour file until yelp is launched.

Comment 6 Vladimir Benes 2015-07-17 13:20:28 UTC
Working well now, no failure in ~80 times executed user add test. Thanks!

Comment 7 Tomas Pelka 2015-09-17 12:11:47 UTC
Moving to verified based on c6.

Comment 9 errata-xmlrpc 2015-11-19 08:28:33 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.

https://rhn.redhat.com/errata/RHBA-2015-2157.html


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