* Ji Zhai ([email protected]) wrote: > Hi Mathieu, > > I'd like to know if you have had time to review my question. If > possible, can you please give me a guide/direction to debug this > issure?
Hi Ji, Sorry, I am pretty busy on UST 2.0 these days. About your question you might want to try adding "printf" statements within marker.c in UST, and also try compiling UST with -DUST_DEBUG=1 so enable debugging output. I fear there is a linker issue on your system, but unfortunately I don't have access to your setup. Try comparing the outputs of a simple test program in your powerpc target setup, in a native host x86 setup, and in a native host x86_64 setup. This way you should be able to identify what is missing. Best regards, Mathieu > > For UST-0.15, the epoll must be enabled? > > Where I can get UST 2.0 to try? > > Thanks! > > Regards, > > Ji > > -----Original Message----- > From: Ji Zhai [mailto:[email protected]] > Sent: Monday, September 19, 2011 11:19 AM > To: Mathieu Desnoyers > Cc: [email protected] > Subject: Re: [ltt-dev] no metadata tracefile > > Hi Mathieu, > > The results for ldd foo: > root@mcb00-main-aaillax:/home/mvpapp/LTTng# ldd foo > linux-vdso32.so.1 => (0x00100000) > libust.so.0 => /usr/local/lib/libust.so.0 (0x0ff9a000) > libc.so.6 => /lib/libc.so.6 (0x0fe34000) > libpthread.so.0 => /lib/libpthread.so.0 (0x0fdfc000) > librt.so.1 => /lib/librt.so.1 (0x0fdd4000) > liburcu-bp.so.1 => /usr/local/lib/liburcu-bp.so.1 (0x0fdae000) > /lib/ld.so.1 (0x48000000) > liburcu-cds.so.1 => /usr/local/lib/liburcu-cds.so.1 (0x0fd8b000) > > The libust is in /usr/local/lib > > Yes, libust.so is a linker script: > > root@mcb00-main-aaillax:/usr/local/lib# file libust.so > libust.so: ASCII C program text > > root@mcb00-main-aaillax:/usr/local/lib# cat libust.so > /* GNU ld script > Use the shared library, but the link with initializer too */ > OUTPUT_FORMAT(elf32-powerpc) > GROUP ( libust.so.0 libust-initializer.o ) > > Thanks! > > Ji > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of Mathieu > Desnoyers > Sent: Monday, September 19, 2011 11:02 AM > To: Ji Zhai > Cc: Alexandre Montplaisir; [email protected] > Subject: Re: [ltt-dev] no metadata tracefile > > * Ji Zhai ([email protected]) wrote: > > Hi Mathieu, > > > > Thanks for your help! > > I use the following way to build my application: > > gcc -o foo -lust foo.c > > OK. if you run > > ldd foo > > Where does it find its libust ? > > Can you check the content of the libust .so file ? It is supposed to be > a linker script rather than a .so per se. Can you give us the result of > "file" and the first lines of the text output of this file ? > > I suspect the build might have installed the .so binary object directly > without taking into account that it must do this linker trickery. > > By the way, these hacks are going away in UST 2.0. > > Thanks, > > Mathieu > > > > > Compiler/linker information: > > gcc version 4.2.4 > > GNU ld (Linux/GNU Binutils) 2.18.50.0.7.20080502 > > ld.so.1 (GLIBC_2.3) > > glibc-extra-nss - 2.6.1-r35.0.1 > > glibc-utils - 2.6.1-r35.0.1 > > > > Linux kernel: 2.6.31.12 > > > > I used > > CFLAGS="-m32 -g -O2" ./configure > > make > > make install > > ldconfig > > to force 32-bit build of userspace-rcu-0.6.4 and ust-0.15. > > > > Thanks! > > > > Ji > > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On Behalf Of > > Mathieu Desnoyers > > Sent: Sunday, September 18, 2011 6:23 PM > > To: Ji Zhai > > Cc: Alexandre Montplaisir; [email protected] > > Subject: Re: [ltt-dev] no metadata tracefile > > > > * Ji Zhai ([email protected]) wrote: > > > Hi Mathieu, > > > > > > After adding that sleep(5) and even sleep(10), I got some different logs > > > (checked by using hexdump). However, I still got the following error by > > > using the LTTV: > > > > > > ** ERROR **: Undescribed event 1 in channel ust > > > Aborting... > > > Lttv: line 15: 26701 Aborted $0.real $* > > > > > > I have attached the tarball of the usttrace output with debug information. > > > I am not sure the error came from UST or LTTV. Can you please take a > > > look? Thanks! > > > > Hi Zhai, > > > > The metadata file in the trace you sent is unpopulated. What I mean by > > this is that the file exists, a 4kB buffer with appropriate header is > > there, but the metadata that describes the mapping between the markers > > and their ID/format is missing. This therefore points to a linker > > problem that causes marker.c to be unable to list the markers present in > > the application. UST 0.x does require that you link your application > > with libust-initializer.o in addition to libust. How did you build/link > > your applications ? And what versions of compiler/linker do you use ? > > > > Thanks, > > > > Mathieu > > > > > > > > > > Regards, > > > > > > Ji > > > -----Original Message----- > > > From: [email protected] [mailto:[email protected]] On Behalf Of > > > Mathieu Desnoyers > > > Sent: Thursday, September 15, 2011 12:21 PM > > > To: Ji Zhai > > > Cc: Alexandre Montplaisir; [email protected] > > > Subject: Re: [ltt-dev] no metadata tracefile > > > > > > * Ji Zhai ([email protected]) wrote: > > > > Hi Alexandre, > > > > > > > > Thanks for your reply! > > > > According to your suggestions, I did the followings: > > > > 1. I cleaned all related libs in /usr/local/lib and /usr/lib > > > > 2. Built/installed userspace-rcu-0.6.4 > > > > 3. Built/installed UST-0.15 with debug enable > > > > 4. gcc -o foo lust foo.c > > > > > > > > The foo.c are: > > > > > > > > #include <ust/marker.h> > > > > > > > > int main(int argc, char **argv) > > > > { > > > > int v; > > > > char *st; > > > > > > > > /* ... set values of v and st ... */ > > > > v = 110; > > > > st = "hello, UST"; > > > > /* a marker: */ > > > > trace_mark(ust, myevent, "firstarg %d secondarg %s", v, st); > > > > > > > > /* a marker without arguments: */ > > > > trace_mark(ust, myotherevent, MARK_NOARGS); > > > > > > Add a sleep(5) here, it will work. > > > > > > This is a fundamental design bug in UST 0.x that we are fixing in UST > > > 2.0. Short-lived applications don't let enough time for the consumer to > > > hook on them, and there is no rendez-vous point anywhere. See the > > > following comment in UST 0.15 sources: > > > > > > tests/runtests: > > > > > > # FIXME We disable the exit-fast test for the release. This is a known > > > # problem with the current UST design that we will be working on fixing > > > # in the upcoming rework for integration with the lttng-tools. We don't > > > # want to flood testers with known issues, hence the choice to disable > > > # the test. > > > #simple_harness_run exit-fast/exit-fast.sh > > > > > > Best regards, > > > > > > Mathieu > > > > > > > > > > > return 0; > > > > } > > > > > > > > 5. usttrace ./foo > > > > 6. I got the log files in /home/root/.usttraces. > > > > 7. I used LTTV(0.12.36) to review the results: > > > > > > > > lttv -m textDump -t mcb00-main-aaillax-20110914130558687771830 > > > > > > > > ** (process:20623): WARNING **: Trace > > > > /nas/jizhai/LTTng/mytrace/mcb00-main-aaillax-20110914130558687771830 > > > > has no metadata tracefile > > > > > > > > ** (process:20623): CRITICAL **: cannot open trace > > > > mcb00-main-aaillax-20110914130558687771830 > > > > /home/jizhai/MyLocal/LTTng/bin/lttv: line 15: 20623 Segmentation fault > > > > $0.real $* > > > > > > > > I have attached the tar ball (foo_ust.tar.gz) for the log files. Please > > > > see the attachment. > > > > > > > > My co-worker did same test on his side and sent an email for help to > > > > the mailing list: > > > > > > > > http://lists.casi.polymtl.ca/pipermail/ltt-dev/2011-September/005135.html > > > > > > > > In his email, there are some debug information done by him. > > > > > > > > I am looking forward to get your further help! Thanks! > > > > > > > > Regards, > > > > > > > > Ji > > > > > > > > > > > > -----Original Message----- > > > > From: Alexandre Montplaisir [mailto:[email protected]] > > > > Sent: Tuesday, September 13, 2011 4:03 PM > > > > To: Ji Zhai > > > > Cc: [email protected] > > > > Subject: Re: [ltt-dev] no metadata tracefile > > > > > > > > On 11-09-13 03:22 PM, Ji Zhai wrote: > > > > > Hi Mathieu, > > > > > > > > > > Thanks for your reply! > > > > > I have tried many combinations, for example, userspace-rcu-0.6.4 and > > > > > ust-0.15, but still got the same kind of errors--no metadata trace > > > > > tracefile. > > > > > Any idea? Thanks again! > > > > > > > > > > Regards, > > > > > > > > > > Ji > > > > > > > > Hi Ji Zhai, > > > > > > > > Can you take a really small UST trace (a couple MB's) and upload it > > > > somewhere? > > > > > > > > Also make sure you are really using the latest versions (urcu 0.6.4, UST > > > > 0.15 and LTTV 0.12.38). Sometimes old versions are still in the PATH > > > > even if new versions got installed afterwards. On most distros, stuff in > > > > /usr/local has priority over stuff in /usr. > > > > > > > > > > > > Cheers, > > > > > > > > -- > > > > Alexandre Montplaisir > > > > DORSAL lab, > > > > École Polytechnique de Montréal > > > > > > > > > > > > > > > > Legal Disclaimer: > > > > The information contained in this message may be privileged and > > > > confidential. It is intended to be read only by the individual or > > > > entity to whom it is addressed or by their designee. If the reader of > > > > this message is not the intended recipient, you are on notice that any > > > > distribution of this message, in any form, is strictly prohibited. If > > > > you have received this message in error, please immediately notify the > > > > sender and delete or destroy any copy of this message > > > > > > > > > > > > > > _______________________________________________ > > > > ltt-dev mailing list > > > > [email protected] > > > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > > > > > > > > > -- > > > Mathieu Desnoyers > > > Operating System Efficiency R&D Consultant > > > EfficiOS Inc. > > > http://www.efficios.com > > > > > > > > -- > > Mathieu Desnoyers > > Operating System Efficiency R&D Consultant > > EfficiOS Inc. > > http://www.efficios.com > > > > -- > Mathieu Desnoyers > Operating System Efficiency R&D Consultant > EfficiOS Inc. > http://www.efficios.com > > _______________________________________________ > ltt-dev mailing list > [email protected] > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
