[lttng-dev] [RELEASE] LTTng-tools 2.13.13 - Nordicité

2024-04-09 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the thirteenth bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2024-04-05 lttng-tools 2.13.13 (National Deep Dish Pizza Day)
* Fix: consumerd: leak of tracing buffers on relayd connectivity issue
* Fix: consumerd: wrong timer mentioned in error logging
* Fix: consumerd: type confusion in lttng_consumer_send_error

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.13.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.13.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.15 - (Ta) Meilleure

2024-04-02 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have released the fifteenth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2024-03-28 lttng-tools 2.12.15 (Respect Your Cat Day)
* Fix: baddr-statedump: use $(LIBTOOL) --mode=execute
* Fix: relayd: live client not notified of inactive streams
* Fix: relayd: live: dispose of zombie viewer metadata stream
* Fix: sessiond: freeze on channel creation on restart
* common: move utils_create_lock_file to its own file
* tests: tools/clear/test_ust wait for specific test app pid
* Tests: use CPU ids from online ranges
* Tests: Preemptively fail infinite blocking tests when low on disk 
space
* Fix: lttng-add-context: leak of application context parameters

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.15.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.15.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.12 - Nordicité

2024-04-02 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have released the twelfth bug-fix release of LTTng-tools 2.13 - Nordicité.
This release addresses a number of issues listed below.

2024-03-28 lttng-tools 2.13.12 (Respect Your Cat Day)
* Fix: baddr-statedump: use $(LIBTOOL) --mode=execute
* Fix: relayd: live client not notified of inactive streams
* Fix: relayd: live: dispose of zombie viewer metadata stream
* tests: Fix typo in tests/regression/kernel/test_ns_contexts
* Fix: sessiond: freeze on channel creation on restart
* common: move utils_create_lock_file to its own file
* tests: tools/clear/test_ust wait for specific test app pid
* Fix: sessiond: crash when sending data_pending to an active session
* Tests: fix: list_triggers_cli: kallsyms contains prefixed symbols
* License: common: error_query: fix typo in SPDX specifier

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.12.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.12.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] Babeltrace 2.0.6 - Amqui

2024-03-28 Thread Jérémie Galarneau via lttng-dev
Hi everyone!

Today marks the release of Babeltrace 2.0.6, coinciding with "Respect Your Cat
Day" – a nod to our feline friends and perhaps a call to enjoy a moment of
relaxation after updating to this latest version.

What's new since Babeltrace 2.0.5?
==

This release brings an assortment of fixes and improvements across the board.

Highlights include numerous fixes to ensure the compatibility of the Python
bindings with newer Python versions, enhancements for handling inactive streams
in the LTTng live source, and various documentation and test suite refinements.

Below is the full list of changes in this update:

2024-03-28 Babeltrace 2.0.6 (Respect Your Cat Day)
* bt2: disable some warnings for `native_bt.c`
* bt2: compile `native_bt.c` with `-Wno-undef`
* Fix: src.ctf.lttng-live: expect NEW_STREAM/METADATA for inactive streams
* Fix: `babeltrace2 convert`: don't consider the `--plugin-path` opt.
* include/babeltrace2/plugin/plugin-dev.h: "define" -> "definition
* Fix: doc: escape double quote in bt_p alias
* Fix: bt2: pass _TraceClassConst to destruction listeners
* fix: 'load_module()' deprecated in Python 3.12
* tests: retry os.rename on PermissionError failure in lttng_live_server.py
* doc: fix uptream -> upstream typos
* fix: test_message_iterator.py hangs on Python 3.12
* plugin-dev: mark symbols meant to be public with 
__attribute__((visibility("default")))
* Silence -Wunused-but-set-variable error with clang
* Fix: Windows DLL path lookup with Python >= 3.8
* doc/man: make default values of boolean init. params. clearer
* RFC: docs: fix: Match stated automake requirement
* fix: make flake8 6.x happy
* fix: running black on python 3.11
* bt_query_executor_create_with_method_data(): fix docs note
* Fix: ctf-writer: null dereference in bt_ctf_trace_common_add_stream_class
* Update working version to Babeltrace v2.0.6

We've worked hard to address issues and enhance the Babeltrace project, and we
appreciate the community's feedback and contributions. As always, we look
forward to hearing about your experiences with this release and how we can
continue to improve Babeltrace!

As we celebrate the release of Babeltrace 2.0.6, let's also take a moment to
appreciate our feline companions, who often keep us company during those long
debugging sessions.

Happy coding, and give your cat (or pet of choice) some extra respect today!

Important links
===
Babeltrace 2.0.6 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.6.tar.bz2

Babeltrace website:
https://babeltrace.org

Mailing list (for support and development):
`lttng-dev at lists.lttng.org`

IRC channel:
`#lttng` on `irc.oftc.net`

Git repository:
https://bugs.lttng.org/projects/babeltrace

GitHub project:
https://github.com/efficios/babeltrace

Continuous integration:
https://ci.lttng.org/view/Babeltrace/

Code review:
https://review.lttng.org/q/project:babeltrace
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.11 - Nordicité

2023-08-21 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the eleventh bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2023-08-21 lttng-tools 2.13.11 (National Spumoni Day)
* Tests: use CPU ids from online ranges
* docs: fix: Match stated automake requirement
* Docs: Fix broken reference in lttng-add-trigger
* Docs: Fix broken reference to lttng-concepts(7) man page
* Tests: Preemptively fail infinite blocking tests when low on disk 
space
* Fix: lttng-add-context: leak of application context parameters
* Fix: sessiond: bad fd used while rotating exiting app's buffers
* Fix: consumerd: slow metadata push slows down application registration
* event-rule: set event rule loglevel to domain specific value when 
unset
* Fix: sessiond: preserve jul/log4j domain loglevels
* Fix: sessiond: crash enabling event rules that differ only by 
loglevel type

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.11.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.11.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.14 - (Ta) Meilleure

2023-06-20 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the fourteenth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2023-06-20 lttng-tools 2.12.14 (National Ice Cream Soda Day)
* Tests fix: test_callstack: output of addr2line incorrectly parsed
* Fix: adding a user space probe fails on thumb functions
* Fix: Tests that assume CPU 0 is present
* Fix: Wrong assumption about possible CPUs
* Tests: fix: parse-callback reports missing addr2line
* Tests: snapshot tests complain that nothing is output
* Tests: Test snapshot maximum size correctly
* Tests: Add get_possible_cpus_count utility
* Fix: ini parser: truncation of value name

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.14.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.14.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.10 - Nordicité

2023-06-20 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the tenth bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2023-06-20 lttng-tools 2.13.10 (National Ice Cream Soda Day)
* Fix: sessiond: incorrect use of exclusions array leads to crash
* Tests fix: test_callstack: output of addr2line incorrectly parsed
* Fix: sessiond: silent kernel notifier registration error
* Fix: sessiond: size-based notification occasionally not triggered
* Fix: adding a user space probe fails on thumb functions
* Fix: Tests that assume CPU 0 is present
* Fix: Wrong assumption about possible CPUs
* Tests: fix: parse-callback reports missing addr2line
* Fix: lttng remove-trigger -h fails
* Tests: snapshot tests complain that nothing is output
* Tests: Test snapshot maximum size correctly
* Tests: Add get_possible_cpus_count utility
* Fix: ini parser: truncation of value name
* Fix: truncated len in lttng_event_rule_user_tracepoint_serialize()
* Tests: remove leftover debug printing in test_add_trigger_cli

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.10.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.10.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] Babeltrace 2.0.5 - Amqui

2023-05-23 Thread Jérémie Galarneau via lttng-dev
Hi everyone!

Today we're releasing the fifth patch-level release of Babeltrace 2.0
"Amqui".

What's new since Babeltrace 2.0.4?
==

This release contains a number of plug-in fixes. The full change log follows.

2023-05-23 Babeltrace 2.0.5 (World Turtle Day)
* bt2: honor build system compiler/linker preferences
* Fix: clear_string_field(): set first character to 0
* Fix: src.ctf.fs: Not resolving event common ctx
* debug-info: fix -Wenum-int-mismatch problem in 
copy_field_class_content_internal
* fix: pass exec-prefix to python bindings install
* fix: document proper Bison version requirement
* cli: use return value of g_string_free
* babeltrace2-query(1): erroneous parameter used in example
* Fix: tests: print real values in a fixed format
* Fix: bt2: autodisc: remove thread error while inserting status in map
* tests: src.ctf.fs: add test for metadata with invalid syntax
* tests: shorten names of session-rotation trace
* bt2: ignore -Wredundant-decls warning
* ctf: fix -Wformat-overflow error in ctf-meta-resolve.cpp
* ctf-writer: fix -Wformat-overflow errors in resolve.c
* Fix: src.text.details: use write_uint_prop_value to handle unsigned 
values in write_int_range
* Add `dev-requirements.txt` for pip
* Fix: src.ctf.lttng-live: consider empty metadata packet as retry
* Fix: ctf: wrongfully requiring CTF metadata signature for every 
section
* Fix: src.ctf.lttng-live: session closed before any metadata is 
received
* fix: obsolete warnings with autoconf >= 2.71
* fix: explicitly disable '-Wsuggest-attribute=format'
* fix: set stable branch in gitreview config
* Fix: ctf-writer: list of reserved keywords
* compiler warning cleanup: is_signed_type: compare -1 to 1
* Update working version to Babeltrace 2.0.5


Important links
===
Babeltrace 2.0.5 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.5.tar.bz2

Babeltrace website:
https://babeltrace.org

Mailing list (for support and development):
`lttng-dev at lists.lttng.org`

IRC channel:
`#lttng` on `irc.oftc.net`

Git repository:
https://bugs.lttng.org/projects/babeltrace

GitHub project:
https://github.com/efficios/babeltrace

Continuous integration:
https://ci.lttng.org/view/Babeltrace/

Code review:
https://review.lttng.org/q/project:babeltrace
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] delay between trigger and action

2023-05-23 Thread Jérémie Galarneau via lttng-dev
Hi Yehuda,

The trigger mechanism is asynchroneous. The applications (or the kernel) won't 
block until the session daemon has processed the actions of the trigger.

As such, it is likely that you will lose events between the moment the trigger 
is triggered and when the session is started.

We have been considering implementing synchroneous start/stop actions, but no 
one has sponsored that work for the moment.

In your case, a work-around you could consider is to:

  *   setup a snapshot session with the same events
  *   set the trigger's actions to record a snapshot on that session, and start 
your existing session

In that setup, you would most likely see the events that led to the "start" 
(since they are captured in the in-memory buffers of the snapshot session), and 
you would capture the follow-up events in the on-disk session.

I hope that helps,
Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of Yitschak, 
Yehuda via lttng-dev 
Sent: May 23, 2023 08:17
To: lttng-dev@lists.lttng.org 
Subject: [lttng-dev] delay between trigger and action


Hi everyone

I am experimenting with enabling trace for a specific iteration of a loop in my 
application.
I created 2 trace points at the start and end of the loop which log the 
iteration number.
the loop itself creates thousands of trace points. It runs for ~5ms.

on lttng side I created 2 triggers to start and stop my session in case the 
loop tracepoint registers a specific iteration number.
the triggers seem to work since there is another session entry created under 
the session folder but there are very few tracepoints.

is it possible that the delay between the event happening and the session trace 
starting causes loss of events ?
If yes, is there a way around this  ?

here is my setup :

#lttng-status
Recording session session: [inactive]

Trace output: /home/user/lttng-traces/session-20230523-113537



=== Domain: User space ===



Buffering scheme: per-user



Tracked process attributes

  Virtual process IDs:  all

  Virtual user IDs: all

  Virtual group IDs:all



Channels:

-

- user-channel: [enabled]



Attributes:

  Event-loss mode:  discard

  Sub-buffer size:  16777216 bytes

  Sub-buffer count: 128

  Switch timer: inactive

  Read timer:   inactive

  Monitor timer:100 us

  Blocking timeout: 0 us

  Trace file count: 1 per stream

  Trace file size:  unlimited

  Output mode:  mmap



Statistics:

  Discarded events: 0



Recording event rules:

  trace_events* (type: tracepoint) [enabled]

  loop* (type: tracepoint) [enabled]

#lttng list-triggers

- name: iter-start

  owner uid: 1000

  condition: event rule matches

rule: loop:iteration (type: user tracepoint, filter: iter==2 && start == 1)

errors: none

  actions:

start session `session`

  errors: none

  errors: none

- name: iter-stop

  owner uid: 1000

  condition: event rule matches

rule: loop:iteration (type: user tracepoint, filter: iter==2 && start == 0)

errors: none

  actions:

stop session `session`

  errors: none

  errors: none


Thanks

Yehuda
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] Tracing a docker containerized java application from the host

2023-03-17 Thread Jérémie Galarneau via lttng-dev
I'm re-adding the list so every one can benefit from the exchange.


The agent and session daemon both attempt to communicate on "0.0.0.0" (the 
local host). I would assume you can expose/publish (in docker terms) the 
session daemon's port on the local interface too. I have not tried that though.

As for the contents of the /var/run/lttng folder, you ultimately have to make 
those files accessible to the applications. You can use the LTTNG_HOME 
environment variable to control where the session daemon creates those files 
and where the applications look for them. Then, adjust the container's mount 
points accordingly.

To record the events, the shared memory must be accessible to both ends (host 
and container). You will need to mount /dev/shm inside the container.

I think Michael's configuration for Kubernetes can help you understand how the 
various parts fit together:
https://github.com/mjeanson/gcloud-lttng/blob/master/pods/demo1.yaml.in

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: Adel Belkhiri 
Sent: March 16, 2023 19:23
To: Jérémie Galarneau 
Subject: Re: [lttng-dev] Tracing a docker containerized java application from 
the host

Hello again,

I solved the issue. The problem was that the host address from inside the 
container was 172.0.0.1 but the agent was looking for 127.0.0.1. So, one last 
question, is it possible to instruct the agent to look for/communicate with the 
sessiond using a specific address (different from 127.0.0.1)? Also, I'm 
currently sharing the folder "/var/run/lttng" with the container, which in my 
opinion isn't a very elegant way. Then, is it possible to do otherwise? If I 
only copy the file "agent.port" inside the container, I can list the registered 
events, but I cannot record them. (I guess it is related to the location of the 
app socket file).

Adel




On Thu, Mar 16, 2023 at 3:57 PM Adel Belkhiri 
mailto:adel.belkh...@gmail.com>> wrote:
Hi Jérémie,

Thank you for your reply. Yes, the container can communicate with the LTTtng 
session daemon that is running on the host machine. For instance, if I execute 
"lttng list -u" on the host I can see that there is an application registered 
and there are userspace events (e.g., lttng_jul:event,  statedumps, etc.). 
However, when I execute "lttng --jul -a", no java events are displayed.

Adel

On Thu, Mar 16, 2023 at 12:14 PM Jérémie Galarneau 
mailto:jga...@efficios.com>> wrote:
Hi Adel,

The java tracing facilities make use of an agent that communicates with the 
session deamon through a TCP socket. You must to ensure your java application 
can connect to the session daemon's 'agent-tcp-port'.

https://lttng.org/man/8/lttng-sessiond/v2.13/#doc-opt--agent-tcp-port

Is that port properly exposed by your container configuration?

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev 
mailto:lttng-dev-boun...@lists.lttng.org>> 
on behalf of Adel Belkhiri via lttng-dev 
mailto:lttng-dev@lists.lttng.org>>
Sent: March 15, 2023 20:03
To: lttng-dev@lists.lttng.org 
mailto:lttng-dev@lists.lttng.org>>
Subject: [lttng-dev] Tracing a docker containerized java application from the 
host

Hello everyone,

I am reaching out to seek assistance in tracing an instrumented Java 
application running within a Docker container from the host side.

In my setup, the LTTng session daemon, running on the host side, indicates that 
application registration has been completed (please refer to the logs). 
However, when running the command "lttng list --jul," no registered 
applications are displayed. Although the application successfully creates the 
"LttngLogHandler" object and attaches it to the logger, no traces are generated.

