[lttng-dev] sessiond and consumerd for 32 and 64 bit apps

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Wed Oct 8 11:06:33 EDT 2014


> Yes the problem looks to be with relay daemon. Tracing for 32-bit and 64-bit works fine when written to local storage.
> Is there any known issue for this? or is there any work around for this.
> I will update this thread with logs of relayd with -vvv option.
>
> Anand Neeli

   I’ve just tested my 32+64-bit LTTng 2.3.0 installation with the relay daemon and it works fine:

$ sudo lttng create testing -U net://localhost
$ sudo lttng enable-channel mychannel --userspace --buffers-pid --tracefile-size 8388608 --tracefile-count 8
$ sudo lttng enable-event --channel mychannel --userspace --all
$ sudo lttng start
$ cd ~/Documents/lttng-ust-2.3.0-1-32bits/usr/src/lttng-ust-2.3.0/doc/examples/drdc
$ ./sample_static
$ LD_PRELOAD=/usr/local/lib32/liblttng-ust.so ./sample_static32
$ sudo lttng destroy
$ sudo ls ~/lttng-traces/$HOSTNAME
testing-20141008-095516

   (The LD_PRELOAD can be omitted if the sample_static32 is compiled with the ‘-Wl,-rpath,'/usr/local/lib32',--enable-new-dtags’ linker flags)

   The trace consists of the two folder sets ust/pid/sample_static32-13703-20141008-102156 and ust/pid/sample_static-13676-20141008-101417.

   Here’s how this was built (I chose to put my 32-bit libraries in /usr/local/lib32):

userspace-rcu-0.8.0-1.deb was deployed to ~/Documents/userspace-rcu-0.8.0-1-32bits

In the usr/src/userspace-rcu-0.8.0 subdirectory:

$ ./bootstrap
$ ./configure --libdir=/usr/local/lib32 CFLAGS=-m32
$ make
$ sudo make install
$ sudo ldconfig

lttng-ust-2.3.0-1.deb was deployed to ~/Documents/lttng-ust-2.3.0-1-32bits

In the usr/src/lttng-ust-2.3.0 subdirectory:

$ ./bootstrap
$ ./configure --libdir=/usr/local/lib32 CFLAGS=-m32 \
   LDFLAGS=-L/usr/local/lib32
$ make
$ sudo make install
$ sudo ldconfig

LDFLAGS allows the build to find the 32-bit userspace-rcu libraries it requires.

lttng-tools-2.3.0-1.deb was deployed to ~/Documents/lttng-tools-2.3.0-1-32bits

In the usr/src/lttng-tools-2.3.0 subdirectory:

$ ./bootstrap
$ ./configure --libdir=/usr/local/lib32 CFLAGS=-m32 \
   LDFLAGS=-L/usr/local/lib32 --bindir=/usr/local/bin32 \
   --with-consumerd-only \
   --with-consumerd64-libdir=/usr/local/lib \
   --with-consumerd64-bin=/usr/local/lib/lttng/libexec/lttng-consumerd
$ make
$ sudo make install
$ sudo ldconfig

The bindir option isn’t actually used by the compilation and is indicated here just for completeness.  The with-consumerd64-bin and with-consumerd64-libdir options ensure the 32-bit lttng-tools components find the 64-bit consumer daemon.  Normally, the with-consumerd-only make fails because it tries to make too many tests; this was fixed by editing the Makefile and removing the tests sub-directory from the SUBDIRS variable (line 305) before running configure.  The suppressed tests are not required in order to have a functioning 32-bit LTTng toolchain.

Finally, the 64-bit lttng-tools are redone to hook in the 32-bit lttng-consumerd.

lttng-tools-2.3.0-1.deb was deployed to ~/Documents/lttng-tools-2.3.0-1-64bits

In the usr/src/lttng-tools-2.3.0 subdirectory:

$ ./bootstrap
$ ./configure LDFLAGS=-L/usr/local/lib \
   --with-consumerd32-libdir=/usr/local/lib32 \
   --with-consumerd32-bin=/usr/local/lib32/lttng/libexec/lttng-consumerd
$ make
$ sudo make install
$ sudo ldconfig

This way, the lttng-sessiond and lttng-relayd daemons will automatically find and use the 32-bit lttng-consumerd if required.  No special flags need to be added when controlling the daemons.

Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
RDDC - Centre de recherches de Valcartier | DRDC - Valcartier Research Centre
2459 route de la Bravoure
Québec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ<--ESFSECEV-TY3011-------------------------------->>
Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/<--ESFSECEV-TY3011--------------------->>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20141008/75eb2cfb/attachment-0001.html>


More information about the lttng-dev mailing list