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 1278757 - [RFE] - handle SIGTERM in rteval as end of run
Summary: [RFE] - handle SIGTERM in rteval as end of run
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rteval
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.3
Assignee: Luis Claudio R. Goncalves
QA Contact: Jiri Kastner
Maxim Svistunov
URL:
Whiteboard:
Depends On:
Blocks: 1274397 RT7.3-Prio 1313485
TreeView+ depends on / blocked
 
Reported: 2015-11-06 11:07 UTC by Jiri Kastner
Modified: 2016-11-04 01:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
The rteval program program now treats both SIGINT and SIGTERM as stop events and preserves all the data that has been gathered up to the event.
Clone Of:
Environment:
Last Closed: 2016-11-04 01:34:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2244 0 normal SHIPPED_LIVE rteval bug fix and enhancement update 2016-11-03 13:29:41 UTC

Description Jiri Kastner 2015-11-06 11:07:21 UTC
Description of problem:
when ctrl+c is pressed, rteval return traceback and all gathered data are lost. currently 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
[root@mrg-qe-14 ~]# date
Fri Nov  6 11:41:16 CET 2015
[root@mrg-qe-14 ~]# rteval -d 20m
rteval run on 3.10.0-327.rt56.204.el7.x86_64 started at Fri Nov  6 11:41:29 2015
started 2 loads on 6 cores
Run duration: 1200.0 seconds
^C[root@mrg-qe-14 ~]# 


Expected results:
when ctrl+c is pressed, or rteval receive sigkill or sigterm signal, we should see results

Additional info:

Comment 3 Clark Williams 2016-03-29 17:42:30 UTC
This proposed patch changes run behavior to treat both SIGINT and SIGTERM as stop events. Is this what you're looking for?

diff --git a/rteval/__init__.py b/rteval/__init__.py
index 8ff8429277de..15209da2e7b2 100644
--- a/rteval/__init__.py
+++ b/rteval/__init__.py
@@ -24,7 +24,7 @@
 #
 
 """
-Copyright (c) 2008-2013  Red Hat Inc.
+Copyright (c) 2008-2016  Red Hat Inc.
 
 Realtime verification utility
 """
@@ -44,17 +44,15 @@ import version
 
 RTEVAL_VERSION = version.RTEVAL_VERSION
 
-sigint_received = False
+stopsig_received = False
 def sig_handler(signum, frame):
 
-    if signum == signal.SIGINT:
-        global sigint_received
-        sigint_received = True
-        print "*** SIGINT received - stopping rteval run ***"
-    elif signum == signal.SIGTERM:
-        raise RuntimeError("SIGTERM received!")
-
-
+    if signum == signal.SIGINT or signum == signal.SIGTERM:
+        global stopsig_received
+        stopsig_received = True
+        print "*** stop signal received - stopping rteval run ***"
+    else:
+        raise RuntimeError("SIGNAL received! (%d)" % signum)
 
 class RtEval(rtevalReport):
     def __init__(self, config, loadmods, measuremods, logger):
@@ -209,7 +207,7 @@ sigint_received = False
             currtime = time.time()
             rpttime = currtime + report_interval
             load_avg_checked = 5
-            while (currtime <= stoptime) and not sigint_received:
+            while (currtime <= stoptime) and not stopsig_received:
                 time.sleep(60.0)
                 if not measure_profile.isAlive():
                     stoptime = currtime

Comment 8 errata-xmlrpc 2016-11-04 01:34:06 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-2016-2244.html


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