Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 644350

Summary: Timing issue in systemtap initscript restart command
Product: Red Hat Enterprise Linux 5 Reporter: Petr Muller <pmuller>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: dsmith, mjw, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemtap-1.3-5.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 624657 Environment:
Last Closed: 2011-07-21 11:11:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Muller 2010-10-19 14:10:21 UTC
+++ This bug was initially created as a clone of Bug #624657 +++

Description of problem:
Our Beaker test for the initscript sometimes fails to restart the service when some script is running. When investigating this issue, I've found out this is probably a timing issue: if I add a slight lag (like, sleep 3) between 'stop' and 'start' calls in 'restart' function, the issue disappears.

Version-Release number of selected component (if applicable):
systemtap-initscript-1.3-2.el5

How reproducible:
On some boxes, not always. When it appears, it is usually reproducible.

Steps to Reproduce:
1. cat > /etc/systemtap/script.d/heart.stp << EOF
> probe timer.ms(500){
>   print("Beat!\n");
> }
> EOF
2. # service systemtap start; sleep 1; service systemtap restart;
  
Actual results:
Starting systemtap:  Compiling heart ... done
 Starting heart ... done
                                                           [  OK  ]
Stopping systemtap:                                        [  OK  ]
Starting systemtap: heart is dead, but another script is running.
                                                           [FAILED]

Expected results:
Starting systemtap: [  OK  ]
Stopping systemtap: [  OK  ]
Starting systemtap:  Compiling heart ... done
 Starting heart ... done
[  OK  ]

Additional info:

Comment 1 Frank Ch. Eigler 2010-11-12 16:05:34 UTC
patch in hand (upstream commit 3c568395)

Comment 2 Frank Ch. Eigler 2010-11-12 16:07:21 UTC
Sorry, I take that back, only bug #607232 was associated with that commit.
We'll continue investigating.

Comment 3 David Smith 2011-01-27 22:50:40 UTC
Like bug #624657, upstream commit 671a1d8 fixes this problem.  Note that like bug #624657, the following setup step is need to get this bug to appear:

# echo "heart_OPT='-o /tmp/stap-test.log'" > /etc/systemtap/conf.d/heart.conf

Commit 671a1d8 applies cleanly to the 1.3 source.

<http://sources.redhat.com/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=671a1d824ff1320f9e2fa3ed27d5458cc44a5dcc>

Comment 6 errata-xmlrpc 2011-07-21 11:11:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1044.html