<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4621</bug_id>
          
          <creation_ts>2013-06-06 13:35:44 +0000</creation_ts>
          <short_desc>lttng userspace trace is not created</short_desc>
          <delta_ts>2013-08-27 07:26:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>ADT</product>
          <component>kernel analysis</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Georgescu">alexandru.c.georgescu</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>dvhart</cc>
    
    <cc>sgw</cc>
    
    <cc>yp.sdk.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>33667</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-06-06 13:35:44 +0000</bug_when>
    <thetext>poky:a62aed41f2d8f874f7ae24d0e5be5dbc66ea2199
QEMU: http://autobuilder.yoctoproject.org/pub/nightly/20130604-5/machines/qemu/qemux86-64/

STEPS TO REPRODUCE

1. Boot a core-image-sato-sdk image (e.g. qemux86-64)
2. Perform an userspace trace with lttng and view the trace

EXPECTED RESULTS:
2. Trace is created and can be viewed:

root@crownbay:~# lttng view
[02:31:14.906146544] (+?.?????????) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4,  seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[02:31:14.906170360] (+0.000023816) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[02:31:14.906183140] (+0.000012780) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[02:31:14.906194385] (+0.000011245) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
.
.
.

ACTUAL RESULTS
2. trace is not created:



root@qemux86-64:~# lttng create
Session auto-20130606-132154 created.
Traces will be written in /home/root/lttng-traces/auto-20130606-132154
root@qemux86-64:~# lttng enable-event --userspace --all
All UST events are enabled in channel channel0
root@qemux86-64:~# lttng start
Tracing started for session auto-20130606-132154
root@qemux86-64:~# ./a.out 
Hello, World!
root@qemux86-64:~# lttng stop
Waiting for data availability
Tracing stopped for session auto-20130606-132154
root@qemux86-64:~# lttng view
Trace directory: /home/root/lttng-traces/auto-20130606-132154

[error] Cannot open any trace for reading.

[error] opening trace &quot;/home/root/lttng-traces/auto-20130606-132154&quot; for reading.

[error] none of the specified trace paths could be opened.

root@qemux86-64:~# lttng destroy
Session auto-20130606-132154 destroyed
root@qemux86-64:~# ls
a.out  hello.c
root@qemux86-64:~#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33678</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-06-06 19:29:41 +0000</bug_when>
    <thetext>Please check maintainers.inc when assigning bugs:

RECIPE_MAINTAINER_pn-lttng-ust = &quot;Bogdan Marinescu &lt;bogdan.a.marinescu@intel.com&gt;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34234</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-06-28 19:08:57 +0000</bug_when>
    <thetext>Tom: I am explictly re-assinging this back to you as Bogdan has left and you 
are the tracing person.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34283</commentid>
    <comment_count>3</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-07-02 18:05:18 +0000</bug_when>
    <thetext>There doesn&apos;t seem to be a problem here.


Build Configuration:
BB_VERSION        = &quot;1.19.1&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Fedora-17&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;crownbay&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.4+snapshot-20130701&quot;
TUNE_FEATURES     = &quot;m32 core2&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master0:80b263430453896189b704d0997943642eec6fef&quot;
meta-intel        
meta-crownbay     = &quot;master0:e0d6134ed2e2687ff9f2ee77701666447842bf33&quot;


