Bug 1731336

Summary: svsematest command report error "Could not access /sys/kernel/debug/tracing/tracing_enabled"
Product: Red Hat Enterprise Linux 8 Reporter: Qiao Zhao <qzhao>
Component: rt-testsAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: Chang Yin <cyin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: bhu, cyin, rt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 20:35:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1696402    
Attachments:
Description Flags
change tracing_enabled to tracing_on where needed none

Description Qiao Zhao 2019-07-19 07:27:27 UTC
Description of problem:

Running rt-tests builtin command:
# svsematest -a -b 20us -f -i 100 -l 100 -S
#0: ID3174, P0, CPU0, I100; #1: ID3175, P0, CPU0, Cycles 100
#2: ID3176, P0, CPU1, I600; #3: ID3177, P0, CPU1, Cycles 13
#4: ID3178, P0, CPU2, I1100; #5: ID3179, P0, CPU2, Cycles 100
#6: ID3180, P0, CPU3, I1600; #7: ID3181, P0, CPU3, Cycles 74
#8: ID3182, P0, CPU4, I2100; #9: ID3183, P0, CPU4, Cycles 52
#10: ID3184, P0, CPU5, I2600; #11: ID3185, P0, CPU5, Cycles 7
#12: ID3186, P0, CPU6, I3100; #13: ID3187, P0, CPU6, Cycles 29
#14: ID3188, P0, CPU7, I3600; #15: ID3189, P0, CPU7, Cycles 22
#16: ID3190, P0, CPU8, I4100; #17: ID3191, P0, CPU8, Cycles 17
#18: ID3192, P0, CPU9, I4600; #19: ID3193, P0, CPU9, Cycles 13
#20: ID3194, P0, CPU10, I5100; #21: ID3195, P0, CPU10, Cycles 10
#22: ID3196, P0, CPU11, I5600; #23: ID3197, P0, CPU11, Cycles 7
#24: ID3198, P0, CPU12, I6100; #25: ID3199, P0, CPU12, Cycles 5
#26: ID3200, P0, CPU13, I6600; #27: ID3201, P0, CPU13, Cycles 3
#28: ID3202, P0, CPU14, I7100; #29: ID3203, P0, CPU14, Cycles 1
#30: ID3204, P0, CPU15, I7600; #31: ID3205, P0, CPU15, Cycles 0
#1 -> #0, Min    4, Cur    4, Avg    4, Max   17
#3 -> #2, Min    4, Cur   29, Avg    7, Max   29
Could not access /sys/kernel/debug/tracing/tracing_enabled
#5 -> #4, Min    4, Cur    5, Avg    4, Max   18
#7 -> #6, Min    4, Cur    5, Avg    4, Max   13
#9 -> #8, Min    4, Cur    4, Avg    5, Max   17
#11 -> #10, Min    4, Cur   26, Avg    9, Max   26
Could not access /sys/kernel/debug/tracing/tracing_enabled
#13 -> #12, Min    4, Cur    4, Avg    5, Max   16
#15 -> #14, Min    4, Cur    4, Avg    5, Max   13
#17 -> #16, Min    4, Cur    4, Avg    5, Max   18
#19 -> #18, Min    4, Cur    4, Avg    5, Max   13
#21 -> #20, Min    4, Cur    4, Avg    6, Max   17
#23 -> #22, Min    4, Cur    4, Avg    6, Max   14
#25 -> #24, Min    4, Cur    4, Avg    7, Max   17
#27 -> #26, Min    4, Cur    4, Avg    7, Max   14
#29 -> #28, Min   16, Cur   16, Avg   16, Max   16
#31 -> #30 (not yet ready)

Some error/msg show "Could not access /sys/kernel/debug/tracing/tracing_enabled"
Checked current tracing behavior, we use tracing_on to control enabled/disable.
EasyFix.

Version-Release number of selected component (if applicable):
kernel-rt-4.18.0-108.rt20.49.el8.x86_64
rt-tests-1.3-20.el8.x86_64

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Qiao Zhao 2019-07-19 07:53:38 UTC
I draft a patch and test passed. Please review.

For current RHEL7 and RHEL8, we use tracing_on to control tracing disable/enable.
The tracing_enabled is not the correct value.

diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
index dfa4660..a265d90 100644
--- a/src/svsematest/svsematest.c
+++ b/src/svsematest/svsematest.c
@@ -187,7 +187,7 @@ void *semathread(void *param)
                                char tracing_enabled_file[MAX_PATH];
 
                                strcpy(tracing_enabled_file, get_debugfileprefix());
-                               strcat(tracing_enabled_file, "tracing_enabled");
+                               strcat(tracing_enabled_file, "tracing_on");
                                int tracing_enabled =
                                    open(tracing_enabled_file, O_WRONLY);
                                if (tracing_enabled >= 0) {

Comment 2 John Kacur 2019-07-31 15:36:46 UTC
Created attachment 1595128 [details]
change tracing_enabled to tracing_on where needed

Comment 7 errata-xmlrpc 2019-11-05 20:35:58 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://access.redhat.com/errata/RHBA-2019:3308