To allow the application to access the lttng socket file, the host's 
/var/run/lttng directory is shared with the container at launch (using the 
command "sudo docker run -p 8080:8080 -v /var/run/lttng:/var/run/lttng 
sample-image"). I am only interested in collecting userspace Java (--jul) 
traces.

I would greatly appreciate any assistance or guidance that you can provide. 
Thank you for your time.

Additional details include:

Ubuntu 22.04
Kernel: 5.15.0-60-generic
LTTng session daemon version: 2.13.2
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2
Regards,
Adel Belkhiri
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] UST context field "ip" is now in decimal since 2.13 instead of hexadecimal as before

2023-03-16 Thread Jérémie Galarneau via lttng-dev
Hi Thomas,

I have submitted a patch on our gerrit, see:
https://review.lttng.org/c/lttng-ust/+/9659

Thanks for the report!
Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of 
thomas.gatterweh--- via lttng-dev 
Sent: March 14, 2023 05:03
To: lttng-dev 
Subject: [lttng-dev] UST context field "ip" is now in decimal since 2.13 
instead of hexadecimal as before


Hi!



In this commit  
https://github.com/lttng/lttng-ust/commit/4e48b5d2debaf6c0c598489c183cc6cb2125c8a3
  the base for UST context field “ip” was changed from 16 (hexadecimal) to 10 
(decimal), most likely an unintentional copy error. See change in 
lttng-context-ip.c, line 47.

Can it be changed back to 16 (hexadecimal), so that the ip address recorded by 
this context field gets displayed in hex again, which makes much more sense?



Best regards,

Thomas Gatterweh
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] Tracing a docker containerized java application from the host

2023-03-16 Thread Jérémie Galarneau via lttng-dev
Hi Adel,

The java tracing facilities make use of an agent that communicates with the 
session deamon through a TCP socket. You must to ensure your java application 
can connect to the session daemon's 'agent-tcp-port'.

https://lttng.org/man/8/lttng-sessiond/v2.13/#doc-opt--agent-tcp-port

Is that port properly exposed by your container configuration?

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of Adel Belkhiri 
via lttng-dev 
Sent: March 15, 2023 20:03
To: lttng-dev@lists.lttng.org 
Subject: [lttng-dev] Tracing a docker containerized java application from the 
host

Hello everyone,

I am reaching out to seek assistance in tracing an instrumented Java 
application running within a Docker container from the host side.

In my setup, the LTTng session daemon, running on the host side, indicates that 
application registration has been completed (please refer to the logs). 
However, when running the command "lttng list --jul," no registered 
applications are displayed. Although the application successfully creates the 
"LttngLogHandler" object and attaches it to the logger, no traces are generated.

To allow the application to access the lttng socket file, the host's 
/var/run/lttng directory is shared with the container at launch (using the 
command "sudo docker run -p 8080:8080 -v /var/run/lttng:/var/run/lttng 
sample-image"). I am only interested in collecting userspace Java (--jul) 
traces.

I would greatly appreciate any assistance or guidance that you can provide. 
Thank you for your time.

Additional details include:

Ubuntu 22.04
Kernel: 5.15.0-60-generic
LTTng session daemon version: 2.13.2
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.2
Regards,
Adel Belkhiri
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] LTTng UST structure support

2023-02-09 Thread Jérémie Galarneau via lttng-dev
Hi Charles,

I'm not sure why you can't embed a graph in your application. The idea is to 
make new events visible to your source component (or the iterator it provides) 
by exposing some form of "user data" as a shared context [1][2]. When the event 
is made available to the source through that context, your "write" function can 
then pass it down the graph by invoking the graph's "run" method.

I'll see if I can find time to produce an exemple if you think it would be 
helpful.

Regards,
Jérémie

[1] 
https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-msg-iter.html#gaa0795c9c18725a844df5b5c705255977
[2] 
https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-self-comp.html#gae01283b1ee0c3945c4f54205a1528169
[3] 
https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-graph.html#gad2e1c1ab20d1400af1b552e70b3d567c

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of chafraysse--- 
via lttng-dev 
Sent: February 9, 2023 04:15
To: lttng-dev@lists.lttng.org 
Subject: Re: [lttng-dev] LTTng UST structure support

Hi Jérémie,

Thx for your reply,
I'm doing a mockup on an Ubuntu host for now
Ok for the graph, I cannot embed it in my application though
I wanted that application to directly output CTF (with compound types,
excluding LTTng) but I guess I'll output it in my format and then
post-process it in a bt2 graph with a custom source and the ctf sink

Best regards,

Charles

> Hi Charles,
>
> I can't really comment on what the packages do, but babeltrace2
> provides those headers under "include/babeltrace2-ctf-writer" since
> that library is somewhat "grafted" to the project. Which distro are you
> using?
>
> As for where to "plug" your bindings, that library is there to maintain
> compatibility with the ctf-writer library that was provided by
> Babeltrace 1.x as it had a number of external users. I don't expect it
> to keep up with new CTF versions.
>
> A more "future proof" integration point is to write a source component,
> and instanciate it in a graph configured with the CTF filesystem sink,
> and feed your events through the graph.
>
> Let me know if you want more information,
> Jérémie
>
> --
> Jérémie Galarneau
> EfficiOS Inc.
> https://www.efficios.com
>
> Le 2023-02-02 17:06, chafray...@free.fr a écrit :
> Hi,
>
> So I wrote a draft of Rust lib above ctf-writer, using the apis as
> demonstrated in the ctf-writer test
> For deployment I wanted to use "libbabeltrace2-ctf-writer.so" in the
> "libbabeltrace2-dev" package but I could not locate the matching
> includes in there or in the other babeltrace 2 packages
> Did I miss them somewhere ? Should I have plugged in at another level
> in babeltrace2 ?
>
> Best regards,
>
> Charles
>
> - Mail original -
> De: chafray...@free.fr
> À: "Mathieu Desnoyers" 
> Cc: lttng-dev@lists.lttng.org
> Envoyé: Lundi 16 Janvier 2023 10:38:28
> Objet: Re: [lttng-dev] LTTng UST structure support
>
> Hi Mathieu,
>
> Thanks for your reply :)
> I'll stick to bt2 modules in the meantime then
> I'll already be saving a ton of time with those and the CTF spec which
> is great !
>
> Best regards,
>
> Charles
>
> - Mail original -
> De: "Mathieu Desnoyers" 
> À: chafray...@free.fr, lttng-dev@lists.lttng.org
> Envoyé: Jeudi 12 Janvier 2023 21:10:57
> Objet: Re: [lttng-dev] LTTng UST structure support
>
> On 2023-01-09 09:02, chafraysse--- via lttng-dev wrote:
>> Hi,
>>
>> I'm looking for a CTF writer to serialize instrumentations in an
>> embedded Linux/Rust framework
>> LTTng UST looked like a very strong option, but I want to serialize
>> structures as CTF compound type structures and I did not see those
>> supported in the doc or api
>
> This is correct. I am currently working on a new project called
> "libside" (see https://git.efficios.com/?p=libside.git;a=summary) which
> features support for compound types.
>
> However, we still need to do the heavy-lifting implementation work of
> integrating this with LTTng-UST. This is the plan towards supporting
> compound types in LTTng-UST.
>
>> I'd love to have confirmation that I did not just miss something :)
>> If LTTng UST is out for me I will probably try to use the ctf-writer
>> module of babeltrace 2 instead
>
> For now the ctf-writer modules of bt2 would be an alternative to
> consider, but remember that it is not designed for low-impact tracing
> such as lttng-ust. So it depends on how much tracer overhead/runtime
> impact you can afford in your use-case.
>
> Thanks,
>
> Mathieu
>
>>
>> Best regards,
>>
>> Charles
>> ___
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> https://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] LTTng UST structure support

2023-02-02 Thread Jérémie Galarneau via lttng-dev
Hi Charles,

I can't really comment on what the packages do, but babeltrace2 provides those 
headers under "include/babeltrace2-ctf-writer" since that library is somewhat 
"grafted" to the project. Which distro are you using?

As for where to "plug" your bindings, that library is there to maintain 
compatibility with the ctf-writer library that was provided by Babeltrace 1.x 
as it had a number of external users. I don't expect it to keep up with new CTF 
versions.

A more "future proof" integration point is to write a source component, and 
instanciate it in a graph configured with the CTF filesystem sink, and feed 
your events through the graph.

Let me know if you want more information,
Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com


From: lttng-dev  on behalf of chafraysse--- 
via lttng-dev 
Sent: February 2, 2023 11:06
To: Mathieu Desnoyers 
Cc: lttng-dev@lists.lttng.org 
Subject: Re: [lttng-dev] LTTng UST structure support

Hi,

So I wrote a draft of Rust lib above ctf-writer, using the apis as demonstrated 
in the ctf-writer test
For deployment I wanted to use "libbabeltrace2-ctf-writer.so" in the 
"libbabeltrace2-dev" package but I could not locate the matching includes in 
there or in the other babeltrace 2 packages
Did I miss them somewhere ? Should I have plugged in at another level in 
babeltrace2 ?

Best regards,

Charles

- Mail original -
De: chafray...@free.fr
À: "Mathieu Desnoyers" 
Cc: lttng-dev@lists.lttng.org
Envoyé: Lundi 16 Janvier 2023 10:38:28
Objet: Re: [lttng-dev] LTTng UST structure support

Hi Mathieu,

Thanks for your reply :)
I'll stick to bt2 modules in the meantime then
I'll already be saving a ton of time with those and the CTF spec which is great 
!

Best regards,

Charles

- Mail original -
De: "Mathieu Desnoyers" 
À: chafray...@free.fr, lttng-dev@lists.lttng.org
Envoyé: Jeudi 12 Janvier 2023 21:10:57
Objet: Re: [lttng-dev] LTTng UST structure support

On 2023-01-09 09:02, chafraysse--- via lttng-dev wrote:
> Hi,
>
> I'm looking for a CTF writer to serialize instrumentations in an
> embedded Linux/Rust framework
> LTTng UST looked like a very strong option, but I want to serialize
> structures as CTF compound type structures and I did not see those
> supported in the doc or api

This is correct. I am currently working on a new project called
"libside" (see https://git.efficios.com/?p=libside.git;a=summary) which
features support for compound types.

However, we still need to do the heavy-lifting implementation work of
integrating this with LTTng-UST. This is the plan towards supporting
compound types in LTTng-UST.

> I'd love to have confirmation that I did not just miss something :)
> If LTTng UST is out for me I will probably try to use the ctf-writer
> module of babeltrace 2 instead

For now the ctf-writer modules of bt2 would be an alternative to
consider, but remember that it is not designed for low-impact tracing
such as lttng-ust. So it depends on how much tracer overhead/runtime
impact you can afford in your use-case.

Thanks,

Mathieu

>
> Best regards,
>
> Charles
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.13 - (Ta) Meilleure

2023-01-06 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the thirteenth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2023-01-05 lttng-tools 2.12.13 (National Whipped Cream Day)
* Fix: lttng: poptGetArg doesn't provide string ownership
* Fix: relayd: missing space in trace creation logging statement
* Fix: never use 'no' in a command variable
* Fix: consumer: snapshot: assertion on subsequent snapshot
* Fix: sessiond: instance uuid is not sufficiently unique

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.13.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.13.tar.bz2.asc
o
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.9 - Nordicité

2023-01-06 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the ninth bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2023-01-05 lttng-tools 2.13.9 (National Whipped Cream Day)
* Fix: lttng: poptGetArg doesn't provide string ownership
* Fix: relayd: missing space in trace creation logging statement
* Fix: event field value: assertion fails on empty string
* Build fix: rpath of test libraries results in non-reproducible build
* Fix: never use 'no' in a command variable
* Fix: sessiond: abort called on undefined client command
* Fix: consumer: snapshot: assertion on subsequent snapshot
* Fix: sessiond: instance uuid is not sufficiently unique

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.9.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.9.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH v2] Tests: select_poll_epoll: Add support for _time64

2022-12-14 Thread Jérémie Galarneau via lttng-dev
Hi Alistair,

The patch you submitted doesn't pass on x86 and x86-64.

I have written an alternative patch that works on the 32/64 variants of ARM and 
x86. I could only verify that it builds on RISC-V 64.

Are you able to compile-test it on RISC-V 32?

https://review.lttng.org/c/lttng-tools/+/8907

Thanks,
Jérémie


--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of Alistair 
Francis via lttng-dev 
Sent: December 13, 2022 00:09
To: Alistair Francis 
Cc: lttng-dev@lists.lttng.org 
Subject: Re: [lttng-dev] [PATCH v2] Tests: select_poll_epoll: Add support for 
_time64

On Thu, Oct 27, 2022 at 3:54 PM Alistair Francis
 wrote:
>
> From: Alistair Francis 
>
> Add support for the  64-bit time_t syscalls SYS_ppoll_time64
> and SYS_pselect6_time64.
>
> These are the syscalls that exist 32-bit platforms since the 5.1 kernel.
> 32-bit platforms with a 64-bit time_t only have these and don't have the
> original syscalls (such as 32-bit RISC-V).
>
> Fixes: https://github.com/lttng/lttng-tools/pull/162
> Signed-off-by: Alistair Francis 

Ping!

Alistair