root@crownbay:~# lttng create
Spawning a session daemon
Warning: No tracing group detected
Session auto-20130701-224222 created.
Traces will be written in /home/root/lttng-traces/auto-20130701-224222
root@crownbay:~# lttng enable-event --userspace --all 
All UST events are enabled in channel channel0
root@crownbay:~# lttng start
Tracing started for session auto-20130701-224222
root@crownbay:~# ./hello
Hello, World!
Tracing...  done.
root@crownbay:~# lttng stop
Waiting for data availability...............................
Tracing stopped for session auto-20130701-224222
root@crownbay:~# lttng view
[23:45:24.249558061] (+0.000005587) crownbay:hello:1236 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3295, intfield2 = 0xCDF, longfield = 3295, netintfield = 3295, netintfieldhex = 0xCDF, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[23:45:24.249563648] (+0.000005587) crownbay:hello:1236 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3296, intfield2 = 0xCE0, longfield = 3296, netintfield = 3296, netintfieldhex = 0xCE0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[23:45:24.249569236] (+0.000005588) crownbay:hello:1236 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3297, intfield2 = 0xCE1, longfield = 3297, netintfield = 3297, netintfieldhex = 0xCE1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[23:45:24.249574823] (+0.000005587) crownbay:hello:1236 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3298, intfield2 = 0xCE2, longfield = 3298, netintfield = 3298, netintfieldhex = 0xCE2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = &quot;test&quot;, stringfield = &quot;test&quot;, floatfield = 2222, doublefield = 2, boolfield = 1 }
[23:45:24.249580410] (+0.000005587) crownbay:hello:1236 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3299, intfield2 = 0xCE3, longfield = 3299, netintfield = 3299, netintfieldhex = 0xCE3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ],</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34289</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-07-02 22:05:57 +0000</bug_when>
    <thetext>Also tried with a qemux86-64 core-image-sato-sdk build and it worked fine too, so closing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35334</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-08-02 10:57:31 +0000</bug_when>
    <thetext>Hi Tom,
I am sorry but I have to reopen this. I have tried on real HW, crownbay-noemgd and on qemux86 &amp; qemux86-64 sato-sdk images.

It reproduces on both machines (qemu and real hw) with the same error I mentioned from above.


poky: 9de0ad47462c13ac4a2d73e12e92be6c1b4e0415
crownbay: http://autobuilder03.jf.intel.com/pub/nightly-meta-intel/20130731-3/machines/crownbay-noemgd/core-image-sato-sdk-crownbay-noemgd.hddimg

I really don&apos;t know why it doesn&apos;t happen to you but seems that on my machines it reproduces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35680</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2013-08-15 19:52:47 +0000</bug_when>
    <thetext>I think your problem is that you&apos;re not actually running anything that will produce a trace.  Apparently lttng-ust doesn&apos;t produce the file it says it does unless something is actually traced and &apos;lttng view&apos; will produce  the error you see if nothing has been traced and therefore the file doesn&apos;t really exist:

lttng create
Spawning a session daemon
Warning: No tracing group detected
Session auto-20130801-095552 created.
Traces will be written in /home/root/lttng-traces/auto-20130801-095552
root@crownbay-noemgd:~# lttng enable-event --userspace --all
All UST events are enabled in channel channel0
root@crownbay-noemgd:~# lttng start
Tracing started for session auto-20130801-095552
root@crownbay-noemgd:~# lttng stop
Waiting for data availability
Tracing stopped for session auto-20130801-095552
root@crownbay-noemgd:~# lttng view
Trace directory: /home/root/lttng-traces/auto-20130801-095552

[error] Cannot open any trace for reading.

[error] opening trace &quot;/home/root/lttng-traces/auto-20130801-095552&quot; for reading.

[error] none of the specified trace paths could be opened.

root@crownbay-noemgd:~# lttng start
Tracing started for session auto-20130801-095552


If you repeat the test but actually run the hello application that will generate a trace, you get:

root@crownbay-noemgd:~# lttng start
Tracing started for session auto-20130801-095552
root@crownbay-noemgd:~# /media/sdb/lttng-ust-hello 
Hello, World!
Tracing...  done.
root@crownbay-noemgd:~# lttng stop
Waiting for data availability
Tracing stopped for session auto-20130801-095552
root@crownbay-noemgd:~# lttng view
Trace directory: /home/root/lttng-traces/auto-20130801-095552

[09:56:50.080838531] (+?.?????????) crownbay-noemgd:lttng-ust-hello:1107 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = &quot;test&quot;, _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101

You can find a &apos;hello&apos; program that you can use for testing in:

build/tmp/work/core2-poky-linux/lttng-ust/2_2.2.0-r0/build/tests/hello/.libs/hello</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35944</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-08-27 07:26:55 +0000</bug_when>
    <thetext>with the sample indicated by Tom, the trace can be viewed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>