Bug 618946 - trace show returns no result
trace show returns no result
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: crash-trace-command (Show other bugs)
6.0
All Linux
high Severity high
: rc
: ---
Assigned To: Dave Anderson
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-28 02:26 EDT by Caspar Zhang
Modified: 2013-07-03 03:24 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-19 08:03:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Caspar Zhang 2010-07-28 02:26:26 EDT
Description of problem:
As the help page describes, the `trace show' command should return function tracer, but I executed trace show and trace show -c <cpu>, none of them returns a result:

crash> trace show
crash> trace show
crash> trace show -c 0
crash> trace show
crash> trace show
crash> trace show -c 0-3
crash> trace show
crash> trace show
crash> 


Version-Release number of selected component (if applicable):
1.0-3.el6                                        

How reproducible:
always

Steps to Reproduce:
1. run crash /path/to/vmlinux /path/to/vmcore (or run crash directly)
2. extend /path/to/trace.so
3. run trace show
  
Actual results:
trace show returns no results

Expected results:
trace show should return tracer info according to right trace flags.

Additional info:
Comment 2 Dave Anderson 2010-08-09 10:40:21 EDT
As I understand it, if there is no outstanding (unconsumed) trace event data
remaining in any of the kernel's per-cpu ring buffers, then the command shows
nothing.
Comment 3 Dave Anderson 2010-08-09 10:41:56 EDT
Lai,

Can you assist Caspar in creating a QA test procedure to test the 
package?

Thanks,
  Dave
Comment 4 Caspar Zhang 2010-08-09 14:20:41 EDT
(In reply to comment #2)
> As I understand it, if there is no outstanding (unconsumed) trace event data
> remaining in any of the kernel's per-cpu ring buffers, then the command shows
> nothing.    

Thank you Dave, I think that's the reason. I was using sysrq-trigger to create vmcore and then ran crash on live system. So a correct reproducer is needed :-)
Comment 5 Lai Jiangshan 2010-10-19 04:43:18 EDT
(In reply to comment #4)
> (In reply to comment #2)
> > As I understand it, if there is no outstanding (unconsumed) trace event data
> > remaining in any of the kernel's per-cpu ring buffers, then the command shows
> > nothing.    
> 
> Thank you Dave, I think that's the reason. I was using sysrq-trigger to create
> vmcore and then ran crash on live system. So a correct reproducer is needed :-)

Hi, Caspar

When there is no event int the ringbuffers, "trace show" will not show any events to the stdout.(the tracer is not started or all the events are consumed).

-------------------------------------
To start a tracer:
# mount -t debugfs xx /mnt/
# cd /mnt/tracing/
# cat available_tracers 
function_graph function sched_switch nop
# echo function_graph > current_tracer      # start a tracer
# cat trace_pipe                            # consume some events
#  ^C                                       # stop consume
# echo c > /proc/sysrq-trigger
                                            # start to test ..
--------------------------------------

If there is no event in the ringbuffers, it is correct when "trace show" outputs nothing.

Thanks a lot.
Lai
Comment 6 Caspar Zhang 2010-10-19 08:03:46 EDT
Thanks Lai, I'll close this bug.
Comment 7 Dave Anderson 2010-10-19 11:18:59 EDT
Thanks Lai.

I note that you can essentially test this on a live system as well?

Although when doing so, I noticed that the "trace" command with no arguments
shows the tracer that was the "current_tracer" at the time the trace.so module
was loaded.  But if it gets changed subsequently while the crash session is
still active, that value is not updated.  However, the new tracer's data does
get displayed by "trace show".

But that's a minor issue, and if I'm not mistaken, this module is 
designed for use with crash dumps and not live systems.

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