> ---
> To keep the test_cases[] array clean I have implemented the functions
> for all builds, but the functions are a no-op if the syscall is missing.
>
> v2:
>  - Split out a seperate _time64 test
>
>  tests/regression/kernel/select_poll_epoll.cpp | 184 ++
>  1 file changed, 184 insertions(+)
>
> diff --git a/tests/regression/kernel/select_poll_epoll.cpp 
> b/tests/regression/kernel/select_poll_epoll.cpp
> index c0b688217..dfaab52c8 100644
> --- a/tests/regression/kernel/select_poll_epoll.cpp
> +++ b/tests/regression/kernel/select_poll_epoll.cpp
> @@ -5,6 +5,7 @@
>   *
>   */
>
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -48,10 +49,14 @@ int lttng_opt_quiet, lttng_opt_verbose, lttng_opt_mi;
>
>  static void run_working_cases(FILE *validation_output_file);
>  static void pselect_invalid_fd(FILE *validation_output_file);
> +static void pselect_time64_invalid_fd(FILE *validation_output_file);
>  static void test_ppoll_big(FILE *validation_output_file);
>  static void ppoll_fds_buffer_overflow(FILE *validation_output_file);
> +static void ppoll_time64_fds_buffer_overflow(FILE *validation_output_file);
>  static void pselect_invalid_pointer(FILE *validation_output_file);
> +static void pselect_time64_invalid_pointer(FILE *validation_output_file);
>  static void ppoll_fds_ulong_max(FILE *validation_output_file);
> +static void ppoll_time64_fds_ulong_max(FILE *validation_output_file);
>  static void epoll_pwait_invalid_pointer(FILE *validation_output_file);
>  static void epoll_pwait_int_max(FILE *validation_output_file);
>  static void ppoll_concurrent_write(FILE *validation_output_file);
> @@ -69,10 +74,14 @@ const struct test_case {
> { .run = run_working_cases, .produces_validation_info = true, 
> .timeout = -1 },
> { .run = run_working_cases, .produces_validation_info = true, 
> .timeout = 1 },
> { .run = pselect_invalid_fd, .produces_validation_info = false, 
> .timeout = 0 },
> +   { .run = pselect_time64_invalid_fd, .produces_validation_info = 
> false, .timeout = 0 },
> { .run = test_ppoll_big, .produces_validation_info = false, .timeout 
> = 0 },
> { .run = ppoll_fds_buffer_overflow, .produces_validation_info = 
> false, .timeout = 0 },
> +   { .run = ppoll_time64_fds_buffer_overflow, .produces_validation_info 
> = false, .timeout = 0 },
> { .run = pselect_invalid_pointer, .produces_validation_info = false, 
> .timeout = 0 },
> +   { .run = pselect_time64_invalid_pointer, .produces_validation_info = 
> false, .timeout = 0 },
> { .run = ppoll_fds_ulong_max, .produces_validation_info = false, 
> .timeout = 0 },
> +   { .run = ppoll_time64_fds_ulong_max, .produces_validation_info = 
> false, .timeout = 0 },
> { .run = epoll_pwait_invalid_pointer, .produces_validation_info = 
> true, .timeout = 0 },
> { .run = epoll_pwait_int_max, .produces_validation_info = true, 
> .timeout = 0 },
> { .run = ppoll_concurrent_write, .produces_validation_info = false, 
> .timeout = 0 },
> @@ -440,6 +449,44 @@ end:
> return;
>  }
>
> +/*
> + * Ask for 100 FDs in a buffer for allocated for only 1 FD, should
> + * segfault (eventually with a "*** stack smashing detected ***" message).
> + * The event should contain an array of 100 FDs filled with garbage.
> + */
> +static
> +void ppoll_time64_fds_buffer_overflow(
> +   FILE *validation_output_file __attribute__((unused)))
> +{
> +#ifdef SYS_ppoll_time64
> +   struct pollfd ufds[NB_FD];
> +   char buf[BUF_SIZE];
> +   int ret;
> +
> +   ufds[0].fd = wait_fd;
> +   ufds[0].events = POLLIN|POLLPRI;
> +
> +   /*
> +* As there is no timeout value, we don't convert to/from
> +* 64/32-bit time_t.
> +*/
> +   ret = syscall(SYS_ppoll_time64, ufds, 100, NULL, NULL);
> +   /*
> 

[lttng-dev] [RELEASE] Babeltrace 1.5.11

2022-11-02 Thread Jérémie Galarneau via lttng-dev
Hi,

Today we are releasing the eleventh bug-fix release of Babeltrace 1.5. While
this release series has reached EOL, this update was deemed necessary as the
latest release of popt (v1.19) introduced a breaking change (changing the
ownership of left-over command line arguments) that breaks prior babeltrace
v1.5.x releases.

Note that memory leak checking tools will report a leak when using popt < 1.19
when running this release. This leak is benign as it is limited to the command
line arguments and doesn't grow over time.

For more information, see:
https://src.fedoraproject.org/rpms/babeltrace/c/d48452beff87b145c038f070e7182358db04336c?branch=rawhide

Note that the latest announced release of this branch was v1.5.8. The following
change log includes the changes from all three follow-up releases.

2022-11-02 babeltrace 1.5.11 (Broadcast Traffic Professionals Day)
* Fix: distutils removed in python 3.12
* Fix: use-after-free with popt 1.19
* configure.ac: Basic fixes for autoconf 2.70
* Add gerrit config for stable-1.5
* port: disable debug-info by default on FreeBSD
* port: add missing includes for FreeBSD compat
* bindings: try importing collections.abc first for forward 
compatibility
* man: fix typo in babeltrace.1

Project website: https://babeltrace.org
Download link: 
https://www.efficios.com/files/babeltrace/babeltrace-1.5.11.tar.bz2
CTF specification: https://diamon.org/ctf/
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH] Fix incorrect number of tests in test_callstack

2022-10-21 Thread Jérémie Galarneau via lttng-dev
Hi Mikael,

I'm getting the correct number of tests here.
Can you provide the full output of the test?

Thanks,
Jérémie

On Thu, Oct 20, 2022 at 07:12:26PM +0200, Mikael Beckius via lttng-dev wrote:
> regression/kernel/test_callstack (Wstat: 256 Tests: 
> 12 Failed: 1)
>   Failed test:  12
>   Non-zero exit status: 1
>   Parse errors: Bad plan.  You planned 11 tests but ran 12.
> 
> Signed-off-by: Mikael Beckius 
> ---
>  tests/regression/kernel/test_callstack | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/regression/kernel/test_callstack 
> b/tests/regression/kernel/test_callstack
> index a4477fd7c..b5d604535 100755
> --- a/tests/regression/kernel/test_callstack
> +++ b/tests/regression/kernel/test_callstack
> @@ -9,7 +9,7 @@ TEST_DESC="Kernel tracer - Callstack context"
>  
>  CURDIR=$(dirname "$0")/
>  TESTDIR=$CURDIR/../..
> -NUM_TESTS=11
> +NUM_TESTS=12
>  
> TEST_APP_USERSPACE="$TESTDIR/utils/testapp/gen-syscall-events-callstack/gen-syscall-events-callstack"
>  
> TEST_APP_KERNELSPACE="$TESTDIR/utils/testapp/gen-syscall-events/gen-syscall-events"
>  PARSE_CALLSTACK="$TESTDIR/utils/parse-callstack.py"
> @@ -123,7 +123,7 @@ function test_kernel_callstack()
>  # Only run userspace callstack test on x86
>  uname -m | grep -E "x86" >/dev/null 2>&1
>  if test $? == 0; then
> - NUM_TESTS=$((NUM_TESTS+11))
> + NUM_TESTS=$((NUM_TESTS+10))
>   RUN_USERSPACE_TEST=1
>  else
>   RUN_USERSPACE_TEST=0
> -- 
> 2.34.1
> 
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] Shared memory circular buffer and K8s pods

2022-10-18 Thread Jérémie Galarneau via lttng-dev
Hi Paul, 

We don’t have much documentation about deploying in Kubernetes; we’re working on
it.

It’s hard to provide very specific guidance without knowing your setup and
constraints. Since you mention applications, I’m assuming you are mostly
interested in user space tracing. There are two main approaches for that.

First, you can deploy the full LTTng stack in every container: the daemons of
LTTng-tools, and LTTng-UST + your app. That’s probably the simplest way to get
going, but it goes against K8s’ model of having one process per container, which
can become annoying.

The other approach, which I would recommend you look into, is deploying an LTTng
sidecar per pod that runs the session daemon, and installing LTTng-UST (the
tracer libraries) along your instrumented applications in the other containers
of the pod.

Michael Jeanson has a demo showing how he deployed LTTng in K8s using that
approach. Hopefully, that can help you get started:

https://github.com/mjeanson/gcloud-lttng

There are a couple things to note in this configuration:
  - A “memory” volume, devshm, is shared between containers. It has to be
large enough to accommodate your buffer configuration, and
  - the containers share the same pid namespace across the pod

(https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/).

Then that leaves the question of where you want to store traces. There’s a ton
of options there. By default, Michael's demo writes them to the lttng-home
volume. You may want to look into network streaming to send traces over the
network to a relay daemon (possibly running in another pod):

https://lttng.org/docs/v2.13/#doc-lttng-relayd

Otherwise, you may also be interested in session rotations to manage traces
pretty much how you would handle logs:

https://lttng.org/blog/2019/10/15/lttng-session-rotation/

https://lttng.org/docs/v2.13/#doc-session-rotation

Let me know if you have more questions,
Jérémie

On Tue, Oct 18, 2022 at 01:00:47PM +, Lemay, Paul via lttng-dev wrote:
> Hello There,
> 
> We are looking at LTTng for a development here at Dell. As I understand the 
> LTTng, there are shared memories of circular buffer traces created between  
> an application and the consumer daemon. After looking at some presentation 
> that you did, I see that you have started working on containerization and 
> pods.
> 
> So our applications run in pods, and am not sure how to organize the pods 
> knowing about those shared memories? Can you help us better understand how 
> our code should be organized in the context of Kubernetes? Any documentation 
> that we can access?
> 
> Best Regards
> 
> 
> Internal Use - Confidential

> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools 2/2] Tests: select_poll_epoll: Add support for _time64

2022-10-13 Thread Jérémie Galarneau via lttng-dev
On Thu, Oct 13, 2022 at 10:12:48AM +1000, Alistair Francis wrote:
> On Wed, Oct 12, 2022 at 11:19 PM Jérémie Galarneau
>  wrote:
> >
> > On Fri, Oct 07, 2022 at 10:39:18AM +1000, Alistair Francis via lttng-dev 
> > wrote:
> >
> > Hi Alistair,
> >
> > The first patch is good, I'll merge it in master.
> > Some comments on this patch follow.
> 
> Thanks!
> 
> >
> > > From: Alistair Francis 
> > >
> > > Add support for the  64-bit time_t syscalls SYS_ppoll_time64
> > > and SYS_pselect6_time64.
> > >
> > > These are the syscalls that exist 32-bit platforms since the 5.1 kernel.
> > > 32-bit platforms with a 64-bit time_t only have these and don't have the
> > > original syscalls (such as 32-bit RISC-V).
> > >
> > > Fixes: https://github.com/lttng/lttng-tools/pull/162
> > > Signed-off-by: Alistair Francis 
> > > ---
> > >  tests/regression/kernel/select_poll_epoll.cpp | 53 +++
> > >  1 file changed, 53 insertions(+)
> > >
> > > diff --git a/tests/regression/kernel/select_poll_epoll.cpp 
> > > b/tests/regression/kernel/select_poll_epoll.cpp
> > > index c0b688217..4a6d394f4 100644
> > > --- a/tests/regression/kernel/select_poll_epoll.cpp
> > > +++ b/tests/regression/kernel/select_poll_epoll.cpp
> > > @@ -5,6 +5,7 @@
> > >   *
> > >   */
> > >
> > > +#include 
> > >  #include 
> > >  #include 
> > >  #include 
> > > @@ -456,8 +457,22 @@ void ppoll_fds_buffer_overflow(
> > >   ufds[0].fd = wait_fd;
> > >   ufds[0].events = POLLIN|POLLPRI;
> > >
> > > +#ifdef SYS_ppoll_time64
> > > + /*
> > > +  * As there is no timeout value, we don't convert to/from
> > > +  * 64/32-bit time_t.
> > > +  */
> > > + ret = syscall(SYS_ppoll_time64, ufds, 100, NULL, NULL);
> > > + if (ret == 0 || errno != ENOSYS) {
> > > + goto ppoll_fds_buffer_overflow_done;
> > > + }
> > > +#endif
> > > +
> >
> > This results in the following warning when building for an architecture
> > that doesn't have SYS_ppoll_time64 defined:
> >
> > label ‘ppoll_fds_buffer_overflow_done’ defined but not used [-Wunused-label]
> > ppoll_fds_buffer_overflow_done:
> > ^~
> > select_poll_epoll.cpp: In function ‘void ppoll_fds_ulong_max(FILE*)’:
> 
> Argh, I'll fix this
> 
> >
> >
> > Also, it is my understanding that both syscalls can be available on some
> > platforms. In that case, it would make sense to add them as separate
> > tests and skip tests that target non-existant syscalls.
> 
> So all 32-bit platforms since the 5.1 (or 5.4?) kernel have both syscalls.
> 
> From my understanding the original syscalls will be removed on 32-bit
> platforms at some point (before 2038) and there will only be *_time64
> variants.
> 
> If you want I can copy the tests to test both syscall types, but I
> don't think that's necessary.
>

My fear is that on those platforms the test will pass if the kernel tracer
succeeds in tracing any of the two syscalls.

I think it will be easier to simply have separate tests than validate the
two invocations independently in the trace.

Thanks!
Jérémie

> Alistair
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools 2/2] Tests: select_poll_epoll: Add support for _time64

2022-10-12 Thread Jérémie Galarneau via lttng-dev
On Fri, Oct 07, 2022 at 10:39:18AM +1000, Alistair Francis via lttng-dev wrote:

Hi Alistair,

The first patch is good, I'll merge it in master.
Some comments on this patch follow.

> From: Alistair Francis 
> 
> Add support for the  64-bit time_t syscalls SYS_ppoll_time64
> and SYS_pselect6_time64.
> 
> These are the syscalls that exist 32-bit platforms since the 5.1 kernel.
> 32-bit platforms with a 64-bit time_t only have these and don't have the
> original syscalls (such as 32-bit RISC-V).
> 
> Fixes: https://github.com/lttng/lttng-tools/pull/162
> Signed-off-by: Alistair Francis 
> ---
>  tests/regression/kernel/select_poll_epoll.cpp | 53 +++
>  1 file changed, 53 insertions(+)
> 
> diff --git a/tests/regression/kernel/select_poll_epoll.cpp 
> b/tests/regression/kernel/select_poll_epoll.cpp
> index c0b688217..4a6d394f4 100644
> --- a/tests/regression/kernel/select_poll_epoll.cpp
> +++ b/tests/regression/kernel/select_poll_epoll.cpp
> @@ -5,6 +5,7 @@
>   *
>   */
>  
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -456,8 +457,22 @@ void ppoll_fds_buffer_overflow(
>   ufds[0].fd = wait_fd;
>   ufds[0].events = POLLIN|POLLPRI;
>  
> +#ifdef SYS_ppoll_time64
> + /*
> +  * As there is no timeout value, we don't convert to/from
> +  * 64/32-bit time_t.
> +  */
> + ret = syscall(SYS_ppoll_time64, ufds, 100, NULL, NULL);
> + if (ret == 0 || errno != ENOSYS) {
> + goto ppoll_fds_buffer_overflow_done;
> + }
> +#endif
> +

This results in the following warning when building for an architecture
that doesn't have SYS_ppoll_time64 defined:

label ‘ppoll_fds_buffer_overflow_done’ defined but not used [-Wunused-label]
ppoll_fds_buffer_overflow_done:
^~
select_poll_epoll.cpp: In function ‘void ppoll_fds_ulong_max(FILE*)’:


Also, it is my understanding that both syscalls can be available on some
platforms. In that case, it would make sense to add them as separate
tests and skip tests that target non-existant syscalls.

Thanks!
Jérémie


> +#ifdef SYS_ppoll
>   ret = syscall(SYS_ppoll, ufds, 100, NULL, NULL);
> +#endif
>  
> +ppoll_fds_buffer_overflow_done:
>   if (ret < 0) {
>   PERROR("ppoll");
>   } else if (ret > 0) {
> @@ -483,7 +498,22 @@ void ppoll_fds_ulong_max(FILE *validation_output_file 
> __attribute__((unused)))
>   ufds[0].fd = wait_fd;
>   ufds[0].events = POLLIN|POLLPRI;
>  
> +#ifdef SYS_ppoll_time64
> + /*
> +  * As there is no timeout value, we don't convert to/from
> +  * 64/32-bit time_t.
> +  */
> + ret = syscall(SYS_ppoll_time64, ufds, ULONG_MAX, NULL, NULL);
> + if (ret == 0 || errno != ENOSYS) {
> + goto ppoll_fds_ulong_max_done;
> + }
> +#endif
> +
> +#ifdef SYS_ppoll
>   ret = syscall(SYS_ppoll, ufds, ULONG_MAX, NULL, NULL);
> +#endif
> +
> +ppoll_fds_ulong_max_done:
>   if (ret < 0) {
>   /* Expected error. */
>   } else if (ret > 0) {
> @@ -524,7 +554,18 @@ void pselect_invalid_fd(FILE *validation_output_file 
> __attribute__((unused)))
>   FD_ZERO();
>   FD_SET(fd, );
>  
> +#ifdef SYS_pselect6_time64
> + ret = syscall(SYS_pselect6_time64, fd + 1, , NULL, NULL, NULL, 
> NULL);
> + if (ret == 0 || errno != ENOSYS) {
> + goto pselect_invalid_fd_done;
> + }
> +#endif
> +
> +#ifdef SYS_pselect6
>   ret = syscall(SYS_pselect6, fd + 1, , NULL, NULL, NULL, NULL);
> +#endif
> +
> +pselect_invalid_fd_done:
>   if (ret == -1) {
>   /* Expected error. */
>   } else if (ret) {
> @@ -553,8 +594,20 @@ void pselect_invalid_pointer(
>   FD_ZERO();
>   FD_SET(wait_fd, );
>  
> +#ifdef SYS_pselect6_time64
> + ret = syscall(SYS_pselect6_time64, 1, , (fd_set *) invalid, NULL, 
> NULL,
> + NULL);
> + if (ret == 0 || errno != ENOSYS) {
> + goto pselect_invalid_pointer_done;
> + }
> +#endif
> +
> +#ifdef SYS_pselect6
>   ret = syscall(SYS_pselect6, 1, , (fd_set *) invalid, NULL, NULL,
>   NULL);
> +#endif
> +
> +pselect_invalid_pointer_done:
>   if (ret == -1) {
>   /* Expected error. */
>   } else if (ret) {
> -- 
> 2.37.3
> 
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] LTTng and containers.

2022-10-12 Thread Jérémie Galarneau via lttng-dev
Hi Maksim,

It's hard to give general advice without knowing more about your constraints.

I can see three main approaches that are easy to reach:

  1.  Store the traces in each container and fetch them,
  2.  Trace to a shared volume (make sure sessions are stopped or rotated 
before you read them),
  3.  Or stream traces to a "collector" container (perhaps the one doing the 
analyses) using network streaming

If you want to continuously consume traces, I would suggest you look into 
"trace rotations". You could setup periodic trace rotations (based on size or 
time) and ship traces to your processor node as they become available.

Although my demo wasn't running in a container, the basic idea is what I 
presented at FOSDEM in 2019:

https://archive.fosdem.org/2019/schedule/event/lttng/
[https://fosdem.org/2019/assets/style/logo-gear-7204a6874eb0128932db10ff4030910401ac06f4e907f8b4a40da24ba592b252.png]
FOSDEM 2019 - Fine-grained Distributed Application Monitoring Using 
LTTng
archive.fosdem.org

I hope that helps a bit,
Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of Maksim 
Khmelevskiy via lttng-dev 
Sent: October 10, 2022 12:12
To: lttng-dev@lists.lttng.org 
Subject: [lttng-dev] LTTng and containers.

Hi,

I would like to ask regarding the hot topic - container tracing. I've seen a 
youtube video, have read a 
message from 
LTTng mailing list and tried to google more about this topic but didn't find 
much of info. Could you please direct me where should I continue digging?
My problem:
I would like to have multiple containers where traces are generated by apps 
with compiled-in tracepoints. Traces could be stored in these containers as 
well.
Besides these containers I would have a trace processor container, a master 
container which could address a container(or a trace session) and fetch traces 
from it and read with babeltrace or similar tool.
So far, intuitively, remote tracing comes to my mind but before continuing with 
the task I would be happy to hear an advice from LTTng devs.

Thank you!
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] lttng-ust on arm64 getting bogged down by the getcpu syscall (taking more than 600ns per call)

2022-10-12 Thread Jérémie Galarneau via lttng-dev
Hi,

I think the first problem you will run into is that rseq is only available on 
kernels 4.18+.

As far as I know, starting with glibc 2.35, getcpu() defers to using rseq when 
available.

Is there a way you can upgrade these two components and see if the overhead is 
reduced?

Jérémie

--
Jérémie Galarneau
EfficiOS Inc.
https://www.efficios.com

From: lttng-dev  on behalf of Akhil 
Veeraghanta via lttng-dev 
Sent: October 11, 2022 16:57
To: lttng-dev@lists.lttng.org 
Subject: [lttng-dev] lttng-ust on arm64 getting bogged down by the getcpu 
syscall (taking more than 600ns per call)

Hello!

I've run into an issue with getcpu not having a vsdo implementation and taking 
anywhere from 600ns to 80us (avg 1 us) when using lttng-ust tracepoints.
I am on lttng v2.13 and kernel version 4.9.253-l4t, running on a jetson 
(arm64). I was digging around and found that rseq might be the recommended next 
step

I am wondering:

  1.  Are there examples of using rseq system call to replace getcpu
  2.  Are there any existing patches that I can apply to get better getcpu 
performance

Thanks in advance,
Akhil
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.12 - (Ta) Meilleure

2022-08-22 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the twelfth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2022-08-22 lttng-tools 2.12.12 (National Bao Day)
* Fix: waiter: futex wait: handle spurious futex wakeups
* Fix: futex wait: handle spurious futex wakeups
* Fix: utils: unhandled close return value
* Fix: agent port file is o+w when launching as root
* Fix: tests: don't assume sequential cpuids
* Fix: ust-consumerd: set `hangup_flush_done` in a locked context
* Revert "Fix: sessiond: rotation trigger leak"
* Fix: lttng-snapshot: use after free of max size argument
* Fix: lttng: snapshot: add-output: leak of max size parameter
* Tests: fix: lttng-create: leaked command parameter
* Fix: sessiond: rotation trigger leak
* Tests: fix: schedule api: leak of rotation schedule list
* Fix: lttng: enable-rotation: leak of command parameter
* Fix: lttng: track: leaked command parameter
* Fix: lttng: enable-channel: leak of popt arguments
* Tests: fix: leak of some attributes of ltt_ust_session
* Fix: liblttng-ctl: non-packed structure used for tracker serialization
* Fix: test: lttng kernel modules still loaded after running 
test_clock_override

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.12.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.12.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.8 - Nordicité

2022-08-22 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the eighth bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2022-08-22 lttng-tools 2.13.8 (National Bao Day)
* Fix: waiter: futex wait: handle spurious futex wakeups
* Fix: futex wait: handle spurious futex wakeups
* Fix: utils: unhandled close return value
* Fix: agent port file is o+w when launching as root
* Fix: tests: don't assume sequential cpuids
* Fix: sessiond: handle empty scheduled rotations
* Fix: sessiond: report client list allocation failure as a fatal error
* Fix: ust-consumerd: set `hangup_flush_done` in a locked context
* Fix: sessiond: size-based rotations never trigger
* Fix: lttng-snapshot: use after free of max size argument
* Fix: lttng: snapshot: add-output: leak of max size parameter
* Tests: fix: lttng-create: leaked command parameter
* Fix: sessiond: rotation trigger leak
* Tests: fix: schedule api: leak of rotation schedule list
* Fix: lttng: enable-rotation: leak of command parameter
* Fix: lttng: track: leaked command parameter
* Fix: lttng: add-trigger: leak of parser context on capture
* Tests: fix: leak of trigger in trigger listing tests
* Fix: action error query: leak of action path
* Fix: lttng: enable-channel: leak of popt arguments
* Tests: clean-up: rate policy: remove stale comment
* Tests: fix: leak of rate policy in rate policy unit tests
* Tests: fix: leak of payload in serdes test of log level rule
* Tests: fix: leak of some attributes of ltt_ust_session
* Fix: liblttng-ctl: leak of payload on field listing
* Fix: liblttng-ctl: non-packed structure used for tracker serialization
* Fix: test: lttng kernel modules still loaded after running 
test_clock_override

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.8.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.8.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.11 - (Ta) Meilleure

2022-04-13 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the eleventh bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2022-04-13 lttng-tools 2.12.11 (International Day of Pink)
* Fix: notification: assert on len > 0 for dropped notification message
* Fix: sessiond: cmd_enable_channel: negative error code used

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.11.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.11.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.7 - Nordicité

2022-04-13 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the seventh bug-fix release of LTTng-tools 2.13 -
Nordicité. This release addresses a number of issues listed below.

2022-04-13 lttng-tools 2.13.7 (International Day of Pink)
* Fix: sessiond: assert on empty payload when handling client out event
* Fix: Revert of 814b4934e2604a419bcb8eec57c0450dbb47e2c3
* Fix: sessiond: inverted condition checking for empty hash table
* Fix: notification: kernel: consumption of event notification stalls
* Fix: notification: assert on len > 0 for dropped notification message
* Fix: example: print_notification is called on status all returned 
status
* Fix: sessiond: assertion hit in ltt_sessions_ht_empty
* Fix: tests: missing _GNU_SOURCE for F_GETPIPE_SZ
* Fix: compat: 'LTTNG_UST_ABI_PROCNAME_LEN' is undeclared
* Fix: sessiond: cmd_enable_channel: negative error code used

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.7.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.7.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.6 - Nordicité

2022-03-28 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the sixth bug-fix release of LTTng-tools 2.13 - Nordicité.
This release addresses a number of issues listed below.

2022-03-28 lttng-tools 2.13.6 (National Hot Tub Day)
* Fix: hide symbols erroneously exported in 2.13.5

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.6.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.6.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.10 - (Ta) Meilleure

2022-03-28 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the tenth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2022-03-28 lttng-tools 2.12.10 (National Hot Tub Day)
* Fix: Remove liblttng-ctl.so dependency on liburcu-cds.so and 
liburcu-common.so

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.10.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.10.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.9 - (Ta) Meilleure

2022-03-28 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the ninth bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2022-03-28 lttng-tools 2.12.9 (National Hot Tub Day)
* Fix: lttng-elf: wrong error label used by error path
* Fix: use the correct endian compat macros
* Fix: lttng-elf: untrusted entry size divisor
* Fix: event: erroneous bound check on perf counter name size
* Fix: relayd: missing session unlock on error path
* fix: warning '-Wstringop-truncation' with GCC 11.2
* Add Log4j 2.x agent tests for the 'log4j' domain
* Fix: relayd: session id is ignored by 2.11+ create session command
* Fix: consumerd: use-after-free of metadata bucket
* Fix: ust-consumerd: leak of stream control structure
* Fix: liblttng-ctl: erroneous flat size computation
* Build fix: relayd: mismatching function signatures
* Build fix: use of mutable keyword in C file
* Fix: relayd: connection abruptly closed on viewer stream creation 
failure
* Fix: relayd: live client fails on clear of multi-domain session
* Tests: fix: select_poll_epoll: test assumes epoll fd value
* Fix: rotation: hang on destroy when using scheduled rotation based on 
timer
* Fix: consumerd: fd still open after `lttng snapshot record` returns
* Fix: event: unchecked return value for lttng_strncpy
* Fix: event: format specifier for ssize_t
* Fix: sessiond: lttng_channel object is not reclaimed
* Fix: common: local_attr might leak
* Fix: session: end goto label used for error path
* Fix: ser/des: missing null terminator on payload append
* Fix: test: test plan/skip must come after TAP initialization
* Fix: test: missing test plan for non-x86/arm platforms (i.e powerpc)
* Fix: liblttng-ctl comm: lttng_event_field is not packed
* Fix: liblttng-ctl comm: lttng_event_context is not packed
* Fix: liblttng-ctl comm: lttng_event is not packed
* libcommon: move event.c to libcommon-lgpl
* Fix: liblttng-ctl comm: lttng_channel is not packed
* Fix: lttng-ctl: erroneous uses of LTTNG_PACKED
* Backport: lttng_buffer_view_is_valid, 
lttng_buffer_view_contains_string
* Fix: conversion from KB to bytes overflow on arm32
* Fix: Unexpected payload size in cmd_recv_stream_2_11
* Tests: add kernel test into the `make check` test suite.

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.9.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.9.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.5 - Nordicité

2022-03-28 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the fifth bug-fix release of LTTng-tools 2.13 - Nordicité.
This release addresses a number of issues listed below.

2022-03-28 lttng-tools 2.13.5 (National Hot Tub Day)
* Fix: doc: action: wrong function documented for action_list destroy
* Fix: lttng-elf: wrong error label used by error path
* Fix: use the correct endian compat macros
* Fix: tests: uninitialized lttng_payload
* Fix: sessiond: ust-app: uninitialized name logged on stream copy 
failure
* Fix: lttng-elf: untrusted entry size divisor
* Fix: event: erroneous bound check on perf counter name size
* Fix: sessiond: event name length check is too strict
* Fix: relayd: missing session unlock on error path
* fix: warning '-Wstringop-truncation' with GCC 11.2
* Add Log4j 2.x agent tests for the 'log4j' domain
* Fix: relayd: session id is ignored by 2.11+ create session command
* Build fix: consumer: aggregate initialization isn't supported
* Fix: consumerd: use-after-free of metadata bucket
* Fix: ust-consumerd: leak of stream control structure
* Fix: liblttng-ctl: erroneous flat size computation
* Fix: test: babeltrace1 python bindings exposes `op_enum` as a string
* Build fix: relayd: mismatching function signatures
* Build fix: use of mutable keyword in C file
* Fix: relayd: connection abruptly closed on viewer stream creation 
failure
* Fix: relayd: live client fails on clear of multi-domain session
* fix: msgpack requires limits.h for UINT_MAX
* Fix: liblttng-ctl: hide symbols introduced by packing fixes
* Fix: rotation: hang on destroy when using scheduled rotation based on 
timer
* Fix: consumerd: fd still open after `lttng snapshot record` returns
* Fix: event: unchecked return value for lttng_strncpy
* Fix: event: format specifier for ssize_t
* Fix: sessiond: use after free
* Fix: sessiond: `break` used instead of `goto`
* Fix: sessiond: lttng_channel object is not reclaimed
* Fix: common: local_attr might leak
* Fix: session: end goto label used for error path
* Fix: sessiond: event, filter expression, bytecode, exclusions might 
leak
* Fix: lttng-sessiond: event_context might leak
* Fix: lttng-ctl: uninitialized pointer read
* Fix: ser/des: missing null terminator on payload append
* Fix: test: test plan/skip must come after TAP initialization
* Fix: test: missing test plan for non-x86/arm platforms (i.e powerpc)
* Fix: remove debugging output
* Fix: tests: test_kernel: break should only be used in loops
* Fix: tools/snapshots/test_kernel flaky test
* Tests: Fix: test_list_triggers_cli: support in-kernel builtin 
lttng-modules
* Fix: lttng: truncated addresses and offsets on 32-bit builds
* Fix: liblttng-ctl comm: lttng_event_field is not packed
* Fix: liblttng-ctl comm: lttng_event_context is not packed
* Fix: liblttng-ctl comm: lttng_event is not packed
* libcommon: move event.c to libcommon-lgpl
* Fix: liblttng-ctl comm: lttng_channel is not packed
* Fix: conversion from KB to bytes overflow on arm32
* Fix: Unexpected payload size in cmd_recv_stream_2_11
* Fix: liblttng-ctl: missing index allocator symbols
* Fix: lttng-sessiond: null pointer used to log session name
* Tests: add kernel test into the `make check` test suite.
* Build dist fix: some kernel tests are not distributed
* Tests: fix: test_kernel_function: erroneous test count
* Tests: fix: test_kernel_function: event name mismatch
* Tests: fix: select_poll_epoll: test assumes epoll fd value
* Fix: missing RCU read side critical sections

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.5.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.5.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Fix: consumer-stream: use-after-free of metadata bucket

2022-03-07 Thread Jérémie Galarneau via lttng-dev
Hi Vincent,

I had a chance to look into this and came up with the following fix:
https://review.lttng.org/c/lttng-tools/+/7478/4

Would you have a chance to try it on your end before I merge it?

Thanks for the great bug report!
Jérémie

- Original Message -
> From: "Vincent Whitchurch" 
> To: "Jeremie Galarneau" 
> Cc: "lttng-dev" , "kernel" 
> Sent: Wednesday, March 2, 2022 4:27:30 AM
> Subject: Re: [lttng-dev] [PATCH lttng-tools] Fix: consumer-stream: 
> use-after-free of metadata bucket

> On Tue, Mar 01, 2022 at 06:19:23PM +0100, Jérémie Galarneau wrote:
>> Thanks a lot for reporting the problem. If I understand the ASAN
>> report correctly, the stream itself will also be double free'd, so
>> I don't think this is the complete fix.
> 
> Yeah, it looked odd that consumer_stream_destroy() is called recursively
> on the same stream but AFAICS the code's been like this for a while so I
> assumed it was on purpose, and only the metadata bucket stuff was
> relatively new.  ASAN doesn't detect any double frees of the stream
> itself, but I guess calling call_rcu(..., free_stream_rcu) twice on the
> same stream is not expected behaviour and could lead to other problems.
> 
>> There definitely seems to be a problem with regards to the ownership
>> of the metadata channel vs stream. Let me look into it.
> 
> Great, thank you!
> 
>> I see that you fall into a case where the metadata setup fails,
>> can you share more info about how this can be reproduced?
> 
> In the core dump I received (on v2.12.4), consumer_stream_destroy() was
> called from the error label in setup_metadata and ret was set to
> LTTCOMM_CONSUMERD_ERROR_METADATA.  So consumer_send_relayd_stream() had
> returned an error.  I only had the core dump and no other logs, so I did
> not know which of the paths inside consumer_send_relayd_stream() had
> failed, but since I was primarily interested in fixing the crash itself
> I simply forced this code path to be taken:
> 
> diff --git a/src/common/ust-consumer/ust-consumer.c
> b/src/common/ust-consumer/ust-consumer.c
> index fa1c71299..97ed59632 100644
> --- a/src/common/ust-consumer/ust-consumer.c
> +++ b/src/common/ust-consumer/ust-consumer.c
> @@ -908,8 +908,7 @@ static int setup_metadata(struct lttng_consumer_local_data
> *ctx, uint64_t key)
> 
>   /* Send metadata stream to relayd if needed. */
>   if (metadata->metadata_stream->net_seq_idx != (uint64_t) -1ULL) {
> - ret = consumer_send_relayd_stream(metadata->metadata_stream,
> - metadata->pathname);
> + ret = -1;
>   if (ret < 0) {
>   ret = LTTCOMM_CONSUMERD_ERROR_METADATA;
>   goto error;
> 
> With the above patch, I could easily reproduce the use-after-free using
> the following steps on the latest release v2.13.4, and it was clear that
> this use-after-free was the cause of the original core dump on the older
> release too.
> 
> Build with ASAN:
> 
> lttng-tools$ LDFLAGS=-fsanitize=address CFLAGS=-fsanitize=address ./configure
> 
> Shell #1:
> 
> lttng-ust$ tests/compile/api0/hello/hello 1
> 
> Shell #2:
> 
> lttng-tools$ ASAN_OPTIONS=detect_odr_violation=0
> ./src/bin/lttng-sessiond/lttng-sessiond
> 
> Shell #3:
> 
> lttng-tools$ export ASAN_OPTIONS=detect_odr_violation=0
> lttng-tools$ ./src/bin/lttng/lttng create --live && ./src/bin/lttng/lttng
> enable-event --userspace 1 && ./src/bin/lttng/lttng start && sleep 1 &&
> ./src/bin/lttng/lttng stop
> 
> The ASAN splat should be seen in shell #2.  Note that you may have to
> run the command in shell #3 a couple of times since
> LTTNG_CONSUMER_SETUP_METADATA doesn't seem to be sent every time.
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Fix: consumer-stream: use-after-free of metadata bucket

2022-03-01 Thread Jérémie Galarneau via lttng-dev


- Message original -
> De: "lttng-dev" 
> À: "lttng-dev" 
> Cc: ker...@axis.com
> Envoyé: Vendredi 25 Février 2022 10:12:02
> Objet: [lttng-dev] [PATCH lttng-tools] Fix: consumer-stream: use-after-free 
> of metadata bucket

> When consumer_stream_destroy() is called from, for example, the error
> path in setup_metadata(), consumer_stream_free() can end up being called
> twice on the same stream.  Since the stream->metadata_bucket is not set
> to NULL after being destroyed, it leads to a use-after-free:
> 
> ERROR: AddressSanitizer: heap-use-after-free on address 0x60400318
> READ of size 8 at 0x60400318 thread T7
> #0 in metadata_bucket_destroy
> #1 in consumer_stream_free
> #2 in consumer_stream_destroy
> #3 in setup_metadata
> #4 in lttng_ustconsumer_recv_cmd
> #5 in lttng_consumer_recv_cmd
> #6 in consumer_thread_sessiond_poll
> #7 in start_thread nptl/pthread_create.c:481
> #8 in clone (/lib/x86_64-linux-gnu/libc.so.6+0xfcbde)
> 
> 0x60400318 is located 8 bytes inside of 48-byte region
> [0x60400310,0x60400340)
> freed by thread T7 here:
> #0 in __interceptor_free
> #1 in metadata_bucket_destroy
> #2 in consumer_stream_free
> #3 in consumer_stream_destroy
> #4 in clean_channel_stream_list
> #5 in consumer_del_channel
> #6 in consumer_stream_destroy
> #7 in setup_metadata
> #8 in lttng_ustconsumer_recv_cmd
> #9 in lttng_consumer_recv_cmd
> #10 in consumer_thread_sessiond_poll
> #11 in start_thread nptl/pthread_create.c:481
> 
> previously allocated by thread T7 here:
> #0 in __interceptor_calloc
> #1 in zmalloc
> #2 in metadata_bucket_create
> #3 in consumer_stream_enable_metadata_bucketization
> #4 in lttng_ustconsumer_set_stream_ops
> #5 in lttng_ustconsumer_on_recv_stream
> #6 in lttng_consumer_on_recv_stream
> #7 in create_ust_streams
> #8 in ask_channel
> #9 in lttng_ustconsumer_recv_cmd
> #10 in lttng_consumer_recv_cmd
> #11 in consumer_thread_sessiond_poll
> #12 in start_thread nptl/pthread_create.c:481
> 
> Thread T7 created by T0 here:
> #0 in __interceptor_pthread_create
> #1 in main
> #2 in __libc_start_main ../csu/libc-start.c:332
> 
> SUMMARY: AddressSanitizer: heap-use-after-free in metadata_bucket_destroy
> 
> Signed-off-by: Vincent Whitchurch 
> ---
> src/common/consumer/consumer-stream.cpp | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/src/common/consumer/consumer-stream.cpp
> b/src/common/consumer/consumer-stream.cpp
> index 2dc3f002b..481611c3e 100644
> --- a/src/common/consumer/consumer-stream.cpp
> +++ b/src/common/consumer/consumer-stream.cpp
> @@ -988,6 +988,7 @@ void consumer_stream_free(struct lttng_consumer_stream
> *stream)
>   LTTNG_ASSERT(stream);
> 
>   metadata_bucket_destroy(stream->metadata_bucket);
> + stream->metadata_bucket = NULL;

Hi Vincent,

Thanks a lot for reporting the problem. If I understand the ASAN
report correctly, the stream itself will also be double free'd, so
I don't think this is the complete fix.

There definitely seems to be a problem with regards to the ownership
of the metadata channel vs stream. Let me look into it.

I see that you fall into a case where the metadata setup fails,
can you share more info about how this can be reproduced?

Thanks!
Jérémie

>   call_rcu(>node.head, free_stream_rcu);
> }
> 
> --
> 2.34.1
> 
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.8 - (Ta) Meilleure

2022-01-27 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the eighth bug-fix release of LTTng-tools 2.12—(Ta)
Meilleure. This release addresses a number of issues listed below.

2022-01-26 lttng-tools 2.12.8 (National Peanut Brittle Day)
* Relicence all source and header files included in LGPL code
* Fix: sessiond: use of null session when session is not found
* Move utils_expand_path and utils_expand_path_keep_symlink to libpath.la
* Link lttng executable on libcommon-lgpl.a
* Introduce libcommon-lgpl for liblttng-ctl
* Rename libcommon.so to libcommon-gpl.so
* Copyright ownership transfer
* Copyright ownership transfer
* Fix: relayd: erroneous rundir permission logging message
* Fix: sessiond: rotation thread: fatal error when not finding a session
* Fix: relayd: rotation failure for multi-domain session
* Fix: lttng-ctl: lttng_list_sessions: initialize out_sessions to NULL when 
returning 0
* Fix: lttng: initialize variable in run_command_string
* Fix: consumer-stream: live viewers observe timestamps going backwards
* Fix: relayd: ressource leaks on viewer_stream_create error
* Fix: relayd: live: erroneous message timestamp observed from live viewer
* Fix: relayd: failure to open chunk files concurrently with session clear
* Fix: relayd: live: metadata stream reference count < 0 assert

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.8.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.8.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.4 - Nordicité

2022-01-27 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the third bug-fix release of LTTng-tools 2.13 - Nordicité.
This release addresses a number of issues listed below.

2022-01-26 lttng-tools 2.13.4 (National Peanut Brittle Day)
* Build fix: hashtable: hashtable.cpp does not exist
* Fix: _lttng_variant_statedump should expect 
lttng_ust_ctl_atype_variant_nestable
* Fix context mismatch across UST version due to legacy array context field
* Relicence all source and header files included in LGPL code
* Move utils_expand_path and utils_expand_path_keep_symlink to libpath.la
* Link lttng executable on libcommon-lgpl.a
* Introduce libcommon-lgpl for liblttng-ctl
* Rename libcommon.so to libcommon-gpl.so
* Copyright ownership transfer
* Copyright ownership transfer
* Fix: relayd: erroneous rundir permission logging message
* Fix: sessiond: rotation thread: fatal error when not finding a session
* Fix: relayd: rotation failure for multi-domain session
* Fix: lttng-ctl: lttng_list_sessions: initialize out_sessions to NULL when 
returning 0
* Fix: lttng: initialize variable in run_command_string
* Fix: consumer-stream: live viewers observe timestamps going backwards
* Fix: relayd: ressource leaks on viewer_stream_create error
* Fix: relayd: live: erroneous message timestamp observed from live viewer
* Fix: relayd: failure to open chunk files concurrently with session clear
* Fix: relayd: live: metadata stream reference count < 0 assert

Note that v2.13.3 was tagged nearly simultaneously as this release, but
unannounced since a bad backport caused the generation of the tarball to fail.
The change log above combines the changes relevant to both releases.

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.4.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.4.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [PATCH lttng-tools] Copyright ownership transfer

2022-01-14 Thread Jérémie Galarneau via lttng-dev
Apply copyright ownership transfer from David Goulet, Julien Desfossez,
and Simon Marchi to EfficiOS Inc.

Link: https://lists.lttng.org/pipermail/lttng-dev/2022-January/030087.html
Link: https://lists.lttng.org/pipermail/lttng-dev/2022-January/030092.html
Signed-off-by: Jérémie Galarneau 
Cc: David Goulet 
Cc: Julien Desfossez 
Cc: Simon Marchi 
Change-Id: Id13575afd4a2a09bb91a8d2b7a12dc3db8dc329f
---
 extras/lttng-bash_completion   | 2 +-
 include/lttng/lttng.h  | 2 +-
 src/bin/lttng-consumerd/lttng-consumerd.cpp| 2 +-
 src/bin/lttng-consumerd/lttng-consumerd.h  | 4 ++--
 src/bin/lttng-crash/lttng-crash.cpp| 2 +-
 src/bin/lttng-sessiond/channel.cpp | 2 +-
 src/bin/lttng-sessiond/channel.h   | 2 +-
 src/bin/lttng-sessiond/client.cpp  | 2 +-
 src/bin/lttng-sessiond/client.h| 2 +-
 src/bin/lttng-sessiond/context.cpp | 2 +-
 src/bin/lttng-sessiond/context.h   | 2 +-
 src/bin/lttng-sessiond/dispatch.cpp| 2 +-
 src/bin/lttng-sessiond/dispatch.h  | 2 +-
 src/bin/lttng-sessiond/event.cpp   | 2 +-
 src/bin/lttng-sessiond/event.h | 2 +-
 src/bin/lttng-sessiond/globals.cpp | 2 +-
 src/bin/lttng-sessiond/kernel.cpp  | 2 +-
 src/bin/lttng-sessiond/kernel.h| 2 +-
 src/bin/lttng-sessiond/lttng-sessiond.h| 2 +-
 src/bin/lttng-sessiond/main.cpp| 2 +-
 src/bin/lttng-sessiond/manage-apps.cpp | 2 +-
 src/bin/lttng-sessiond/manage-apps.h   | 2 +-
 src/bin/lttng-sessiond/manage-consumer.cpp | 2 +-
 src/bin/lttng-sessiond/manage-consumer.h   | 2 +-
 src/bin/lttng-sessiond/manage-kernel.cpp   | 2 +-
 src/bin/lttng-sessiond/manage-kernel.h | 2 +-
 src/bin/lttng-sessiond/process-utils.cpp   | 2 +-
 src/bin/lttng-sessiond/register.cpp| 2 +-
 src/bin/lttng-sessiond/register.h  | 2 +-
 src/bin/lttng-sessiond/session.cpp | 2 +-
 src/bin/lttng-sessiond/session.h   | 2 +-
 src/bin/lttng-sessiond/thread-utils.cpp| 2 +-
 src/bin/lttng-sessiond/trace-kernel.cpp| 2 +-
 src/bin/lttng-sessiond/trace-kernel.h  | 2 +-
 src/bin/lttng-sessiond/trace-ust.cpp   | 2 +-
 src/bin/lttng-sessiond/trace-ust.h | 2 +-
 src/bin/lttng-sessiond/ust-app.cpp | 2 +-
 src/bin/lttng-sessiond/ust-app.h   | 2 +-
 src/bin/lttng-sessiond/ust-consumer.cpp| 2 +-
 src/bin/lttng-sessiond/ust-consumer.h  | 2 +-
 src/bin/lttng-sessiond/ust-ctl-internal.h  | 2 +-
 src/bin/lttng-sessiond/ust-error-internal.h| 3 +--
 src/bin/lttng-sessiond/utils.cpp   | 2 +-
 src/bin/lttng-sessiond/utils.h | 2 +-
 src/bin/lttng/command.h| 2 +-
 src/bin/lttng/commands/add_context.cpp | 2 +-
 src/bin/lttng/commands/create.cpp  | 2 +-
 src/bin/lttng/commands/destroy.cpp | 2 +-
 src/bin/lttng/commands/disable_channels.cpp| 2 +-
 src/bin/lttng/commands/disable_events.cpp  | 2 +-
 src/bin/lttng/commands/enable_channels.cpp | 2 +-
 src/bin/lttng/commands/enable_events.cpp   | 2 +-
 src/bin/lttng/commands/list.cpp| 2 +-
 src/bin/lttng/commands/set_session.cpp | 2 +-
 src/bin/lttng/commands/start.cpp   | 2 +-
 src/bin/lttng/commands/stop.cpp| 2 +-
 src/bin/lttng/commands/track-untrack.cpp   | 2 +-
 src/bin/lttng/commands/version.cpp | 2 +-
 src/bin/lttng/conf.cpp | 2 +-
 src/bin/lttng/conf.h   | 2 +-
 src/bin/lttng/lttng.cpp| 2 +-
 src/bin/lttng/utils.cpp| 2 +-
 src/bin/lttng/utils.h  | 2 +-
 src/common/common.h| 2 +-
 src/common/compat/poll.cpp | 2 +-
 src/common/compat/poll.h   | 2 +-
 src/common/consumer/consumer-stream.cpp| 2 +-
 src/common/consumer/consumer-timer.h   | 2 +-
 src/common/consumer/consumer.cpp   | 2 +-
 src/common/consumer/consumer.h | 2 +-
 src/common/defaults.cpp| 2 +-
 src/common/defaults.h  | 2 +-
 src/common/error.h | 2 +-
 src/common/futex.cpp   | 2 +-
 src/common/futex.h | 2 +-
 src/common/hashtable/hashtable.cpp | 2 +-
 src/common/hashtable/hashtable.h   | 2 +-
 src/common/hashtable/utils.cpp | 2 +-
 src/common/hashtable/utils.h   | 2 +-
 src/common/kernel-consumer/kernel-consumer.cpp | 2 +-
 src/common/kernel-consumer/kernel-consumer.h   | 2 +-
 src/common/kernel-ctl/kernel-ctl.cpp   | 2 +-
 src/common/kernel-ctl/kernel-ctl.h | 2 +-
 

Re: [lttng-dev] Running trace-rotate and session-rotate together

2022-01-05 Thread Jérémie Galarneau via lttng-dev


- Message original -
> De: "lttng-dev" 
> À: "lttng-dev" 
> Envoyé: Mardi 21 Décembre 2021 01:47:12
> Objet: [lttng-dev] Running trace-rotate and session-rotate together

> Hi,
> 1. In the lttng-enable-rotation manpage it is mentioned that we should not use
> trace rotate when automatic session rotate is enabled. Can you please tell me
> why?
> ```
> Important
> You may only use the enable-rotation command when:
> * The selected recording session was created in normal mode or in network
> streaming mode
> (see lttng-create(1)).
> * No channel was created with a configured trace file count or size limit (see
> the
> --tracefile-size and --tracefile-count options of the lttng-enable-channel(1)
> command).
> ```

Hi, 

The reason mostly boils down to the fact that we didn't see a use case for 
this. Hence, it's not implemented nor tested. 

Let me know if you have a use case for combining both features, though.

> 2. When automatic session rotate is running, is there any race condition in
> writing the current ring buffers and archiving the current trace chunk?

I am not sure I understand your question, but I think you're asking if session 
rotations are "atomic" with respect to the switchover of all per-CPU streams 
from one trace archive to the next?

The switchover is not instantaneous. The file output of each per-CPU stream is 
switched to the new trace archive sequentially. That leaves you with a window 
of time during which information, for a given stream, may be found in either 
the old trace archive or the new one. To be clear, no information is ever 
duplicated or lost during this operation. 

I briefly touched on this topic in a presentation at the Open Source Summit 
2018, see slide 32+[1]

The various colours represent successive trace archives produced by session 
rotations.

This transition window makes writing analyses a bit harder since the beginning 
and end of trace archives may not have all of the information for all per-CPU 
streams during a short window of time. That window is contained between issuing 
the rotation and receiving a confirmation that it has been completed (using the 
CLI or the liblttng-ctl API). 

You can see that in that context, I chose to process trace archives in pairs to 
constitute an "effective trace archive" (slide 34) during which I can be sure I 
always have access to all events from all per-CPU streams.

Thanks,
Jérémie

[1] 
https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Fine-grained-Distributed-Application-Monitoring-Using-LTTng-J%C3%A9r%C3%A9mie-Galarneau-EfficiOS.pdf

> --
> Regards,
> Subrata Paul

> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.7 - (Ta) Meilleure

2021-12-17 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the seventh bug-fix release of LTTng-tools 2.12 - (Ta)
Meilleure. This release addresses a number of issues listed below.

2021-12-17 lttng-tools 2.12.7 (National Ugly Christmas Sweater Day)
* Validate channel context mismatch across UST applications
* Fix: relayd: compare viewer chunks by ID rather than address
* Fix: relayd: live: erroneous message timestamp observed from live 
viewer
* Fix: relayd comm: improperly packed rotate streams command header
* test: snapshot after regenerate metadata
* Fix: ust-consumer: segfault on snapshot after regenerate metadata
* Tests: live kernel: no plan printed when non-root
* Fix: sessiond: snapshot: leak of trace chunk
* Fix: test: use BABELTRACE_BIN instead of babeltrace
* Fix: relayd: `!vsession->current_trace_chunk` assertion failed
* Fix: tests: fix unused-but-set warning in test_fd_tracker.c
* Fix: sessiond: fix possible buffer overflow warning
* Fix: lttng-ctl: tracing_group memory leaks
* Fix: Tests: unchecked `close()` return value
* Fix: relayd: live: mishandled initial null trace chunk
* Fix: configure.ac: reporting SDT uprobe as a UST feature
* Fix: Tests: leaking epoll fd

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.7.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.7.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.2 - Nordicité

2021-12-17 Thread Jérémie Galarneau via lttng-dev
Hi all,

We have just released the second bug-fix release of LTTng-tools 2.13 - 
Nordicité.
This release addresses a number of issues listed below.

2021-12-17 lttng-tools 2.13.2 (National Ugly Christmas Sweater Day)
* Validate channel context mismatch across UST applications
* Fix: relayd: compare viewer chunks by ID rather than address
* Fix: relayd: live: erroneous message timestamp observed from live 
viewer
* Fix: relayd comm: improperly packed rotate streams command header
* Test: snapshot after regenerate metadata
* Fix: ust-consumer: segfault on snapshot after regenerate metadata
* lttng: list valid condition / action names if missing or unknown
* lttng: mention argument number on unknown action / condition name
* lttng: fix argument numbers in add-trigger error messages
* argpar-utils: tweak unknown option error message
* argpar: sync with upstream - adjust to iterator API
* common: move append_str to string-utils
* lttng-create(1): specify that `--shm-path` only applies to UST 
channels
* Fix: sessiond: action-executor: misquoted strings in logging
* Tests: live kernel: no plan printed when non-root
* Fix: sessiond: assert on lttng_ht_add_unique_str on 
ltt_sessions_ht_by_name
* Fix: sessiond: snapshot: leak of trace chunk
* Fix: test: use BABELTRACE_BIN instead of babeltrace
* Fix: action executor: ref count imbalance for session object
* Fix: relayd: `!vsession->current_trace_chunk` assertion failed
* Fix: tests: fix unused-but-set warning in test_fd_tracker.c
* Fix: sessiond: fix possible buffer overflow warning
* Fix: tests: app unregistering is not guaranteed by app lifetime
* Fix: lttng-ctl: tracing_group memory leaks
* Fix: use  instead of 
* Fix: Tests: unchecked `close()` return value
* Fix: relayd: live: mishandled initial null trace chunk
* Fix: configure.ac: reporting SDT uprobe as a UST feature
* Fix: Tests: leaking epoll fd
* Typo: occurences -> occurrences

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.2.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.2.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.12.6 - (Ta) Meilleure

2021-10-19 Thread Jérémie Galarneau via lttng-dev
Hi all, 

We have just released the sixth bug-fix release of LTTng-tools 2.12 - (Ta) 
Meilleure. This release addresses a number of issues listed below. 

2021-10-18 lttng-tools 2.12.6 (National Chocolate Cupcake Day) 
* Fix: sessiond: previously created channel cannot be enabled 
* Fix: ust: app stuck on recv message during UST comm timeout scenario 
* Fix: ust: UST communication can return -EAGAIN 
* Fix: ust: segfault on lttng start on filter bytecode copy 
* Build fix: Missing message in LTTNG_DEPRECATED invocation 
* include: remove spurious spaces in condition/session-rotation.h 
* tests: fix header of regression/ust/getcpu-override/run-getcpu-override 
* fix: wrong define used for GCC version check 
* Fix: userspace-probe: unreported error on string copy error 
* Fix: userspace-probe: truncating binary path for SDT 
* Fix: statements with side-effects in assert statements 
* Fix: lttng_trace_archive_location_serialize is called on freed memory 
* Fix: sessiond: ust session is inactive during ust_app_global_update 
* Fix: Tests: race condition in test_ns_contexts_change 
* Fix: Tests: race condition in test_event_tracker 
* Fix: man: lttng-rotate: trace file count/size limitation does not apply 

As always, please report any issue you may encounter to bugs.lttng.org 
or on this mailing list. 

Project website: https://lttng.org 

Download link: 
https://lttng.org/files/lttng-tools/lttng-tools-2.12.6.tar.bz2 

GPG signature: 
https://lttng.org/files/lttng-tools/lttng-tools-2.12.6.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.13.1 - Nordicité

2021-10-19 Thread Jérémie Galarneau via lttng-dev
Hi all, 

We have just released the first bug-fix release of LTTng-tools 2.13 - 
Nordicité. 
This release addresses a number of issues listed below. 

2021-10-18 lttng-tools 2.13.1 (National Chocolate Cupcake Day) 
* Fix: ust: app stuck on recv message during UST comm timeout scenario 
* Fix: ust: UST communication can return -EAGAIN 
* Fix: ust: segfault on lttng start on filter bytecode copy 
* Fix: sessiond: previously created channel cannot be enabled 
* Build fix: Missing message in LTTNG_DEPRECATED invocation 
* Fix: notification-thread: handling event from a removed tracer event src 
* include: add missing "extern" 
* include: remove spurious spaces in condition/session-rotation.h 
* tests: fix header of regression/ust/getcpu-override/run-getcpu-override 
* fix: wrong define used for GCC version check 
* Fix: userspace-probe: unreported error on string copy error 
* Fix: userspace-probe: truncating binary path for SDT 
* Fix: lttng: add-trigger: don't provide a default event rule type 
* Fix: statements with side-effects in assert statements 
* Fix: lttng_trace_archive_location_serialize is called on freed memory 
* Fix: sessiond: ust session is inactive during ust_app_global_update 
* Fix: common: error query for trigger action protocol error 
* Fix: common: un-hide two rate policy functions 
* Fix: include: remove unneeded declaration of 
lttng_session_descriptor_get_session_name 
* Fix: Tests: race condition in test_ns_contexts_change 
* Fix: Tests: race condition in test_event_tracker 
* Fix: man: lttng-rotate: trace file count/size limitation does not apply 
* Fix: runas: less-than-zero comparison of an unsigned value 
* Fix: runas: supplementary groups are ignored on lttng save 
* Docs: lttng-event-rule(7): --exclude does not exist, use --exclude-name 
* sessiond: logging typo: {triger, triggger} -> trigger 
* Fix: lttng: free sessions in cmd_destroy 
* Fix: lttng: free domains and channels in get_session_stats_str 

As always, please report any issue you may encounter to bugs.lttng.org 
or on this mailing list. 

Project website: https://lttng.org 

Download link: 
https://lttng.org/files/lttng-tools/lttng-tools-2.13.1.tar.bz2 

GPG signature: 
https://lttng.org/files/lttng-tools/lttng-tools-2.13.1.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.8 - Lafontaine

2021-10-19 Thread Jérémie Galarneau via lttng-dev
Hi all, 

We have just released the eighth and final bug-fix release of LTTng-tools 2.11 
- 
Lafontaine. This release addresses the issues listed below. 

2021-10-18 lttng-tools 2.11.8 (National Chocolate Cupcake Day) 
* Fix: sessiond: previously created channel cannot be enabled 
* Fix: ust: app stuck on recv message during UST comm timeout scenario 
* Fix: ust: UST communication can return -EAGAIN 
* Fix: ust: segfault on lttng start on filter bytecode copy 
* Build fix: Missing message in LTTNG_DEPRECATED invocation 
* include: remove spurious spaces in condition/session-rotation.h 
* fix: wrong define used for GCC version check 
* Fix: userspace-probe: unreported error on string copy error 
* Fix: userspace-probe: truncating binary path for SDT 
* Fix: sessiond: ust session is inactive during ust_app_global_update 
* Fix: man: lttng-rotate: trace file count/size limitation does not apply 
* Fix: rotation client example: leak of handle on error 
* Fix: use of uninitialised bytes valgrind warning 
* Fix: bump minimal urcu dependency to 0.11 
* Fix: list_lttng_agent_events: unbalanced RCU read-side lock on error 
* Fix: consumer: unbalanced RCU read-side lock on error 

As always, please report any issue you may encounter to bugs.lttng.org 
or on this mailing list. 

Project website: https://lttng.org 

Download link: 
https://lttng.org/files/lttng-tools/lttng-tools-2.11.8.tar.bz2 

GPG signature: 
https://lttng.org/files/lttng-tools/lttng-tools-2.11.8.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] Question about rotating session limitations

2021-08-13 Thread Jérémie Galarneau via lttng-dev
> From: "lttng-dev" 
> To: "lttng-dev" 
> Sent: Friday, August 13, 2021 3:28:14 AM
> Subject: [lttng-dev] Question about rotating session limitations

> Hello,

> On [ https://lttng.org/man/1/lttng-rotate/v2.12/ |
> https://lttng.org/man/1/lttng-rotate/v2.12/ ] one of the limitations is listed
> as:

> The lttng rotate command only works when:

> · No channel was created with a configured trace file count or size limit (see
> the --tracefile-size and --tracefile-count options in [
> https://lttng.org/man/1/lttng-enable-channel/v2.12 | lttng-enable-channel(1) ]
> ).

> However on v2.12.1 I am able to:

> 1. Create a userspace session
> 2. Create a channel w/ configured trace file count and size limit
> 3. Start tracing
> 4. lttng rotate

> Within each chunk these restrictions are respected.

> Therefore my question is what does this limitation actually mean? Is it more 
> so
> in the direction that the archives will not respect these limits because the
> chunks accumulate? Or am I missing the point entirely?

Hi Zach, 

I think it's simply a documentation error, probably on my part from misadvising 
Philippe. 
I'll open a change against the manual page. 

Thanks for reporting this! 
Jérémie 

> Thanks,

> Zach

> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.5 - (Ta) Meilleure

2021-08-06 Thread Jérémie Galarneau via lttng-dev
Hi all,

The fifth bug-fix release of LTTng-tools 2.12 - (Ta) Meilleure has just been
released. This release addresses a number of issues listed below.

2021-08-06 lttng-tools 2.12.5 (International Beer Day)
* Fix: runas: less-than-zero comparison of an unsigned value
* Fix: runas: supplementary groups are ignored on lttng save
* Fix: lttng: free sessions in cmd_destroy
* Fix: lttng: free domains and channels in get_session_stats_str
* Fix: rotation client example: leak of handle on error
* .gitreview: Set default branch to 'stable-2.12'
* tests: Move tap-driver.sh out of the autotools aux directory
* Fix: use of uninitialised bytes valgrind warning
* Fix: bump minimal urcu dependency to 0.11
* Fix: consumer: unbalanced RCU read-side lock on error
* Fix: tests: missing LOG_DRIVER and LOG_DRIVER_FLAGS
* Fix: list_lttng_agent_events: unbalanced RCU read-side lock on error

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.5.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.5.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.13.0-rc3 - Nordicité - Linux kernel and user-space tracer

2021-07-16 Thread Jérémie Galarneau via lttng-dev
Hi everyone,

Today marks the release of the third LTTng 2.13 - Nordicité release candidate.

A prettified version of this announcement is available here:
https://github.com/lttng/lttng-tools/releases/tag/v2.13.0-rc3

Have a look at the first release candidate's release notes for an
overview of the features introduced in LTTng 2.13.

https://github.com/lttng/lttng-tools/releases/tag/v2.13.0-rc1


What's new in LTTng-UST (Linux application tracer) 2.13.0-rc3?
---

- Removed vtracelog and vtracef from the v0 compatibility API.

- Various documentation updates.

See the ChangeLog for the full list of changes:
https://github.com/lttng/lttng-ust/blob/v2.13.0-rc3/ChangeLog


What's new in LTTng-modules (Linux kernel tracer) 2.13.0-rc3?
---

- Adapted the instrumentation for 5.14-rc upstream kernels and recent RHEL 8.4 
kernels.

See the ChangeLog for the full list of changes:
https://github.com/lttng/lttng-modules/blob/v2.13.0-rc3/ChangeLog


What's new in LTTng-tools 2.13.0-rc3?
---

- Usage examples were added to all lttng command man pages.

- Some symbols introduced in liblttng-ctl as part of the 2.13 release were 
changed:
  - Error query actions are now specified using an lttng_action_path,
  - The event rule API has been namespaced to include the domain name.

- Bumped the minimal Userspace RCU dependency to 0.11.

- Added the Machine Interface (MI) for the CLI's newly introduced trigger 
commands
  (add-trigger, remove-trigger, list-triggers).

See the ChangeLog for the full list of changes:
https://github.com/lttng/lttng-tools/blob/v2.13.0-rc3/ChangeLog


Links
---

Project website:
https://lttng.org

Download links:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.0-rc3.tar.bz2
https://lttng.org/files/lttng-ust/lttng-ust-2.13.0-rc3.tar.bz2
https://lttng.org/files/lttng-modules/lttng-modules-2.13.0-rc3.tar.bz2

GPG signatures:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.0-rc3.tar.bz2.asc
https://lttng.org/files/lttng-ust/lttng-ust-2.13.0-rc3.tar.bz2.asc
https://lttng.org/files/lttng-modules/lttng-modules-2.13.0-rc3.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools stable-2.12] Fix: list_lttng_agent_events: unbalanced RCU read-side lock on error

2021-05-28 Thread Jérémie Galarneau via lttng-dev
Merged in stable-2.12 and stable-2.11.

Thanks!
Jérémie

- Original Message -
> From: "Mathieu Desnoyers" 
> To: jga...@efficios.com
> Cc: "lttng-dev" , "Mathieu Desnoyers" 
> 
> Sent: Thursday, May 27, 2021 5:11:22 PM
> Subject: [PATCH lttng-tools stable-2.12] Fix: list_lttng_agent_events: 
> unbalanced RCU read-side lock on error

> The error label jumps to the end label which releases the RCU read-side
> lock. There are many error paths in this function which goto error
> without holding the RCU read-side lock, thus causing unbalanced RCU
> read-side lock.
> 
> There is no point in keeping so short RCU read-side critical sections,
> so cover the entire function with a single read-side critical section.
> 
> [ Applies to stable-2.12 and possibly prior versions. Does _not_ apply
>  to stable-2.13+. ]
> 
> Signed-off-by: Mathieu Desnoyers 
> Change-Id: I5b20c229a5df22d22ecfdc64dbbb87ee118649d2
> ---
> src/bin/lttng-sessiond/cmd.c | 4 
> 1 file changed, 4 deletions(-)
> 
> diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c
> index b608df1e1..eb5da1b76 100644
> --- a/src/bin/lttng-sessiond/cmd.c
> +++ b/src/bin/lttng-sessiond/cmd.c
> @@ -510,7 +510,6 @@ static int list_lttng_agent_events(struct agent *agt,
> 
>   rcu_read_lock();
>   nb_event = lttng_ht_get_count(agt->events);
> - rcu_read_unlock();
>   if (nb_event == 0) {
>   ret = nb_event;
>   *total_size = 0;
> @@ -524,7 +523,6 @@ static int list_lttng_agent_events(struct agent *agt,
>* This is only valid because the commands which add events are
>* processed in the same thread as the listing.
>*/
> - rcu_read_lock();
>   cds_lfht_for_each_entry(agt->events->ht, , event, node.node) {
>   ret = increment_extended_len(event->filter_expression, NULL, 
> NULL,
>   _len);
> @@ -534,7 +532,6 @@ static int list_lttng_agent_events(struct agent *agt,
>   goto error;
>   }
>   }
> - rcu_read_unlock();
> 
>   *total_size = nb_event * sizeof(*tmp_events) + extended_len;
>   tmp_events = zmalloc(*total_size);
> @@ -547,7 +544,6 @@ static int list_lttng_agent_events(struct agent *agt,
>   extended_at = ((uint8_t *) tmp_events) +
>   nb_event * sizeof(struct lttng_event);
> 
> - rcu_read_lock();
>   cds_lfht_for_each_entry(agt->events->ht, , event, node.node) {
>   strncpy(tmp_events[i].name, event->name, 
> sizeof(tmp_events[i].name));
>   tmp_events[i].name[sizeof(tmp_events[i].name) - 1] = '\0';
> --
> 2.17.1
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.4 - (Ta) Meilleure

2021-05-18 Thread Jérémie Galarneau via lttng-dev
Hi all,

The fourth bug-fix release of LTTng-tools 2.12 - (Ta) Meilleure has just been
released. This release addresses a number of issues listed below.

2021-05-18 lttng-tools 2.12.4 (No Dirty Dishes Day)
* Fix: snapshot path have domain subdir duplicate "ust/ust" or 
"kernel/kernel"
* Fix: relayd: failure to read index entry or stream packet after clear
* Fix: sessiond: leak of config_path on duplicate --config option
* Fix: relayd: live: data is missing between viewer attach and retry
* Fix: lttng-ctl: erroneous check if user is part of the tracing group
* Fix: kernel consumer: get next subbuffer EAGAIN handling
* Fix: kernel consumer: signal metadata ready condition variable
* Fix: consumerd: unbalanced subbuffer 'get' when checking operation 
availability
* Fix: tests: gen-ust-events-ns: Uninitialized argument value
* Fix: consumerd: strlen called on uninitialized path
* Fix: tests: health thread stall: only stop consumerd when required
* Fix: tests: quote variable in case it's not set
* Fix: sessiond: session destroy hang in per-uid when context cannot be 
added
* Fix: backward relayd: path contains a leading "ust" folder
* Fix: lttng_destroy_session_no_wait: return 0 on success
* config: fix typo in error message
* Tests: array expressions without contant index are invalid
* Fix: validate that array expression contains constant
* Fix: test: base-path tests are not run
* Fix: filter: memory leak in filter_parser_ctx
* Fix: sessiond: fix -Wshadow error in save.c
* Fix: utils: avoid strncpy overlap in utils_partial_realpath
* Clean-up: utils: make utils_partial_realpath static
* Fix: added missing test_channel and removed double defined 
test_syscall
* Fix: sessiond: kernel: invalid error code check
* Tests: fix: unchecked sscanf return value
* compiler warning cleanup: is_signed_type: compare -1 to 1

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.4.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.4.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.7 - Lafontaine

2021-05-18 Thread Jérémie Galarneau via lttng-dev
Hi all,

The seventh bug-fix release of LTTng-tools 2.11 - Lafontaine has just
been released. This release addresses a number of issues listed below.

2021-05-18 lttng-tools 2.11.7 (No Dirty Dishes Day)
* Fix: sessiond: leak of config_path on duplicate --config option
* Fix: relayd: live: data is missing between viewer attach and retry
* Fix: lttng-ctl: erroneous check if user is part of the tracing group
* Fix: kernel consumer: get next subbuffer EAGAIN handling
* Fix: kernel consumer: signal metadata ready condition variable
* Fix: consumerd: unbalanced subbuffer 'get' when checking operation 
availability
* Fix: consumerd: strlen called on uninitialized path
* Fix: tests: health thread stall: only stop consumerd when required
* Fix: tests: quote variable in case it's not set
* Fix: sessiond: session destroy hang in per-uid when context cannot be 
added
* Fix: lttng_destroy_session_no_wait: return 0 on success
* config: fix typo in error message
* Tests: array expressions without contant index are invalid
* Fix: validate that array expression contains constant
* Fix: test: base-path tests are not run
* Fix: filter: memory leak in filter_parser_ctx
* Fix: sessiond: fix -Wshadow error in save.c
* Fix: utils: avoid strncpy overlap in utils_partial_realpath
* Clean-up: utils: make utils_partial_realpath static
* Fix: sessiond: kernel: invalid error code check
* Fix: ust-consumer: metadata thread not woken-up after version change
* Clean-up: ust-consumer: simplify metadata cache unlock on error path
* Fix: sessiond: timer: unitiliazed sigevent fields
* Fix: sessiond: ust-registry: dereference of NULL pointer on 
allocation failure
* Fix: ust-consumer: metadata cache lock not taken when sampling max 
offset

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.7.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.7.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.6 - Lafontaine

2021-02-23 Thread Jérémie Galarneau via lttng-dev
Hi all,

The sixth bug-fix release of LTTng-tools 2.11 - Lafontaine has just
been released. This release addresses a number of issues listed below.

2021-02-22 lttng-tools 2.11.6 (National Margarita Day)
* Fix: use MT-safe strtok_r in multithreaded context
* Fix: liblttng-ctl: unreported truncations when copying strings
* Fix: configure: support Autoconf 2.70
* Fix: sessiond: metadata not created on app unregistration during start
* Cleanup: use `modprobe --remove` rather than `rmmod`
* Tests: Fix: 99% fill ratio for high buffer usage is too high for 
larger events
* Fix: common: poll: compat_poll_wait never finishes
* Build fix: implicit declaration of function 'PERROR' on Solaris
* Fix: PERROR spam when `tracing` group does not exist
* Fix: memcpy used on potentially overlapping regions

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.6.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.6.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.3 - (Ta) Meilleure

2021-02-23 Thread Jérémie Galarneau via lttng-dev
Hi all,

The third bug-fix release of LTTng-tools 2.12 - (Ta) Meilleure has just been
released. This release addresses a number of issues listed below.

2021-02-22 lttng-tools 2.12.3 (National Margarita Day)
* Fix: ust-consumer: metadata thread not woken-up after version change
* Clean-up: ust-consumer: simplify metadata cache unlock on error path
* Fix: sessiond: timer: unitiliazed sigevent fields
* Fix: sessiond: ust-registry: dereference of NULL pointer on 
allocation failure
* Fix: ust-consumer: metadata cache lock not taken when sampling max 
offset
* Fix: use MT-safe strtok_r in multithreaded context
* Fix: liblttng-ctl: unreported truncations when copying strings
* Fix: configure: support Autoconf 2.70
* Fix: sessiond: metadata not created on app unregistration during start
* Cleanup: use `modprobe --remove` rather than `rmmod`
* Tests: Fix: 99% fill ratio for high buffer usage is too high for 
larger events
* Fix: common: poll: compat_poll_wait never finishes
* Build fix: implicit declaration of function 'PERROR' on Solaris
* Fix: PERROR spam when `tracing` group does not exist
* Fix: memcpy used on potentially overlapping regions

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.3.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.3.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Extras: Perl 5.26 requires { to be escaped by \

2020-12-04 Thread Jérémie Galarneau via lttng-dev
Merged in master.

Thanks!
Jérémie

On Wed, 25 Nov 2020 at 03:31, Anders Wallin via lttng-dev
 wrote:
>
> Unescaped literal "{" characters in regular expression patterns are no
> longer permissible
>
> Signed-off-by: Anders Wallin 
> ---
>  extras/checkpatch.pl | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl
> index 286c94de..14e16fae 100755
> --- a/extras/checkpatch.pl
> +++ b/extras/checkpatch.pl
> @@ -2433,8 +2433,8 @@ sub process {
>
>  # function brace can't be on same line, except for #defines of do while,
>  # or if closed on same line
> -   if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
> -   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
> +   if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
> +   !($line=~/\#\s*define.*do\s\{/) and !($line=~/\}/)) {
> ERROR("OPEN_BRACE",
>   "open brace '{' following function declarations 
> go on the next line\n" . $herecurr);
> }
> @@ -2709,8 +2709,8 @@ sub process {
>  ## }
>
>  #need space before brace following if, while, etc
> -   if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
> -   $line =~ /do{/) {
> +   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
> +   $line =~ /do\{/) {
> ERROR("SPACING",
>   "space required before the open brace '{'\n" . 
> $herecurr);
> }
> @@ -3005,7 +3005,7 @@ sub process {
> $dstat !~ /^for\s*$Constant$/ &&  
>   # for (...)
> $dstat !~ 
> /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ &&   # for (...) bar()
> $dstat !~ /^do\s*{/ &&
>   # do {...
> -   $dstat !~ /^\({/) 
>   # ({...
> +   $dstat !~ /^\(\{/)
>   # ({...
> {
> $ctx =~ s/\n*$//;
> my $herectx = $here . "\n";
> --
> 2.29.2
>
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.2 - (Ta) Meilleure

2020-08-03 Thread Jérémie Galarneau via lttng-dev
Hi all,

The second bug-fix release of LTTng-tools 2.12 - (Ta) Meilleure has
just been released. This release addresses a number of issues listed
below.

2020-08-03 lttng-tools 2.12.2 (National Watermelon Day)
* Tests: rework tracefile_count test to meet the tracefile count limit
* Fix: extraneous empty/inactive flush on rotation out of a trace chunk
* Fix: relayd: double unlock on viewer stream creation error
* Fix: relayd: live connection fails to open file during clear
* Fix: relayd: wrong stream type used in DBG statement
* Fix: lttng: leak of userspace probe path on listing
* Fix: uprobe: missing error code on allocation failure
* Fix: sessiond: don't negate error code on list error
* Fix: send/received actual size is overwritten by 'expected' size
* Fix: partial recv lead to client disconnect
* tests: return the proper TAP exit code
* Tests: live/test_{lttng_,}kernel: use lttng_test_filter_event instead 
of sched_switch
* Fix: consumer: Move sanity check within `consumer_subbuffer` functions
* Fix: sessiond: wrong variable checked for error code
* Fix: consumerd: double unlock on rotate channel error path
* Fix: consumerd: packet sent before channel rotation
* Fix: relayd: wrong specifier used in DBG format string
* Tests: add a "new metadata after clear" test
* Fix: relayd: send_viewer_streams sends stack data in padding
* Fix: stream intersection fails on snapshot of cleared session
* Fix: relayd: viewer metadata is not rotated after a session clear
* Fix: post-clear trace chunk has a late beginning packet
* Fix: kconsumer: missing wait for metadata thread in do_sync_metadata
* Fix: tests: interrupting get_next_notification causes test to fail
* Fix: consumer.c: wrong order of parameter in `DBG()` statement
* Fix: consumer: dangling chunk on buffer allocation failure
* Fix: consumerd: uninitialized written_bytes on no-data sleep
* Build fix: consumerd misnamed label
* consumerd: on_sleep not called on stream when no data is available
* Fix: invalid discarded events on start/stop without event production
* tests: truncate metadata file for regenerate metadata test
* Fix: consumerd: user space metadata not regenerated
* tests: gen-ust-events-ns/tp.h: Fix build with musl libc
* Fix: tests: output_dir contains the consumerd pipe
* Fix: unix: don't PERROR on EAGAIN for non-blocking sockets
* Fix: sessiond: sessiond and agent deadlock on destroy
* Fix: incorrect specifier %lu used with size_t argument
* Fix: consumerd: live client receives incomplete metadata
* consumerd: refactor: split read_subbuf into sub-operations
* consumerd: move rotation logic to domain-agnostic read path
* sessiond: enforce mmap output type for kernel metadata channel
* consumerd: tag metadata channel as being part of a live session
* consumerd: pass channel instance to stream creation function
* consumerd: cleanup: use buffer view interface for mmap read subbuf
* consumerd: move address computation from on_read_subbuffer_mmap
* consumerd: refactor: combine duplicated check_*_functions
* kerner-ctl: add RING_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK
* Add lttng_dynamic_buffer_append_view util
* Fix: lttng: Destroying session message repeated during destruction
* Fix: liblttng-ctl: leak of tracker handle in lttng_[un]track_pid
* Fix: common: fs_handle_seek returns negative value on success
* Fix: common: abort on rotation after time manipulation
* Tests: test_exclusion: exclusion after tracing active
* Tests: `gen-ust-nevents`: add syncpoints
* Tests: accept built-in kernel modules

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.2.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.2.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.5 - Lafontaine

2020-08-03 Thread Jérémie Galarneau via lttng-dev
Hi all,

The fifth bug-fix release of LTTng-tools 2.11 - Lafontaine has just
been released. This release addresses a number of issues listed below.

2020-08-03 lttng-tools 2.11.5 (National Watermelon Day)
* Fix: lttng: leak of userspace probe path on listing
* Fix: uprobe: missing error code on allocation failure
* Fix: sessiond: don't negate error code on list error
* Fix: send/received actual size is overwritten by 'expected' size
* Fix: partial recv lead to client disconnect
* tests: return the proper TAP exit code
* Tests: live/test_{lttng_,}kernel: use lttng_test_filter_event instead 
of sched_switch
* Fix: consumer: Move sanity check within `consumer_subbuffer` functions
* Cleanup: typo in DBG() statements
* Fix: relayd: send_viewer_streams sends stack data in padding
* Fix: kconsumer: missing wait for metadata thread in do_sync_metadata
* Fix: tests: interrupting get_next_notification causes test to fail
* Fix: consumer.c: wrong order of parameter in `DBG()` statement
* Fix: kernel metadata file outside of kernel/ directory
* Fix: consumer: dangling chunk on buffer allocation failure
* Fix: consumerd: uninitialized written_bytes on no-data sleep
* Build fix: consumerd misnamed label
* consumerd: on_sleep not called on stream when no data is available
* Fix: invalid discarded events on start/stop without event production
* tests: truncate metadata file for regenerate metadata test
* Fix: consumerd: user space metadata not regenerated
* Fix: tests: output_dir contains the consumerd pipe
* Fix: unix: don't PERROR on EAGAIN for non-blocking sockets
* Fix: sessiond: sessiond and agent deadlock on destroy
* Fix: incorrect specifier %lu used with size_t argument
* Fix: consumerd: live client receives incomplete metadata
* consumerd: refactor: split read_subbuf into sub-operations
* consumerd: move rotation logic to domain-agnostic read path
* sessiond: enforce mmap output type for kernel metadata channel
* consumerd: tag metadata channel as being part of a live session
* consumerd: pass channel instance to stream creation function
* consumerd: cleanup: use buffer view interface for mmap read subbuf
* consumerd: move address computation from on_read_subbuffer_mmap
* consumerd: refactor: combine duplicated check_*_functions
* kerner-ctl: add RING_RING_BUFFER_GET_NEXT_SUBBUF_METADATA_CHECK
* Add lttng_dynamic_buffer_append_view util
* Fix: lttng: Destroying session message repeated during destruction

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.5.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.5.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.4 - Lafontaine

2020-05-19 Thread Jérémie Galarneau via lttng-dev
Hi all,

The fourth bug-fix release of LTTng-tools 2.11 - Lafontaine has just
been released. This release addresses a number of issues listed below.

2020-05-19 lttng-tools 2.11.4 (Dinosaur Day)
* Fix: common: abort on rotation after time manipulation
* Fix: tests: `-Wstringop-overflow` warning
* Fix: load: incomplete error handling for load_session_from_file

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.4.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.4.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.1 - (Ta) Meilleure

2020-05-12 Thread Jérémie Galarneau via lttng-dev
Hi all,

The first bug-fix release of LTTng-tools 2.12 - (Ta) Meilleure has
just been released. This release addresses a number of issues listed
below.

2020-05-12 lttng-tools 2.12.1 (International Nurses' Day)
* API: missing includes in lttng.h
* API: missing clear and clear-handle includes in lttng.h
* API: sort lttng.h includes
* Fix: API: missing end brace for C++ linkage specification.
* Fix: tests: `-Wstringop-overflow` warning
* Fix: load: incomplete error handling for load_session_from_file

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.1.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.1.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [RFC PATCH CTF 1/3] Clarify that unlisted enum values are implementation-defined

2020-04-23 Thread Jérémie Galarneau via lttng-dev
On Thu, 23 Apr 2020 at 16:52, Mathieu Desnoyers
 wrote:
>
> From: Geneviève Bastien 
>
> Signed-off-by: Geneviève Bastien 
> Signed-off-by: Mathieu Desnoyers 
> ---
>  common-trace-format-specification.md | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/common-trace-format-specification.md 
> b/common-trace-format-specification.md
> index fd49e59..f5fea51 100644
> --- a/common-trace-format-specification.md
> +++ b/common-trace-format-specification.md
> @@ -464,6 +464,9 @@ enum {
>  }
>  ~~~
>
> +The mappings in the enumeration type do not have to be exhaustive.
> +Unlisted values are implementation defined.
> +

This is too vague to be useful knowing that the main rationale for this
change is to allow enums to express some type of bitfield of flags
in the tracer and readers [1].

What is the meaning of an unmapped value? This section should at
least describe the correct interpretation of unmapped values as flags
and when it is appropriate to do so.

Thanks,
Jérémie

[1] https://review.lttng.org/c/babeltrace/+/3045

>  ### 4.2 Compound types
>
>  Compound are aggregation of type declarations. Compound types include
> --
> 2.11.0
>


-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE Babeltrace 2.0.3 - Amqui

2020-04-23 Thread Jérémie Galarneau via lttng-dev
Hi everyone!

Today we're releasing the third patch-level release of Babeltrace 2.0
"Amqui".

What's new since Babeltrace 2.0.2?
==

This release contains a number of fixes, but more importantly an
initial documentation for the Python bindings.

Note that I messed up and pushed out a later commit tagged as v2.0.3
and retagged the release commit as v2.0.3 again.

If you got the wrong tag, and want the new one, please delete the old
one and fetch the new one by doing:

git tag -d v2.0.3
git fetch origin tag v2.0.3

to get the updated tag.

You can test which tag you have by doing

git rev-parse v2.0.3

which should return 91d15447 if you have the new version.

Sorry for the inconvenience.

The full change log follows.

2020-04-24 Babeltrace 2.0.3 (German Beer Day)
* Fix: lib: use appropriate format specifier to print message iterator 
class
* Fix: sink.text.pretty: check that port is connected before creating 
message iterator
* Add initial Python bindings documentation
* Fix: bt2: read properties on _DiscardedEventsMessage
* tests: add tests for discarded events/packets creation
* Fix: bt2: add precond. check, for stream class supporting discarded 
msgs with clock snapshot without clock class
* Fix: flt-utils.muxer: reference leak in 
muxer_msg_iter_add_upstream_msg_iter error path
* Fix: sink.text.details: goto error when failing to add input port
* Fix: src.text.dmesg: add missing assignment of `status` on error path
* Revert "bt2: _EventConst.__getitem__(): use a single temporary 
variable"
* Fix: src.ctf.fs: initialize the other_entry variable
* bt2: _EventConst.__getitem__(): use a single temporary variable
* Fix: _EventConst.__getitem__(): check if event has a packet
* doc: bt_field_class...get_mapping_labels...(): clarify RV's validity
* doc/api/libbabeltrace2/style.css: make font weight of `.intertd` 
normal
* Update working version to Babeltrace 2.0.3

Important links
===
Babeltrace 2.0.3 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.3.tar.bz2

Babeltrace website:
https://babeltrace.org

Mailing list (for support and development):
`lttng-dev at lists.lttng.org`

IRC channel:
`#lttng` on `irc.oftc.net`

Git repository:
https://bugs.lttng.org/projects/babeltrace

GitHub project:
https://github.com/efficios/babeltrace

Continuous integration:
https://ci.lttng.org/view/Babeltrace/

Code review:
https://review.lttng.org/q/project:babeltrace
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.9.15 - Joannès

2020-04-16 Thread Jérémie Galarneau via lttng-dev
Hi all,

The fifteenth bug-fix release of LTTng-Tools 2.9 - Joannès has just
been released. This release addresses a number of issues listed below.

2020-04-16 lttng-tools 2.9.15 (National Eggs Benedict Day)
* doc: Fix bind address example for lttng-relayd

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Note that this release marks the end of life of the 2.9.x release
series.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.9.15.tar.bz2

GPG sig:
https://lttng.org/files/lttng-tools/lttng-tools-2.9.15.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.10.11 - KeKriek

2020-04-16 Thread Jérémie Galarneau via lttng-dev
Hi all,

The eleventh bug-fix release of LTTng-Tools 2.10 - KeKriek has just
been released. This release addresses a number of issues listed below.

2020-04-16 lttng-tools 2.10.11 (National Eggs Benedict Day)
* Fix: common: add `void` parameter to log_add_time declaration
* Fix: lttng-list: don't warn when the kernel domain has no channels
* Fix: sessiond: occasional badfd error on repeated SIGTERM
* Fix: lttng: incorrect domain list printed when no domain is provided
* Silence `POSIX Yacc` warnings
* Tests: Fix: `wait_on_file()` returns too early
* Fix: Tests: utils.sh: fix unbound variable
* Tests: Fix typo: registerd -> registered
* Fix: force the use of our _FORTIFY_SOURCE definition

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.10.11.tar.bz2

GPG sig:
https://lttng.org/files/lttng-tools/lttng-tools-2.10.11.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng-tools 2.11.3 - Lafontaine

2020-04-16 Thread Jérémie Galarneau via lttng-dev
Hi all,

The third bug-fix release of LTTng-tools 2.11 - Lafontaine has just
been released. This release addresses a number of issues listed below.

2020-04-16 lttng-tools 2.11.3 (National Eggs Benedict Day)
* Fix: lttng-destroy: missing newline on session destruction message
* Fix: common: add `void` parameter to log_add_time declaration
* Fix: lttng-list: don't warn when the kernel domain has no channels
* Fix: sessiond: occasional badfd error on repeated SIGTERM
* Fix: lttng: incorrect domain list printed when no domain is provided
* directory-handle: print `errno` reason on `unlinkat()` error
* Fix: lttng-ctl: _handle can be NULL
* Silence `POSIX Yacc` warnings
* Fix: relayd: use of relay_session ref count before initialization
* Fix: lttng: uninitialized pointer free'd when no sessiond is present

As always, please report any issue you may encounter to bugs.lttng.org
or on this mailing list.

Project website: https://lttng.org

Download link:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.3.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.3.tar.bz2.asc
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RELEASE] LTTng 2.12.0 - (Ta) Meilleure (Linux kernel and user space tracer)

2020-04-08 Thread Jérémie Galarneau via lttng-dev
Hi everyone,

Today we are releasing LTTng 2.12 - (Ta) Meilleure!

This release is named after "Ta Meilleure", a Northeast IPA beer
brewed by Lagabière. Translating to "Your best one", this beer gives
out strong aromas of passion fruit, lemon, and peaches. Tastewise,
expect a lot of fruit, a creamy texture, and a smooth lingering hop
bitterness.

The most notable features of this new release are:
  - session clearing,
  - uid and gid tracking,
  - file descriptor pooling (relay daemon),
  - per-session grouping (relay daemon),
  - working directory override (relay daemon),
  - new network reception entry/exit tracepoints,
  - statedump of interrupt threads,
  - statedump of x86 CPU topology,
  - new product UUID environment field.

The documentation for those new features is now online at:
https://lttng.org/docs/v2.12

Read on for a short description of each of the new features and the
links to this release.

A prettified version of this announcement is available here:
https://github.com/lttng/lttng-tools/releases/tag/v2.12.0


Note


LTTng-modules now serializes some fields as "Bitfield Enumerations",
which are not part of the CTF v1.8.2 specification.

The CTF 1.8 specification will be amended to include those fields as
part of a future revision. Meanwhile, older CTF readers may encounter
issues when decoding these traces.

Notably, Babeltrace 1.x will produce warnings when decoding traces
that contain these fields. We recommend that current users of the
Babeltrace 1.x release series upgrade to Babeltrace 2.0.


Session clearing
---

You can use the new `lttng-clear` command to clear the contents of one
or more tracing sessions.

In essence, this new feature allows you to prune the content of
long-running sessions without destroying and reconfiguring them. This
is especially useful to clear a session's tracing data between
attempts to reproduce a problem.

Clearing a tracing session deletes the contents of the tracing buffers
and all local or streamed trace data on a remote peer. Note that an
lttng-relayd daemon can be configured to disallow clear operations
using the `LTTNG_RELAYD_DISALLOW_CLEAR` environment variable.

If a session is configured in snapshot mode, only the tracing buffers
are cleared.

If a session is configured in live mode, any attached client that is
lagging behind will finish the consumption of its current trace data
packets and jump forward in time to events generated after the
beginning of the clear command.


uid and gid tracking
---

The existing `lttng-track` command has been expanded to support uid
and gid tracking.

By default, a tracing session tracks all applications and users,
following LTTng's permission model.  However, this new option allows
you to restrict which users and groups are tracked by both the user
space and kernel tracers.

In previous versions of LTTng, it was effectively possible to filter
on the basis of uids and gids using the `--filter` mechanism. However,
this dedicated filtering mechanism is both more efficient in terms of
tracing overhead, but also prevents the creation of tracing buffers
for users and groups which are not tracked.

Overall, this results in far less memory consumption by the user space
tracer on systems which have multiple active users.


File descriptor pooling (relay daemon)
---

A number of users have reported having encountered file descriptor
exhaustion issues when using the relay daemon to serve a large number
of consumers or live clients.

The current on-disk CTF representation used by LTTng (and expected by
a number of viewers) uses one file per CPU, per channel, to organize
traces. This causes the default `RLIMIT_NOFILE` value (1024 on many
systems) to be reached easily, especially when tracing systems with a
large number of cores.

In order to alleviate this problem, the new `--fd-pool-size` option
allows you to specify a maximal number of simultaneously opened file
descriptors (using the soft `RLIMIT_NOFILE` resource limit of the
process by default). This is meant as a work-around for users who
can't bump the system-limit because of permission restrictions.

As its name indicates, this option causes the relay daemon to maintain
a pool (or cache) of open file descriptors which are re-purposed as
needed. The most recently used files' file descriptors are kept open
and only closed as the `--fd-pool-size` limit is reached, keeping the
number of simultaneously opened file descriptors under the
user-specified limit.

Note that setting this value too low can degrade the performance of
the relay daemon.


Per-session grouping (relay daemon)
---

By default, the relay daemon writes the traces under a predefined
directory hierarchy:
  `$LTTNG_HOME/lttng-traces/HOSTNAME/SESSION/DOMAIN` where
  - `HOSTNAME` is the remote hostname,
  - `SESSION` is the full session name,
  - `DOMAIN` is the tracing domain (`ust` or `kernel`),

Using the new relay daemon `--group-output-by-session` option, you can
now change this hierarchy to group 

[lttng-dev] [RELEASE] LTTng 2.12-rc3 - (Ta) Meilleure

2020-03-27 Thread Jérémie Galarneau via lttng-dev
Hi everyone,

Today marks the release of the third LTTng 2.12 - (Ta) Meilleure
release candidate.

The second release candidate was skipped as the configure script
was garbled by my release script. I unfortunately noticed this
after having pushed the tag... Mea culpa!

Have a look at the first release candidate's release notes for an
overview of the features introduced in LTTng 2.12.

https://github.com/lttng/lttng-tools/releases/tag/v2.12.0-rc1

This release is named after "Ta Meilleure", a Northeast IPA beer
brewed by Lagabière. Translating to "Your best one", this beer gives
out strong aromas of passion fruit, lemon, and peaches. Tastewise,
expect a lot of fruit, a creamy texture, and a smooth lingering hop
bitterness.

Of note, the tracker API was changed and the lttng-track(1) and
lttng-untrack(1) man pages were updated to clarify the usage of the
new uid/gid tracking feature.

We have also integrated a number of bug fixes which made their way to
the master branch as we continue to work on the LTTng 2.13 release.

Be safe!

2020-03-27 lttng-tools 2.12.0-rc3 (International Stay at Home Month)
* Fix: remove duplicated AC_INIT directive

2020-03-27 lttng-tools 2.12.0-rc2 (International Stay at Home Month)
* Fix: sessiond: NULL pointer dereference after NULL check
* Fix: sessiond: missing goto in error handler
* Fix: sessiond: user/group name can be leaked on malformed command
* configure: add -Wmissing-declarations, -Wmissing-prototypes, and more
* Fix: sessiond: make the --without-lttng-ust version of 
launch_application_notification_thread static
* Fix: tests: include callsites.h from callsites.c
* Fix: relayd: cast idigit argument to unsigned char
* Fix: tests: make some functions static
* Fix: tests: add `void` parameter to functions that take no parameters
* Fix: common: make lttng_trace_chunk_remove_subdirectory_recursive 
static
* Fix: common: add `void` parameter to log_add_time declaration
* CONTRIBUTING.md: harmonize list style with the rest of the docs
* CONTRIBUTING.md: clarify the guidelines for commit messages
* Fix: lttng-list: don't warn when the kernel domain has no channels
* Refactor: lttng-ctl: follow terminology of the tracker documentation
* lttng: list: replace domain headers with the official names
* lttng: list: print `per-user` and `per-process` buffer types
* Docs: overhaul of lttng-track(1) and lttng-untrack(1)
* Fix: MI: bump MI schema version to 4.0 in mi-lttng.c
* Fix: sessiond: occasional badfd error on repeated SIGTERM
* Fix: lttng: incorrect domain list printed when no domain is provided
* Fix all -Wdiscarded-qualifiers warning instances
* Remove part of last name to fit in a 80 character line
* Fix: Tests: trace path wildcards not expanded
* Fix: Tests: `gen-ust-events` doesn't error out on invalid option
* Fix: Tests: utils.sh: merge `validate_{directory,folder_is}_empty` 
functions
* Fix: Tests: undefined `NR_USEC_WAIT` bash variable
* directory-handle: print `errno` reason on `unlinkat()` error
* Fix: lttng-ctl: _handle can be NULL
* Fix: sessiond: domain subdirectory not deleted on empty clear
* Ignore -Wincomplete-setjmp-declaration warnings
* tests: put -no-pie in LDFLAGS instead of CFLAGS
* Silence `POSIX Yacc` warnings
* Fix -Wmissing-declarations warnings in filter-parser.y
* Include cmd-2-2.h in cmd-2-1.h
* Make create_file function static in gen-ust-tracef.c
* Make remove_file_from_hierarchy function static in 
test_directory_handle.c
* Make fd_count function static in test_fd_tracker.c
* Add declarations for exported functions in health_exit.c
* Add declarations for exported functions in health_fail.c
* Make functions in live_test.c static
* Add declarations for exported functions in consumer_testpoints.c
* Make parse_arguments static in base_client.c
* Fix all -Wmissing-declarations warning instances
* Fix: fd-tracker: mark symbols as hidden
* Fix: liblttng-ctl: hide new tracker config symbols
* configure: add --enable-Werror
* configure: use AX_APPEND_COMPILE_FLAGS to detect supported warning 
flags
* Tests: notification.c: remove extra space
* Tests: remove unused libhealthexit code
* Fix: remove broken health monitoring test `test_thread_exit`
* Fix: directory-handle: use of free'd handle on fstat() error
* Fix: relayd: use of relay_session ref count before initialization
* Fix: relayd: unchecked return value when opening relay socket
* tests: append to AM_CFLAGS instead of overriding it
* Tests: gen-ust-nevents: use options instead of arguments
* Tests: Cleanup: test_exclusion: more detailed