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

2024-08-23 Thread Jérémie Galarneau via lttng-dev
Hi all,

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

2024-08-22 lttng-tools 2.12.16 (National Take Your Cat to the Vet Day)
* Fix: Do not null out lttng_consumer_stream channel on deletion
* Fix: Crash when unregistering UST apps during shutdown
* lttng-ctl: Hide symbol introduced by fix
* 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.12.16.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.12.16.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.14 - NordicitéE

2024-08-23 Thread Jérémie Galarneau via lttng-dev
Hi all,

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

2024-08-22 lttng-tools 2.13.14 (National Take Your Cat to the Vet Day)
* Fix: Do not null out lttng_consumer_stream channel on deletion
* Fix: Crash when unregistering UST apps during shutdown
* lttng-ctl: Hide symbol introduced by fix

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.14.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.13.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.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> 
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&paste 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 affo

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 b

[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(&rfds);
>   FD_SET(fd, &rfds);
>  
> +#ifdef SYS_pselect6_time64
> + ret = syscall(SYS_pselect6_time64, fd + 1, &rfds, NULL, NULL, NULL, 
> NULL);
> + if (ret == 0 || errno != ENOSYS) {
> + goto pselect_invalid_fd_done;
> + }
> +#endif
> +
> +#ifdef SYS_pselect6
>   ret = syscall(SYS_pselect6, fd + 1, &rfds, 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(&rfds);
>   FD_SET(wait_fd, &rfds);
>  
> +#ifdef SYS_pselect6_time64
> + ret = syscall(SYS_pselect6_time64, 1, &rfds, (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, &rfds, (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]<https://archive.fosdem.org/2019/schedule/event/lttng/>
FOSDEM 2019 - Fine-grained Distributed Application Monitoring Using 
LTTng<https://archive.fosdem.org/2019/schedule/event/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<https://www.youtube.com/watch?v=hra-eu6EOpY>, have read a 
message<https://lists.lttng.org/pipermail/lttng-dev/2021-May/029952.html> 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(&stream->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 +-
 src/common/kernel-ctl

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, &iter.iter, event, node.node) {
>   ret = increment_extended_len(event->filter_expression, NULL, 
> NULL,
>   &extended_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, &iter.iter, 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 2.13.0-rc2 - Nordicité - Linux kernel and user-space tracer

2021-05-14 Thread Jérémie Galarneau via lttng-dev
Hi everyone,

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

A prettyfied version of this annoucement is available here:
https://github.com/lttng/lttng-tools/releases/tag/v2.13.0-rc2

If you were already testing the first release candidate of this release, please
note that LTTng-UST and LTTng-tools must be updated to "rc2" in locked-step
due to ABI changes. Also note that probe providers must be rebuilt against
LTTng-UST 2.13.0-rc2.

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-rc2?
---

- Allow explicit tracepoint instance provider name. Allow re-using a tracepoint
  class from tracepoint instances in other providers.

  This is a localized API-breaking change introduced very early in the
  2.13-rc cycle. The LTTNG_UST_TRACEPOINT_EVENT_INSTANCE macro newly introduced
  in LTTng-UST 2.13-rc1 now takes an extra "template_provider" argument.

  This changes the ABI exposed by the probe providers, so bump the probe
  provider major version, and make newer LTTng-UST reject old incompatible
  major.

  Probe providers built against LTTng-UST 2.13-rc1 must be rebuilt against
  LTTng-UST 2.13-rc2 to be traced.

- Add probe descriptor field to enumeration and event class

  Also breaks the ABI exposed by probe providers (provider major version already
  bumped for rc2). This enables additional validation of probe provider
  compatibility when using event class and enumerations across providers.

- Validate provider version for event class.

- Validate provider version for event enumeration field types.

- Introduce api0 and api1 compilation tests. This tests whether the API 0
  compatibility API works. See ust-api-compat.h for details.

- Fix Java (JUL and log4j) application context segmentation fault and leaks.

- liblttng-ust-ctl: implement SIGBUS handling:

  This fixes a long-standing DoS where an unprivileged application could cause
  a SIGBUS in the consumer daemon by truncating the shared memory files it
  receives from the session daemon. This requires that LTTng-tools be upgraded
  to 2.13-rc2 in locked-step with LTTng-UST 2.13-rc2.

- Restore communication protocol backward compatibility with LTTng-UST 2.12

  - liblttng-ust-ctl: keep using lttng-ust-sock-8 and lttng-ust-wait-8 filename

LTTng-UST 2.13-rc1 erroneously changed the file names of those socket and
pipe files from [...]-8 to [...]-9, even though we intended to keep protocol
compatibility between LTTng-UST 2.12 and LTTng-tools/ust 2.13. This changes
reverts back to the prior filenames to make sure LTTng-UST 2.12 applications
can be traced by a 2.13 LTTng-tools using 2.13 LTTng-UST.

  - Fix: add missing fields in struct lttng_ust_abi_channel_config

Three fields were removed by mistake from this structure which is ABI
between the consumer daemon and applications traced with LTTng-UST. Add them
back to allow tracing 2.12 LTTng-UST applications with a 2.13 LTTng-tools
using 2.13 LTTng-UST.

- Fix LTTng-UST communication protocol variable-length data handling

  When mixing older (e.g. 2.12) and newer versions of LTTng-UST talking to each
  other between application and LTTng-tools, situations where commands are
  unknown lead to out-of-sync communication protocol.

  Change the protocol for commands new to LTTng-UST 2.13 so they acknowledge the
  fixed-size commands before the variable-sized data is sent, so the
  communication protocol is kept in sync even when unknown command error
  happens. This also happens for more ancient commands released in prior
  versions for which we cannot change the protocol. Shutdown the socket from the
  session daemon side when we detect such errors, because there is no point in
  trying to communicate further on an out-of-sync socket.

- Detect mixed liblttng-ust and liblttng-ust-tracepoint .so.0 and .so.1 
libraries

  Detect and report with a new "critical" logging message whether .so.0 and
  .so.1 tracer libraries are loaded within a single process, which is an
  unsupported use-case. Note that the LTTNG_UST_DEBUG environment variable must
  be set to allow users to observe those critical messages.

  We also introduce a new LTTNG_UST_ABORT_ON_CRITICAL environment variable to
  allow the tracer to abort() the process whenever a critical logging statement
  is encountered. This is meant to facilitate discovering problematic
  deployments where an application indirectly loads different soname major
  numbers of LTTng-UST through its instrumented shared libraries.

See the ChangeLog for the full list of changes:
https://github.com/lttng/lttng-ust/blob/13861e2d/ChangeLog


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

- There are refactoring commits that were introduced after 2.13-rc1 to align the
  code of LTTng-modules with the r

Re: [lttng-dev] lttng-modules: block: invalid/unknown value for rwbs field

2021-03-09 Thread Jérémie Galarneau via lttng-dev
Just adding to Francis' explanation (and following up on Awais' questions on 
IRC):
the reason the `print-enum-flags` option is not the default is found here [1].

tl;dr: bitwise enumerations are not defined in CTF 1.8 and will likely be
part of CTF 2.0.

Also, this option is only available in master for the moment and will be part
of a future 2.1 release.

Thanks,
Jérémie

[1] 
https://review.lttng.org/c/babeltrace/+/3045/31#message-c7709b4431ad720962fe9b80880bc689f294c4a9

- Original Message -
From: "lttng-dev" 
To: "Awais Belal" , "lttng-dev" 

Sent: Tuesday, March 9, 2021 9:34:09 AM
Subject: Re: [lttng-dev] lttng-modules: block: invalid/unknown value for rwbs 
field

Hi,

You see this "Unknown value 33" because there are no label with the 
value 33 in the "block_rq_type" enumeration.

More specifically, you see the value "33" because it's the result of two 
OR-ed bitflags (RWBS_FLAG_WRITE | RWBS_FLAG_SYNC).

The type of the "rwbs" field in the event was changed from integer to 
enum in that commit [0]. That change was made to allow trace readers to 
print OR-ed values more nicely have all they need to do it. In fact, 
babeltrace2 implements such feature and you can try it with the 
following command:

$ babeltrace2 -c sink.text.pretty -p print-enum-flags=true 

And would print that field as such: ( "RWBS_FLAG_WRITE" | 
"RWBS_FLAG_SYNC" : container = 33 )

I believe this feature is turn off in Babeltrace2 by default to be 
backward compatible with Babeltrace 1.5.

It's important to note that before that change in the kernel tracer 
Babeltrace would have simply printed "rwbs = 33" so you're not losing 
any information here.

So, try it out with Babeltrace2, it should work as you expect.


Cheers,

Francis

[0] 
https://github.com/lttng/lttng-modules/commit/23634515e7271c8c8594ad87a6685232d4eff297


On 3/9/21 8:10 AM, Awais Belal via lttng-dev wrote:
>
> Hi,
>
> I am using lttng-modules 2.12.5 with a 5.4.93 kernel on an aarch64 
> target. After creating a session I run
>
> *lttng enable-event -k block**
>
> to enable all the block_ kernel events but when I run babeltrace on 
> the generated traces I get a handful of
>
> *[warning] Unknown value 33 in enum.
> ...
> ...
> *
>
> with different values in place of 33. This does not happen with any 
> other kernel event type
>
> *BabelTrace Trace Viewer and Converter 1.5.8*
>
> Also if I try to do a 'lttng view' on this session I can identify that 
> this has something to do with the rwbs field as I get
>
> *[14:03:42.649719750] (+0.05750) imx8qxpmek block_bio_remap: { 
> cpu_id = 3 }, { dev = 187695200, sector = 2460080, nr_sector = 8, rwbs 
> = (  : container = 33 ), old_dev = 187695203, old_sector = 
> 2105776 }
> [14:03:42.649722125] (+0.02375) imx8qxpmek block_bio_queue: { 
> cpu_id = 3 }, { dev = 187695200, sector = 2460080, nr_sector = 8, rwbs 
> = (  : container = 33 ), tid = 428, comm = "jbd2/mmcblk1p3-" }
> [14:03:42.649725000] (+0.02875) imx8qxpmek block_bio_backmerge: { 
> cpu_id = 3 }, { dev = 187695200, sector = 2460080, nr_sector = 8, rwbs 
> = (  : container = 33 ), tid = 428, comm = "jbd2/mmcblk1p3-" }
> ...
> ...*
>
> I believe  in the log points to a symptom? While for the 
> events/container id that do not generate this warning I have in the 
> same trace
>
> *[14:03:44.697572375] (+2.036943500) imx8qxpmek block_bio_remap: { 
> cpu_id = 0 }, { dev = 187695200, sector = 9382032, nr_sector = 8, rwbs 
> = ( "RWBS_FLAG_WRITE" : container = 1 ), old_dev = 187695206, 
> old_sector = 278672 }
> [14:03:44.697584375] (+0.12000) imx8qxpmek block_bio_queue: { 
> cpu_id = 0 }, { dev = 187695200, sector = 9382032, nr_sector = 8, rwbs 
> = ( "RWBS_FLAG_WRITE" : container = 1 ), tid = 1609, comm = 
> "kworker/u8:0" }
> [14:03:44.697604250] (+0.19875) imx8qxpmek block_getrq: { cpu_id = 
> 0 }, { dev = 187695200, sector = 9382032, nr_sector = 8, rwbs = ( 
> "RWBS_FLAG_WRITE" : container = 1 ), tid = 1609, comm = "kworker/u8:0" }*
>
> The interesting thing to note with the working events is that all of 
> them have "RWBS_FLAG_WRITE" and no other types from 
> https://github.com/lttng/lttng-modules/blob/stable-2.12/instrumentation/events/lttng-module/block.h#L39
>  
> which I would expect to see.
>
> I am lost for hints as to what I need to look up... any help would be 
> highly appreciated.
>
> -- 
> BR,
> Awais
>
> ___
> 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 mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] fix: include lttng-list-trigger missing an 's'

2021-03-03 Thread Jérémie Galarneau via lttng-dev
Merged in master, thanks!

Jérémie

- Original Message -
From: "Anders Wallin via lttng-dev" 
To: lttng-dev@lists.lttng.org
Sent: Wednesday, March 3, 2021 3:38:01 AM
Subject: [lttng-dev] [PATCH lttng-tools] fix: include lttng-list-trigger 
missing an 's'

Signed-off-by: Anders Wallin 
---
 src/bin/lttng/commands/list_triggers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/lttng/commands/list_triggers.c 
b/src/bin/lttng/commands/list_triggers.c
index ac6e1ba3..a6f02119 100644
--- a/src/bin/lttng/commands/list_triggers.c
+++ b/src/bin/lttng/commands/list_triggers.c
@@ -19,7 +19,7 @@
 
 #ifdef LTTNG_EMBED_HELP
 static const char help_msg[] =
-#include 
+#include 
 ;
 #endif
 
-- 
2.30.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 Babeltrace 2.0.4 - Amqui

2021-02-23 Thread Jérémie Galarneau via lttng-dev
Hi everyone!

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

What's new since Babeltrace 2.0.3?
==

This release contains a number of plug-in fixes and changes to build the project
on FreeBSD. It also fixes the build system to accomodate some breaking changes
introduced in Autoconf 2.70.

The full change log follows.

2021-02-23 Babeltrace 2.0.4 (National Banana Bread Day)
* Fix: macro name for "get supported mip versions method" attribute 
descriptor
* Fix: configure: support Autoconf 2.70
* port: add 'notext' keyword linker support
* port: fix compat/endian.h on FreeBSD
* port: tests: Add sys/wait.h include for FreeBSD
* port: namespace align.h with BT_ prefix
* port: Add sys/param.h include to compat/limits.h for FreeBSD
* port: disable debug-info by default on FreeBSD
* Fix: disable deprecation warnings for SWIG generated code
* port: 'ls --ignore=' is a GNU extension
* tests/lib/test_trace_ir_ref.c: rename user structure
* Fix: sink.ctf.fs: fix logic of make_unique_stream_file_name
* Fix: sink.ctf.fs: remove spurious directory level when using 
assume-single-trace
* Fix: bt2: _trim_docstring(): docstring can have 0 or 1 line
* Fix: `ctf` plugin: use element FC's alignment as array/seq. FC 
alignment
* Fix: source.ctf.lttng-live: muxing failure on clear (unit conversion)
* Fix: src.ctf.lttng-live: incomplete metadata packet is an error
* Fix: source.ctf.lttng-live: muxing failure on clear
* Fix: source.ctf.fs: 0-length packet index length causes SIGFPE
* Update working version to Babeltrace 2.0.4

Important links
===
Babeltrace 2.0.4 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.4.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.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 tr

[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 output

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

2020-03-10 Thread Jérémie Galarneau
Hi everyone!

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

What's new since Babeltrace 2.0.1?
==

This release contains the following note-worthy fixes:

  - Fixed a segmentation fault when trying to instantiate a trimmer
downstream of a component that creates streams without packets.
See 5cf4fb3d2 [1].

  - The trimmer component class rejected streams that are not
packetized. Since the trimmer supports streams without packets,
there is no reason to reject them.
See a26dd09ff [2].

  - The configure script silently accepted invalid Python
configurations such as building with `--enable-python-plugins`,
but without `--enable-python-bindings`, which resulted in users
being unable to import the `bt2` package.
See 3530dd01a [3].

The full change log follows.

2020-03-10 Babeltrace 2.0.2 (International Bagpipe Day)
* common: cast arguments to character classification functions to 
unsigned char
* flt.utils.muxer: initialize variable to silence -Wmaybe-uninitialized 
warning
* Fix: configure.ac: silently accepting invalid Python configuration
* Cleanup: configure.ac: remove redundant `AC_ARG_ENABLE` parameters
* Fix: plugin-dev.h: Disable address sanitizer on pointer array section 
variables
* Fix: cli: use BT_CLI_LOGE_APPEND_CAUSE instead of printf to print 
errors
* tests: improve flt.utils.trimmer/test_trimming to test streams 
without packets
* Fix: flt-utils.trimmer: accept streams without packet support
* Fix: lib: don't assume that streams have packets in auto seek
* Fix: correct typo in README
* Update working version to Babeltrace 2.0.2


Important links
===
Babeltrace 2.0.2 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.2.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

[1] https://github.com/efficios/babeltrace/commit/5cf4fb3d2
[2] https://github.com/efficios/babeltrace/commit/a26dd09ff
[3] https://github.com/efficios/babeltrace/commit/3530dd01a
___
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.2 - Lafontaine

2020-02-12 Thread Jérémie Galarneau
Hi all,

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

2020-02-12 lttng-tools 2.11.2 (Hug Day)
* Fix: sessiond: check for lttng-modules ABI 2.1 rather than 2.8
* Tests: Fix: `wait_on_file()` returns too early
* Fix: Tests: utils.sh: fix unbound variable
* Tests: Fix typo: registerd -> registered
* Typo: 'toogle' -> 'toggle'
* 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.11.2.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.11.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.1 - Lafontaine

2020-02-06 Thread Jérémie Galarneau
Hi all,

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

2020-02-05 lttng-tools 2.11.1 (National Chocolate Fondue Day)
* Fix: sessiond: snapshot errors don't clear session's trace chunk
* Fix: sessiond: bounded snapshot record fails when no streams exist
* session-descriptor: fix comment typos in session-descriptor.h
* Fix: include stdlib.h in compat/string.h
* Fix: lttng: sanity check of `--probe` description
* Fix: update context types for Python bindings
* Fix: lttng: placing probe on symbol starting with `_`
* Fix: build failure with -fno-common
* doc: Fix bind address example for lttng-relayd
* Test: rotate_utils.sh: consider chunk archive with ust/ as empty
* Fix: consumer: do not flush on transition from NULL chunk
* Fix: consumer: honor "active" flush flag
* Fix: sessiond cmd.h: include missing lttng-sessiond.h
* Fix: sessiond: ust-app: per-pid buffers: Create empty ust/ directory
* Fix: utils: utils_stream_file_path separator
* Fix: consumerd: use packet sequence number for rotation position
* align.h: Implement ALIGN_FLOOR macro
* Fix: relayd: per-pid live: no new metadata vs close
* Fix: relayd: use packet sequence number for rotation position
* Fix: relayd stream.c: LTTNG_OPTIONAL_GET address confusion
* Fix: optional.h macro missing parentheses and guards
* dynamic-array: fix documentation of 
lttng_dynamic_pointer_array_get_pointer
* Fix: make dist fails on sdt-probe test with autotools v1.16+
* Fix: tests: metadata presence on relayd is not deterministic
* Fix: move testpoint after state update
* doc: fix typo in lttng-enable-event man page
* Fix: sessiond: RCU read lock imbalance on get trace chunk id error
* Fix: build: ust -> kernel mix-up in noinst_SCRIPTS
* Fix: relayd: missing metadata stream causes all traces to be skipped
* configure.ac: Remove duplicated CMD_DESCR_ROTATE definition
* Fix: relayd: fully initialize viewer stream before publishing it
* Fix: relayd: don't send streams if there is no metadata
* Fix: update apps on untrack only when session is active
* Fix: consumerd: assert on null trace chunk on session restart
* Fix: sessiond: don't wait for a rotation from a null chunk to finish
* Fix: sessiond: duplicated rotation notification sent
* Fix: relayd: remove assert of non-null stream trace chunk on rotate
* Docs: verb/noun confusion in comment
* Fix: sessiond: no rotation performed from null chunk to new chunk
* Fix: invalid use of destructor in dynamic pointer array
* Fix: relayd: check for a trace chunk before writing a packet
* Fix: relayd: viewer session trace chunk not released on detach
* Require automake >= 1.12
* Fix: relayd: session trace chunk is copied too late
* Fix: relayd: disallow 0-length session names for 2.4+ peers
* Fix: sessiond: ust: deadlock with per-pid buffers
* relayd: close viewer stream trace chunk earlier on release
* Fix: relayd: put chunk reference when closing stream
* Fix: relayd: tracefile rotation: viewer opening missing index file
* Tests: fix shellcheck warning
* Tests: base path: lttng load for session configuration
* Cleanup: remove unused internal lttng_session_descriptor_get_base_path
* Refactor: Move set session path to own function
* Fix: move set base_path of session to URI configuration
* Fix: lttng: initialize sessions pointer to NULL
* Fix: check for dtrace and sdt.h before enabling SDT uprobe tests
* Fix: consumerd: crash occurs when taking snapshot of ust channel
* Fix: trace-chunk: log the cause of file open failures
* Fix: relayd: live: crash when creating viewer streams
* Fix: relayd: live: crash on attach to a session without trace chunk
* Fix: relayd: live: some listed sessions are not attacheable
* Fix: relayd: don't put un-acquired trace chunk reference
* Fix: relayd: don't put un-acquired viewer trace chunk reference
* Fix: consumerd: NULL pointer dereference during metadata sync
* consumerd: clean-up: stream attribute accessed without locking stream
* Fix: check for lttng-ust >= 2.11 at configure
* Typo: occured -> occurred
* Fix typo 'Attemp' -> 'Attempt'
* Fix: sessiond: use system LTTng-UST headers when available
* doc/man: use specific revision date for each manual page
* lttng-rotate.1.txt: update voice and document the `archives` subdir.

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

Project website: https://lttn

[lttng-dev] LTTng-tools 2.10.10 - KeKriek

2020-02-06 Thread Jérémie Galarneau
Hi all,

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

2020-02-05 lttng-tools 2.10.10 (National Chocolate Fondue Day)
* Fix: include stdlib.h in compat/string.h
* Fix: lttng: sanity check of `--probe` description
* Fix: lttng: placing probe on symbol starting with `_`
* Fix: update context types for Python bindings
* doc: Fix bind address example for lttng-relayd
* Require automake >= 1.12
* Fix: sessiond: ust: deadlock with per-pid buffers
* Fix: lttng: initialize sessions pointer to NULL
* Fix: sessiond: use system LTTng-UST headers when available
* doc/man: use specific revision date for each manual page

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.10.tar.bz2

GPG signature:
https://lttng.org/files/lttng-tools/lttng-tools-2.10.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 1.5.8

2020-02-05 Thread Jérémie Galarneau
Hi all,

Today we are releasing the eigth bug-fix release of Babeltrace
1.5. This release addresses a number of issues mainly related to the
use of the lttng-live protocol in conjunction with the new
`lttng-clear` command introduced by LTTng 2.12.

2020-02-05 babeltrace 1.5.8 (National Chocolate Fondue Day)
* Fix: lttng-live format: do not error out on empty streams hang up
* Fix: lttng-live: ctf_live_packet_seek stream hang up handling
* Fix: lib/iterator.c: unbalanced ctx put (leak)
* Fix: lttng-live: lttng_live_open_trace_read memory leak
* Fix: trace-collection: trace clock use after free
* Fix: lttng-live: use-after-free in get_next_index()
* Do not use diagnostic pragma when GCC version is lower than 4.6.0
* Missing define when not building with gcc

Project website: http://diamon.org/babeltrace/
Download link: http://www.efficios.com/files/babeltrace/babeltrace-1.5.8.tar.bz2
CTF specification: http://diamon.org/ctf/
___
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-rc1 - (Ta) Meilleure

2020-02-05 Thread Jérémie Galarneau
Hi everyone!

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

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.

Read on for a short description of each of these 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-rc1


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 options 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 traces by sessions, rather than by
hostname:
  `$LTTNG_HOME/lttng-traces/SESSION/HOST/DOMAIN`.

This proves especially useful if you are tracing a number of hosts
(with different hostnames) which share the same session name as part
of their configuration. Hence, a descriptive session name
(e.g. `connection-hang`) can be used across a fleet of machines
streaming to a given relay daemon.

Note that the default behaviour can be explicitly specified using the
`--group-output-by-host` option.

Working directory override (relay daemon)
---

Finally, this smal

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

2020-02-04 Thread Jérémie Galarneau
Hi everyone!

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

What's new since Babeltrace 2.0.0?
==
This release contains minor bug fixes which are mainly
related to packaging and documentation issues.

Of note for packagers, we have changed the autoconf package name to
`babeltrace2`. This fixes co-installation problems with Babeltrace
1.x, but also changes the naming scheme of the official tarball.

The official tarballs of Babeltrace 2 are now named
`babeltrace2-$VERSION.tar.bz2`. We have added a symlink to reflect
this naming scheme to the prior Babeltrace 2.0.0 release.

The full change log follows.

2020-02-04 Babeltrace 2.0.1
* fix: Remove empty python bindings documentation
* README: Babeltrace 2 was released in 2020
* fix: set autoconf package name to babeltrace2
* Typo: occured -> occurred
* .gitignore: Add missing bt2/native_bt.d
* fix: build failure on ppc64el with '-Werror=format-overflow='
* Silence -Wnull-dereference warning in generated CTF parser code
* plugin-so.c: add comment about why we're not using a GLib linked list
* doc: graph.h: do not link to `man7.org` for `babeltrace(1)`
* fix: common/list.h is LGPL-2.1
* fix: build Python bindings with GCC10
* fix: use correct function to print 'enum bt_ctf_scope'
* Update working version to Babeltrace 2.0.1


Important links
===
Babeltrace 2.0.1 tarball:
https://www.efficios.com/files/babeltrace/babeltrace2-2.0.1.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] [PATCH lttng-tools] Fix: update context types for Python bindings

2020-01-23 Thread Jérémie Galarneau
Merged in master, stable-2.11, and stable-2.10.

Thanks!
Jérémie

On Sat, 18 Jan 2020 at 14:30, Christophe Bedard
 wrote:
>
> Fixes: #1214
>
> Signed-off-by: Christophe Bedard 
> ---
>  extras/bindings/swig/python/lttng.i.in | 45 ++
>  1 file changed, 45 insertions(+)
>
> diff --git a/extras/bindings/swig/python/lttng.i.in 
> b/extras/bindings/swig/python/lttng.i.in
> index f98fda6a..636f39f5 100644
> --- a/extras/bindings/swig/python/lttng.i.in
> +++ b/extras/bindings/swig/python/lttng.i.in
> @@ -130,6 +130,15 @@ enum lttng_event_output {
>  %rename("EVENT_CONTEXT_PPID") LTTNG_EVENT_CONTEXT_PPID;
>  %rename("EVENT_CONTEXT_VPPID") LTTNG_EVENT_CONTEXT_VPPID;
>  %rename("EVENT_CONTEXT_PTHREAD_ID") LTTNG_EVENT_CONTEXT_PTHREAD_ID;
> +%rename("EVENT_CONTEXT_HOSTNAME") LTTNG_EVENT_CONTEXT_HOSTNAME;
> +%rename("EVENT_CONTEXT_IP") LTTNG_EVENT_CONTEXT_IP;
> +%rename("EVENT_CONTEXT_PERF_CPU_COUNTER") 
> LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER;
> +%rename("EVENT_CONTEXT_PERF_THREAD_COUNTER") 
> LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER;
> +%rename("EVENT_CONTEXT_APP_CONTEXT") LTTNG_EVENT_CONTEXT_APP_CONTEXT;
> +%rename("EVENT_CONTEXT_INTERRUPTIBLE") LTTNG_EVENT_CONTEXT_INTERRUPTIBLE;
> +%rename("EVENT_CONTEXT_PREEMPTIBLE") LTTNG_EVENT_CONTEXT_PREEMPTIBLE;
> +%rename("EVENT_CONTEXT_NEED_RESCHEDULE") LTTNG_EVENT_CONTEXT_NEED_RESCHEDULE;
> +%rename("EVENT_CONTEXT_MIGRATABLE") LTTNG_EVENT_CONTEXT_MIGRATABLE;
>  enum lttng_event_context_type {
> LTTNG_EVENT_CONTEXT_PID   = 0,
> LTTNG_EVENT_CONTEXT_PERF_COUNTER  = 1,
> @@ -142,6 +151,15 @@ enum lttng_event_context_type {
> LTTNG_EVENT_CONTEXT_PPID  = 8,
> LTTNG_EVENT_CONTEXT_VPPID = 9,
> LTTNG_EVENT_CONTEXT_PTHREAD_ID= 10,
> +   LTTNG_EVENT_CONTEXT_HOSTNAME  = 11,
> +   LTTNG_EVENT_CONTEXT_IP= 12,
> +   LTTNG_EVENT_CONTEXT_PERF_CPU_COUNTER  = 13,
> +   LTTNG_EVENT_CONTEXT_PERF_THREAD_COUNTER = 14,
> +   LTTNG_EVENT_CONTEXT_APP_CONTEXT   = 15,
> +   LTTNG_EVENT_CONTEXT_INTERRUPTIBLE = 16,
> +   LTTNG_EVENT_CONTEXT_PREEMPTIBLE   = 17,
> +   LTTNG_EVENT_CONTEXT_NEED_RESCHEDULE   = 18,
> +   LTTNG_EVENT_CONTEXT_MIGRATABLE= 19,
>  };
>
>
> @@ -870,6 +888,33 @@ struct lttng_event_context {
> case 10:
> sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_PTHREAD_ID)");
> break;
> +   case 11:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_HOSTNAME)");
> +   break;
> +   case 12:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_IP)");
> +   break;
> +   case 13:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_PERF_CPU_COUNTER)");
> +   break;
> +   case 14:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_PERF_THREAD_COUNTER)");
> +   break;
> +   case 15:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_APP_CONTEXT)");
> +   break;
> +   case 16:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_INTERRUPTIBLE)");
> +   break;
> +   case 17:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_PREEMPTIBLE)");
> +   break;
> +   case 18:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_NEED_RESCHEDULE)");
> +   break;
> +   case 19:
> +   sprintf(temp, "lttng.EventContext; 
> ctx(EVENT_CONTEXT_MIGRATABLE)");
> +   break;
> default:
> sprintf(temp, "lttng.EventContext; type(%i)", 
> $self->ctx);
> break;
> --
> 2.17.1
>
> ___
> 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] Babeltrace 2.0.0

2020-01-22 Thread Jérémie Galarneau
Hello people!

This is it: the day you've been waiting for has finally arrived.

Today we're releasing Babeltrace 2.0 “Amqui”! 🥳

Amqui [1] (/ɒmkwiː/) is a town in eastern Québec [2], Canada, at the
base of the Gaspé peninsula [3] in Bas-Saint-Laurent [4].

Located at the confluence of the Humqui and Matapédia [5] Rivers, its
proximity to woodlands makes it a great destination for outdoor
activities such as camping, hiking, and mountain biking.

By the way, Babeltrace has a new dedicated domain name:
`babeltrace.org`.

NOTE: An HTML version of this announcement is available at
.

Background
==
Just a few words about why Babeltrace 2 took about five years to
complete.

First, let us clarify that from day one, one of the most important
imperatives of the project was **long-term stability**: we wanted
Babeltrace 2 to last for a long time and for its library's API to become
a well-known reference in the trace processing territory, a bit like
Libxml2 [6] has had major version 2 for about 20 years. All the other
Babeltrace 2 parts depend on the library's C API [7]: the command-line
interface [8] (CLI), the plugins, and the Python bindings.

So, as we needed to modify the library, CLI, and plugins to adapt to new
requirements during the development phase, we postponed the release so
as not to have to release Babeltrace 3 a year after and Babeltrace 4
another year after.

Second, the scope and requirements of the project evolved. Because there
were at most two developers working on Babeltrace 2 at the same time
during its first years, the project took enough time to develop for new
ideas to emerge and translate into changes, sometimes significant, to
the project's modules.

For example, the very first requirement was for the libbabeltrace2 API
to use the same objects as Babeltrace 1's CTF writer API. We put a _lot_
of effort backfitting new concepts into the CTF writer API and making
sure not to break existing user code. But in the end, we realized that
this condition was too limiting and that we had to split the APIs
completely to have the freedom to introduce all the features we wanted.

When the API finally met our needs feature-wise in 2018, we measured and
found that a simple CTF-to-text conversion task with Babeltrace 2 was
approximately 23 times slower than the equivalent with Babeltrace 1!
Hence we entered an optimization phase [9] in which we had to redefine
core concepts of the library (for example, introduce _unique_ objects to
create object pools [10]) so that, today, Babeltrace 2's performance is
comparable to Babeltrace 1's [11].

Revamping the C API to optimize the library means we had to readapt the
CLI, plugins, and Python bindings. We spent the beginning of 2019
synchronizing the project's parts, but also improving and uplifting the
test suite and fixing a lot of lingering bugs.

The last few months were invested in writing a complete C API
documentation [7] and in more bug fixes, tests, and build system
improvements.

Today ends this journey to Babeltrace 2.0. It's been a long one, but we
made it. All the next releases of Babeltrace 2 will be minor ones for
the foreseeable future, never breaking the library's API.

Babeltrace 2 is:

* 120,000 lines of C.
* 7000 lines of Python.
* 21,000 tests.
* 30,000 lines of C API documentation.
* 24 manual pages

We hope you enjoy using our software as much as we enjoyed making and
refining it over the last years.

What's new since Babeltrace 1?
==
The Babeltrace 2 project is completely independent from Babeltrace 1. In
fact, you can install both on the same system as they share no common
files. We only made sure to keep the `babeltrace2` CLI [8] tool backward
compatible with the original `babeltrace` tool [12].

See `babeltrace2-intro(7)` [13] to learn more about Babeltrace 2.

General:
* Full plugin support: any user can distribute a Babeltrace 2 plugin
  and, as long as libbabeltrace2 finds it, any application linked to
  libbabeltrace2 can load it and use it.

  Plugins are not just trace format encoders and decoders: they
  package source, filter, and sink component classes so that you can
  connect specialized, reusable components together in a trace
  processing graph to create a customized trace conversion or
  analysis device.

  This modular strategy is much like how the FFmpeg [14],
  GStreamer [15], and DirectShow [16] projects approach media stream
  processing.

* All the parts of the Babeltrace 2 project run on the major
  operating systems, including Linux, macOS, and Windows.

* Some component classes, such as `sink.text.pretty` [17] (similar
  to the `text` output format of the `babeltrace` CLI [12]) and
  `sink.text.details` [18], can write color codes to the standard
  output when it's connected to a color-enabled terminal.

  The Babeltrace 2 log,

Re: [lttng-dev] [PATCH] doc: Fix bind address example for lttng-relayd

2020-01-14 Thread Jérémie Galarneau
Merged in master, stable-2.11, and stable-2.10.

Thanks!
Jérémie

On Mon, Jan 06, 2020 at 02:19:54PM +0900, Benjamin Poirier wrote:
> INADDR_ANY is 0.0.0.0
> 
> Fixes: c93eadade277 ("doc/man: use propagated default values in man pages")
> Signed-off-by: Benjamin Poirier 
> ---
>  doc/man/lttng-relayd.8.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/man/lttng-relayd.8.txt b/doc/man/lttng-relayd.8.txt
> index be59675d..bf88a535 100644
> --- a/doc/man/lttng-relayd.8.txt
> +++ b/doc/man/lttng-relayd.8.txt
> @@ -40,7 +40,7 @@ it can write to the output directory and listen on the 
> configured ports.
>  If a user is within a secured network and/or has proper firewall
>  settings, `lttng-relayd` can listen to LTTng live connections from _all_
>  network interfaces by specifying
> -+--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
> ++--live-port=tcp://0.0.0.0:{default_network_viewer_port}+.
>  
>  Once a trace has been streamed completely, the trace can be processed by
>  any tool that can process an LTTng trace located on the local
> -- 
> 2.25.0.rc0
> 
> ___
> 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] [RFC Patch] Bump LTTNG_MODULES_ABI_MINOR_VERSION to 5

2019-12-19 Thread Jérémie Galarneau
New operations were added to the lttng-modules ABI as part of the 2.12
release cycle to support UID tracking and the "session clear"
functionality.

This will allow future LTTng-tools versions to check for those
capabilities.

Signed-off-by: Jérémie Galarneau 
---
 lttng-abi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lttng-abi.h b/lttng-abi.h
index 5c5d825..1d356ab 100644
--- a/lttng-abi.h
+++ b/lttng-abi.h
@@ -17,7 +17,7 @@
  * should be increased when an incompatible ABI change is done.
  */
 #define LTTNG_MODULES_ABI_MAJOR_VERSION2
-#define LTTNG_MODULES_ABI_MINOR_VERSION4
+#define LTTNG_MODULES_ABI_MINOR_VERSION5
 
 #define LTTNG_KERNEL_SYM_NAME_LEN  256
 #define LTTNG_KERNEL_SESSION_NAME_LEN  256
-- 
2.24.1

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


Re: [lttng-dev] [PATCH babeltrace-1.5 6/6] Fix: lttng-live format: do not error out on empty streams hang up

2019-12-12 Thread Jérémie Galarneau
All patches of this series were merged in stable-1.5.

Thanks!
Jérémie

On Thu, 5 Dec 2019 at 01:58, Mathieu Desnoyers
 wrote:
>
> Attaching to a stream hung up before providing any trace packet
> causes ctf_open_mmap_stream_read() to return an error.
>
> This kind of scenario can happen with the upcoming "lttng clear"
> feature.
>
> Signed-off-by: Mathieu Desnoyers 
> ---
>  formats/ctf/ctf.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c
> index 980ebc9a..1ba9017f 100644
> --- a/formats/ctf/ctf.c
> +++ b/formats/ctf/ctf.c
> @@ -2571,8 +2571,13 @@ int ctf_open_mmap_stream_read(struct ctf_trace *td,
> }
>
> ret = prepare_mmap_stream_definition(td, file_stream, packet_seek);
> -   if (ret)
> +   if (ret) {
> +   /* We need to check for EOF here for empty files. */
> +   if (unlikely(file_stream->pos.offset == EOF)) {
> +   ret = 0;
> +   }
> goto error_index;
> +   }
>
> /*
>  * For now, only a single clock per trace is supported.
> --
> 2.17.1
>


-- 
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


Re: [lttng-dev] [PATCH] configure.ac: Remove duplicated CMD_DESCR_ROTATE definition

2019-11-26 Thread Jérémie Galarneau
Merged in master and stable-2.11.

Thanks!
Jérémie

On Mon, May 27, 2019 at 11:52:46AM -0400, Simon Marchi wrote:
> CMD_DESCR_ROTATE is defined twice by configure.  This breaks configuring
> with "-Werror -Wall", as some test programs don't compile due to:
> 
>   configure:16990: gcc -o conftest -Wall -Werror   conftest.c  >&5
>   conftest.c:163: error: "CONFIG_CMD_DESCR_ROTATE" redefined [-Werror]
>#define CONFIG_CMD_DESCR_ROTATE "Archive a tracing session’s current trace 
> chunk"
> 
>   conftest.c:154: note: this is the location of the previous definition
>#define CONFIG_CMD_DESCR_ROTATE "Archive a tracing session's current trace 
> chunk"
> 
>   cc1: all warnings being treated as errors
> 
> Signed-off-by: Simon Marchi 
> ---
>  configure.ac | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 214d58ac8856..e88875856115 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -412,7 +412,6 @@ _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_STATUS], [Get the 
> status of the current t
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_STOP], [Stop tracing])
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_DISABLE_ROTATION], [Unset a rotation 
> schedule])
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_ENABLE_ROTATION], [Set a rotation 
> schedule])
> -_AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_ROTATE], [Archive a tracing session’s 
> current trace chunk])
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_TRACK], [Track specific system 
> resources])
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_UNTRACK], [Untrack specific system 
> resources])
>  _AC_DEFINE_QUOTED_AND_SUBST([CMD_DESCR_VERSION], [Show version information])
> -- 
> 2.21.0
> 
> ___
> 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 1/3] Fix: relayd: tracefile rotation: viewer opening missing index file

2019-11-22 Thread Jérémie Galarneau
All three patches of this series were merged in master and
stable-2.11.

Thanks!
Jérémie

On Fri, Nov 01, 2019 at 04:23:03PM -0400, Mathieu Desnoyers wrote:
> Moving the head position of the tracefile array when the data is
> received opens a window where a viewer attaching to the session could
> try to open a missing index file (which has not been received yet).
> 
> However, we want to bump the tail position as soon as we receive
> data, because the prior tail is not valid anymore.
> 
> Solve this by introducing two head positions: the "read" head
> and the "write" head. The "write" head is the position of the
> newest data file (equivalent to the prior "head" position). We
> also introduce a "read" head position, which is only moved
> forward when the index is received.
> 
> The viewer now uses the "read" head position as upper bound, which
> ensures it never attempts to open a non-existing index file.
> 
> Signed-off-by: Mathieu Desnoyers 
> ---
>  src/bin/lttng-relayd/stream.c  |  4 +-
>  src/bin/lttng-relayd/tracefile-array.c | 58 --
>  src/bin/lttng-relayd/tracefile-array.h | 21 --
>  src/bin/lttng-relayd/viewer-stream.c   |  2 +-
>  4 files changed, 58 insertions(+), 27 deletions(-)
> 
> diff --git a/src/bin/lttng-relayd/stream.c b/src/bin/lttng-relayd/stream.c
> index 94698f8d..4d3d37a2 100644
> --- a/src/bin/lttng-relayd/stream.c
> +++ b/src/bin/lttng-relayd/stream.c
> @@ -958,7 +958,7 @@ int stream_init_packet(struct relay_stream *stream, 
> size_t packet_size,
>   stream->stream_handle,
>   stream->tracefile_size_current, packet_size,
>   stream->tracefile_current_index, 
> new_file_index);
> - tracefile_array_file_rotate(stream->tfa);
> + tracefile_array_file_rotate(stream->tfa, 
> TRACEFILE_ROTATE_WRITE);
>   stream->tracefile_current_index = new_file_index;
>  
>   if (stream->stream_fd) {
> @@ -1095,6 +1095,7 @@ int stream_update_index(struct relay_stream *stream, 
> uint64_t net_seq_num,
>  
>   ret = relay_index_try_flush(index);
>   if (ret == 0) {
> + tracefile_array_file_rotate(stream->tfa, TRACEFILE_ROTATE_READ);
>   tracefile_array_commit_seq(stream->tfa);
>   stream->index_received_seqcount++;
>   *flushed = true;
> @@ -1188,6 +1189,7 @@ int stream_add_index(struct relay_stream *stream,
>   }
>   ret = relay_index_try_flush(index);
>   if (ret == 0) {
> + tracefile_array_file_rotate(stream->tfa, TRACEFILE_ROTATE_READ);
>   tracefile_array_commit_seq(stream->tfa);
>   stream->index_received_seqcount++;
>   stream->pos_after_last_complete_data_index += index->total_size;
> diff --git a/src/bin/lttng-relayd/tracefile-array.c 
> b/src/bin/lttng-relayd/tracefile-array.c
> index 20b760c0..3d62317a 100644
> --- a/src/bin/lttng-relayd/tracefile-array.c
> +++ b/src/bin/lttng-relayd/tracefile-array.c
> @@ -62,7 +62,8 @@ void tracefile_array_destroy(struct tracefile_array *tfa)
>   free(tfa);
>  }
>  
> -void tracefile_array_file_rotate(struct tracefile_array *tfa)
> +void tracefile_array_file_rotate(struct tracefile_array *tfa,
> + enum tracefile_rotate_type type)
>  {
>   uint64_t *headp, *tailp;
>  
> @@ -70,24 +71,37 @@ void tracefile_array_file_rotate(struct tracefile_array 
> *tfa)
>   /* Not in tracefile rotation mode. */
>   return;
>   }
> - /* Rotate to next file.  */
> - tfa->file_head = (tfa->file_head + 1) % tfa->count;
> - if (tfa->file_head == tfa->file_tail) {
> - /* Move tail. */
> - tfa->file_tail = (tfa->file_tail + 1) % tfa->count;
> - }
> - headp = &tfa->tf[tfa->file_head].seq_head;
> - tailp = &tfa->tf[tfa->file_head].seq_tail;
> - /*
> -  * If we overwrite a file with content, we need to push the tail
> -  * to the position following the content we are overwriting.
> -  */
> - if (*headp != -1ULL) {
> - tfa->seq_tail = tfa->tf[tfa->file_tail].seq_tail;
> + switch (type) {
> + case TRACEFILE_ROTATE_READ:
> + /*
> +  * Rotate read head to write head position, thus allowing
> +  * reader to consume the newly rotated head file.
> +  */
> + tfa->file_head_read = tfa->file_head_write;
> + break;
> + case TRACEFILE_ROTATE_WRITE:
> + /* Rotate write head to next file, pushing tail if needed.  */
> + tfa->file_head_write = (tfa->file_head_write + 1) % tfa->count;
> + if (tfa->file_head_write == tfa->file_tail) {
> + /* Move tail. */
> + tfa->file_tail = (tfa->file_tail + 1) % tfa->count;
> + }
> + headp = &tfa->tf[tfa->file_head_write].seq_head;
> + tailp = &tfa->tf[tfa->file_hea

Re: [lttng-dev] [PATCH lttng-tools] Require automake >= 1.12

2019-11-22 Thread Jérémie Galarneau
Merged in master, stable-2.11, and stable-2.10.

Thanks!
Jérémie

On Thu, Nov 07, 2019 at 02:02:55PM -0500, Michael Jeanson wrote:
> The test suite LOG_DRIVER statement requires that automake >= 1.12 be used
> during bootstrap.
> 
> Signed-off-by: Michael Jeanson 
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index d8ab1e0ac..10b338420 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -8,7 +8,7 @@ AC_CONFIG_MACRO_DIR([m4])
>  AC_CANONICAL_TARGET
>  AC_CANONICAL_HOST
>  
> -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax nostdinc])
> +AM_INIT_AUTOMAKE([1.12 foreign dist-bzip2 no-dist-gzip tar-pax nostdinc])
>  AM_MAINTAINER_MODE([enable])
>  
>  # Enable silent rules if available (Introduced in AM 1.11)
> -- 
> 2.17.1
> 
___
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 v2] Fix: update apps on untrack only when session is active

2019-11-22 Thread Jérémie Galarneau
Merged in master and stable-2.11.

Thanks!
Jérémie

On Mon, Nov 18, 2019 at 03:12:20PM -0500, Jonathan Rajotte wrote:
> This mimics what is done on the track side.
> 
> Fixes #1210
> 
> Signed-off-by: Jonathan Rajotte 
> ---
> 
> Used wrong issue number.
> 
> ---
>  src/bin/lttng-sessiond/trace-ust.c | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bin/lttng-sessiond/trace-ust.c 
> b/src/bin/lttng-sessiond/trace-ust.c
> index 486b53d30..a6c0c04ad 100644
> --- a/src/bin/lttng-sessiond/trace-ust.c
> +++ b/src/bin/lttng-sessiond/trace-ust.c
> @@ -922,6 +922,7 @@ end:
>  int trace_ust_untrack_pid(struct ltt_ust_session *session, int pid)
>  {
>   int retval = LTTNG_OK;
> + bool should_update_apps = false;
>  
>   if (pid == -1) {
>   /* Create empty tracker, replace old tracker. */
> @@ -938,7 +939,7 @@ int trace_ust_untrack_pid(struct ltt_ust_session 
> *session, int pid)
>   fini_pid_tracker(&tmp_tracker);
>  
>   /* Remove session from all applications */
> - ust_app_global_update_all(session);
> + should_update_apps = true;
>   } else {
>   int ret;
>   struct ust_app *app;
> @@ -957,9 +958,12 @@ int trace_ust_untrack_pid(struct ltt_ust_session 
> *session, int pid)
>   /* Remove session from application. */
>   app = ust_app_find_by_pid(pid);
>   if (app) {
> - ust_app_global_update(session, app);
> + should_update_apps = true;
>   }
>   }
> + if (should_update_apps && session->active) {
> + ust_app_global_update_all(session);
> + }
>  end:
>   return retval;
>  }
> -- 
> 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] Babeltrace 2.0.0-rc4

2019-11-15 Thread Jérémie Galarneau
Hi everyone!

Two weeks after having released [1] Babeltrace 2's second release
candidate, today we're releasing Babeltrace 2.0.0-rc4.

NOTE: Due to human error, Babeltrace 2.0.0-rc3 is a malformed release.
Babeltrace 2.0.0-rc3 and Babeltrace 2.0.0-rc4 have the same changes
since Babeltrace 2.0.0-rc2.

What's new since Babeltrace 2.0.0-rc2?
==
Improvements

General:
* Introduce the `BABELTRACE_EXEC_ON_ABORT` environment variable.

  `BABELTRACE_EXEC_ON_ABORT` can contain a shell command line to
  execute when any part of the Babeltrace project aborts (for
  example, when an internal assertion fails) before the process
  exits.

  See `8403432f`.

* Add precondition assertions to verify that the current thread has
  no error when you call a libbabeltrace2 function (except reference
  count functions).

  See `7c7324d3`.

* Add postcondition assertions to verify that the user functions
  which libbabeltrace2 calls return an error status code when the
  current thread has an error.

  See `d6f6a5aa`.

* Emit dedicated bright terminal color codes if supported by the
  terminal emulator.

  This makes the `babeltrace2` [2] CLI tool and some project plugins
  emit correct bright color codes for the kitty terminal
  emulator [3], for example.

  You can override this behaviour with the new
  `BABELTRACE_TERM_COLOR_BRIGHT_MEANS_BOLD` environment variable.

  See `4253e1eb`.

* In libbabeltrace2's API: make the
  `bt_value_map_foreach_entry_func` and
  `bt_value_map_foreach_entry_const_func` function types return a
  status code instead of `bt_bool`.

  This makes it possible for the user function to append a cause to
  the current thread's error and return an error status code. When
  the user function returns a general error status code,
  `bt_value_map_foreach_entry()` returns
  `BT_VALUE_MAP_FOREACH_ENTRY_STATUS_USER_ERROR` (and an equivalent
  code for `bt_value_map_foreach_entry_const()`).

  The new way to interrupt the outer loop from the user function is
  to return `BT_VALUE_MAP_FOREACH_ENTRY_FUNC_STATUS_INTERRUPT`.

  See `0589c646`.

Command-line interface:
Exit with status 2 when the process receives the `SIGINT` signal.

This makes it possible to distinguish a successful execution
(status 0) from an execution that ends because of an error
(status 1).

See `851802b1`.

`source.ctf.fs` component class:
* Check the version of LTTng [4] index files to avoid reading files
  of future backwards-incompatible versions.

  See `2068d50b`.

* If the same packets exist in different data stream files of a
  given CTF trace, read each of them only once.

  This feature makes it possible to open overlapping LTTng
  snapshots [5] without emitting the event and packet messages twice
  or more like Babeltrace 1 does.

  For example:

  $ babeltrace2 snapshot1 snapshot2 snapshot3

  $ babeltrace2 snapshot-directory

  See `148f02cb`.

`source.ctf.lttng-live` component class:
Return
`BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_AGAIN` when
a signal interrupts an I/O system call _and_ the graph's interrupter
is set; restart the system call otherwise.

Because the `babeltrace2` CLI tool sets the graph's interrupter when
it receives the `SIGINT` signal, this change makes it possible to
exit with status 2 (instead of status 1, an error) when it receives
the `SIGINT` signal and a `source.ctf.lttng-live` message iterator
is currently being executed.

See `8dd99d00`.

`filter.utils.muxer` component class:
Append causes to the current thread's error when encountering some
error conditions.

See `f331468c`.

Notable bug fixes
~
Simple sink component class:
Append error causes only when returning an error status code.

See `eb657c7b`.

Upcoming

We are still hard at work putting the finishing touches on our way to
the final 2.0.0 release.

We invite you to try this release candidate and report any problems you
may encounter to the `lttng-dev@lists.lttng.org` [6] mailing list or
through the Babeltrace bug tracker [7].

Documentation
-
We are currently documenting the entire Babeltrace 2 C API to make the
development of new component classes as easy as possible.

We'll also work on the Python bindings documentation.

The documentation of the API will be made available on the official
Babeltrace website [8].

Other tasks
---
* Improve test coverage.
* Improve resilience to corrupted/malformed CTF traces.
* Minor internal cleanups and bug fixes.

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

Babeltrace website:
https://diamon.org/babeltrace

Mailing list (for support a

Re: [lttng-dev] [PATCH lttng-tools 1/5] Fix: move set base_path of session to URI configuration

2019-11-06 Thread Jérémie Galarneau
d,
> -   const char *base_path, struct ltt_session **out_session)
> +   struct ltt_session **out_session)
>  {
> int ret;
> enum lttng_error_code ret_code;
> @@ -1086,16 +1086,6 @@ enum lttng_error_code session_create(const char *name, 
> uid_t uid, gid_t gid,
> }
> }
>
> -   if (base_path) {
> -   new_session->base_path = strdup(base_path);
> -   if (!new_session->base_path) {
> -   ERR("Failed to allocate base path of session \"%s\"",
> -   name);
> -   ret_code = LTTNG_ERR_SESSION_FAIL;
> -   goto error;
> -   }
> -   }
> -
> new_session->uid = uid;
> new_session->gid = gid;
>
> diff --git a/src/bin/lttng-sessiond/session.h 
> b/src/bin/lttng-sessiond/session.h
> index 31a40a741..20a7fcbc8 100644
> --- a/src/bin/lttng-sessiond/session.h
> +++ b/src/bin/lttng-sessiond/session.h
> @@ -193,7 +193,7 @@ struct ltt_session {
>
>  /* Prototypes */
>  enum lttng_error_code session_create(const char *name, uid_t uid, gid_t gid,
> -   const char *base_path, struct ltt_session **out_session);
> +   struct ltt_session **out_session);
>  void session_lock(struct ltt_session *session);
>  void session_lock_list(void);
>  int session_trylock_list(void);
> diff --git a/tests/unit/test_session.c b/tests/unit/test_session.c
> index b538bddc6..d01117809 100644
> --- a/tests/unit/test_session.c
> +++ b/tests/unit/test_session.c
> @@ -132,7 +132,7 @@ static int create_one_session(char *name)
> struct ltt_session *session = NULL;
>
> session_lock_list();
> -   ret_code = session_create(name, geteuid(), getegid(), NULL, &session);
> +   ret_code = session_create(name, geteuid(), getegid(), &session);
> session_put(session);
> if (ret_code == LTTNG_OK) {
> /* Validate */
> @@ -288,7 +288,7 @@ void test_session_name_generation(void)
> const char *expected_session_name_prefix = DEFAULT_SESSION_NAME;
>
> session_lock_list();
> -   ret_code = session_create(NULL, geteuid(), getegid(), NULL, &session);
> +   ret_code = session_create(NULL, geteuid(), getegid(), &session);
> ok(ret_code == LTTNG_OK,
> "Create session with a NULL name (auto-generate a name)");
> if (!session) {
> --
> 2.17.1
>


-- 
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


Re: [lttng-dev] [PATCH lttng-tools] fix: Re-add link to urcu-bp for _LGPL_SOURCE tests

2019-11-05 Thread Jérémie Galarneau
Merged in master.

Thanks!
Jérémie

On Tue, Nov 05, 2019 at 11:30:24AM -0500, Michael Jeanson wrote:
> Tests with tracepoints defined with _LGPL_SOURCE require to be
> explicitly linked against urcu-bp.
> 
> Signed-off-by: Michael Jeanson 
> ---
>  tests/regression/ust/multi-session/Makefile.am  | 2 +-
>  tests/utils/testapp/gen-ust-events/Makefile.am  | 2 +-
>  tests/utils/testapp/gen-ust-nevents-str/Makefile.am | 2 +-
>  tests/utils/testapp/gen-ust-nevents/Makefile.am | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/regression/ust/multi-session/Makefile.am 
> b/tests/regression/ust/multi-session/Makefile.am
> index 0d807a878..676c26f21 100644
> --- a/tests/regression/ust/multi-session/Makefile.am
> +++ b/tests/regression/ust/multi-session/Makefile.am
> @@ -2,7 +2,7 @@ AM_CFLAGS += -I$(srcdir)
>  
>  noinst_PROGRAMS = gen-nevents
>  gen_nevents_SOURCES = gen-nevents.c tp.c ust_gen_nevents.h
> -gen_nevents_LDADD = $(UST_LIBS) $(DL_LIBS)
> +gen_nevents_LDADD = $(UST_LIBS) -lurcu-bp $(DL_LIBS)
>  
>  noinst_SCRIPTS = test_multi_session
>  EXTRA_DIST = test_multi_session
> diff --git a/tests/utils/testapp/gen-ust-events/Makefile.am 
> b/tests/utils/testapp/gen-ust-events/Makefile.am
> index 38e620d75..8918fc80d 100644
> --- a/tests/utils/testapp/gen-ust-events/Makefile.am
> +++ b/tests/utils/testapp/gen-ust-events/Makefile.am
> @@ -4,7 +4,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \
>  if HAVE_LIBLTTNG_UST_CTL
>  noinst_PROGRAMS = gen-ust-events
>  gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h
> -gen_ust_events_LDADD = $(UST_LIBS) \
> +gen_ust_events_LDADD = $(UST_LIBS) -lurcu-bp \
>   $(top_builddir)/tests/utils/libtestutils.la \
>   $(DL_LIBS)
>  endif
> diff --git a/tests/utils/testapp/gen-ust-nevents-str/Makefile.am 
> b/tests/utils/testapp/gen-ust-nevents-str/Makefile.am
> index 0e961b4c4..27cb9efa7 100644
> --- a/tests/utils/testapp/gen-ust-nevents-str/Makefile.am
> +++ b/tests/utils/testapp/gen-ust-nevents-str/Makefile.am
> @@ -4,7 +4,7 @@ AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils \
>  if HAVE_LIBLTTNG_UST_CTL
>  noinst_PROGRAMS = gen-ust-nevents-str
>  gen_ust_nevents_str_SOURCES = gen-ust-nevents-str.c tp.c tp.h
> -gen_ust_nevents_str_LDADD = $(UST_LIBS) \
> +gen_ust_nevents_str_LDADD = $(UST_LIBS) -lurcu-bp \
>   $(top_builddir)/tests/utils/libtestutils.la \
>   $(DL_LIBS)
>  endif
> diff --git a/tests/utils/testapp/gen-ust-nevents/Makefile.am 
> b/tests/utils/testapp/gen-ust-nevents/Makefile.am
> index c20910bd8..f85d35a13 100644
> --- a/tests/utils/testapp/gen-ust-nevents/Makefile.am
> +++ b/tests/utils/testapp/gen-ust-nevents/Makefile.am
> @@ -4,7 +4,7 @@ AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils \
>  if HAVE_LIBLTTNG_UST_CTL
>  noinst_PROGRAMS = gen-ust-nevents
>  gen_ust_nevents_SOURCES = gen-ust-nevents.c tp.c tp.h
> -gen_ust_nevents_LDADD = $(UST_LIBS) \
> +gen_ust_nevents_LDADD = $(UST_LIBS) -lurcu-bp \
>   $(top_builddir)/tests/utils/libtestutils.la \
>   $(DL_LIBS)
>  endif
> -- 
> 2.17.1
> 
___
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: Use DL_LIBS variable in ust multi-lib test

2019-11-04 Thread Jérémie Galarneau
Merged in master.

Thanks!
Jérémie

On Thu, Oct 24, 2019 at 11:36:33AM -0400, Michael Jeanson wrote:
> Signed-off-by: Michael Jeanson 
> ---
>  tests/regression/ust/multi-lib/Makefile.am | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/regression/ust/multi-lib/Makefile.am 
> b/tests/regression/ust/multi-lib/Makefile.am
> index 0ce46a7ff..52a1635c2 100644
> --- a/tests/regression/ust/multi-lib/Makefile.am
> +++ b/tests/regression/ust/multi-lib/Makefile.am
> @@ -3,11 +3,11 @@ EXTRA_DIST = test_multi_lib
>  noinst_PROGRAMS = exec-with-callsites exec-without-callsites
>  
>  exec_with_callsites_SOURCES = multi-lib-test.c callsites.c
> -exec_with_callsites_LDFLAGS = -ldl $(POPT_LIBS)
> +exec_with_callsites_LDFLAGS = $(DL_LIBS) $(POPT_LIBS)
>  exec_with_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=1
>  
>  exec_without_callsites_SOURCES = multi-lib-test.c
> -exec_without_callsites_LDFLAGS = -ldl $(POPT_LIBS) $(UST_LIBS)
> +exec_without_callsites_LDFLAGS = $(DL_LIBS) $(POPT_LIBS) $(UST_LIBS)
>  exec_without_callsites_LDADD = probes.o
>  exec_without_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=0
>  
> -- 
> 2.17.1
> 
___
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: initialize sessions pointer to NULL

2019-11-04 Thread Jérémie Galarneau
Merged in master, stable-2.11, and stable-2.10.

Thanks!
Jérémie

On Fri, Oct 25, 2019 at 05:56:26PM -0400, Jonathan Rajotte wrote:
> lttng_list_sessions does not set the passed pointer to NULL on empty
> return. This lead to deallocation of non-allocated memory (segfault).
> 
> For returns of size 0, the value of the passed argument should be
> considered "undefined".
> 
> Refactor error handling a bit by removing the "error" jump. Always call
> free on the sessions object.
> 
> Fixes #1205
> 
> Signed-off-by: Jonathan Rajotte 
> ---
>  src/bin/lttng/commands/list.c | 11 +--
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c
> index 28166c8be..65d8ea6f5 100644
> --- a/src/bin/lttng/commands/list.c
> +++ b/src/bin/lttng/commands/list.c
> @@ -1825,7 +1825,7 @@ static int list_sessions(const char *session_name)
>   int ret = CMD_SUCCESS;
>   int count, i;
>   unsigned int session_found = 0;
> - struct lttng_session *sessions;
> + struct lttng_session *sessions = NULL;
>  
>   count = lttng_list_sessions(&sessions);
>   DBG("Session count %d", count);
> @@ -1838,7 +1838,7 @@ static int list_sessions(const char *session_name)
>   if (lttng_opt_mi) {
>   /* Mi */
>   if (session_name == NULL) {
> - /* List all session */
> + /* List all sessions */
>   ret = mi_list_sessions(sessions, count);
>   } else {
>   /* Note : this return an open session element */
> @@ -1846,7 +1846,7 @@ static int list_sessions(const char *session_name)
>   }
>   if (ret) {
>   ret = CMD_ERROR;
> - goto error;
> + goto end;
>   }
>   } else {
>   /* Pretty print */
> @@ -1893,7 +1893,7 @@ static int list_sessions(const char *session_name)
>   if (!session_found && session_name != NULL) {
>   ERR("Session '%s' not found", session_name);
>   ret = CMD_ERROR;
> - goto error;
> + goto end;
>   }
>  
>   if (session_name == NULL) {
> @@ -1901,9 +1901,8 @@ static int list_sessions(const char *session_name)
>   }
>   }
>  
> -error:
> - free(sessions);
>  end:
> + free(sessions);
>   return ret;
>  }
>  
> -- 
> 2.17.1
> 
___
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] Use pkgconfig to detect and configure liblttng-ust

2019-11-04 Thread Jérémie Galarneau
Merged in master.

Thanks!
Jérémie

On Thu, Oct 24, 2019 at 11:36:22AM -0400, Michael Jeanson wrote:
> Signed-off-by: Michael Jeanson 
> ---
>  configure.ac  | 25 +--
>  src/bin/lttng-consumerd/Makefile.am   |  2 +-
>  src/bin/lttng-sessiond/Makefile.am|  2 +-
>  src/common/ust-consumer/Makefile.am   |  2 +-
>  tests/regression/tools/filtering/Makefile.am  |  2 +-
>  .../ust/baddr-statedump/Makefile.am   |  2 +-
>  tests/regression/ust/daemon/Makefile.am   |  2 +-
>  tests/regression/ust/exit-fast/Makefile.am|  2 +-
>  tests/regression/ust/fork/Makefile.am |  4 +--
>  .../ust/high-throughput/Makefile.am   |  2 +-
>  tests/regression/ust/libc-wrapper/Makefile.am |  2 +-
>  tests/regression/ust/linking/Makefile.am  | 10 
>  .../regression/ust/low-throughput/Makefile.am |  2 +-
>  tests/regression/ust/multi-lib/Makefile.am|  6 ++---
>  .../regression/ust/multi-session/Makefile.am  |  2 +-
>  tests/regression/ust/overlap/demo/Makefile.am |  4 +--
>  .../ust/type-declarations/Makefile.am |  3 ++-
>  tests/unit/Makefile.am|  4 +--
>  .../testapp/gen-ust-events-ns/Makefile.am |  2 +-
>  .../utils/testapp/gen-ust-events/Makefile.am  |  2 +-
>  .../testapp/gen-ust-nevents-str/Makefile.am   |  2 +-
>  .../utils/testapp/gen-ust-nevents/Makefile.am |  2 +-
>  .../utils/testapp/gen-ust-tracef/Makefile.am  |  2 +-
>  23 files changed, 44 insertions(+), 44 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index e57f53631..dd708883b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -560,19 +560,18 @@ AC_ARG_WITH([lttng-ust],
>[with_lttng_ust=yes]
>  )
>  
> -AS_IF([test "x$with_lttng_ust" = "xyes"],
> -  [
> -AC_CHECK_LIB([lttng-ust-ctl], [ustctl_recv_channel_from_consumer],
> -  [
> -AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1])
> -  ],
> -  [
> -AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.2.x. Use [LDFLAGS]=-Ldir 
> and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust 
> to build lttng-tools without LTTng-UST support.])
> -  ],
> -  [-lurcu-common -lurcu-bp -lurcu-cds -lrt -ldl]
> -)
> -  ]
> -)
> +AS_IF([test "x$with_lttng_ust" = "xyes"], [
> +  AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1])
> +
> +  # Check for liblttng-ust
> +  PKG_CHECK_MODULES([UST], [lttng-ust >= $major_version.$minor_version])
> +
> +  # Check for liblttng-ust-ctl
> +  PKG_CHECK_MODULES([UST_CTL], [lttng-ust-ctl >= 
> $major_version.$minor_version])
> +
> +  AM_CPPFLAGS="$AM_CPPFLAGS $UST_CFLAGS"
> +])
> +
>  AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$with_lttng_ust" = "xyes"])
>  
>  
> diff --git a/src/bin/lttng-consumerd/Makefile.am 
> b/src/bin/lttng-consumerd/Makefile.am
> index 9d54309cf..0659a34a0 100644
> --- a/src/bin/lttng-consumerd/Makefile.am
> +++ b/src/bin/lttng-consumerd/Makefile.am
> @@ -16,5 +16,5 @@ lttng_consumerd_LDADD = \
>  lttng_consumerd_LDFLAGS = -rdynamic
>  
>  if HAVE_LIBLTTNG_UST_CTL
> -lttng_consumerd_LDADD += -llttng-ust-ctl
> +lttng_consumerd_LDADD += $(UST_CTL_LIBS)
>  endif
> diff --git a/src/bin/lttng-sessiond/Makefile.am 
> b/src/bin/lttng-sessiond/Makefile.am
> index 296ec148b..ebb8cb284 100644
> --- a/src/bin/lttng-sessiond/Makefile.am
> +++ b/src/bin/lttng-sessiond/Makefile.am
> @@ -78,5 +78,5 @@ lttng_sessiond_LDADD = -lurcu-common -lurcu $(KMOD_LIBS) \
>  
>  
>  if HAVE_LIBLTTNG_UST_CTL
> -lttng_sessiond_LDADD += -llttng-ust-ctl
> +lttng_sessiond_LDADD += $(UST_CTL_LIBS)
>  endif
> diff --git a/src/common/ust-consumer/Makefile.am 
> b/src/common/ust-consumer/Makefile.am
> index 1acdc7f12..1df8b53c0 100644
> --- a/src/common/ust-consumer/Makefile.am
> +++ b/src/common/ust-consumer/Makefile.am
> @@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libust-consumer.la
>  libust_consumer_la_SOURCES = ust-consumer.c ust-consumer.h
>  
>  libust_consumer_la_LIBADD = \
> - -llttng-ust-ctl \
> + $(UST_CTL_LIBS) \
>   $(top_builddir)/src/common/relayd/librelayd.la
>  
>  endif
> diff --git a/tests/regression/tools/filtering/Makefile.am 
> b/tests/regression/tools/filtering/Makefile.am
> index b214fc1d6..5900a2093 100644
> --- a/tests/regression/tools/filtering/Makefile.am
> +++ b/tests/regression/tools/filtering/Makefile.am
> @@ -3,7 +3,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests -I$(srcdir)
>  if HAVE_LIBLTTNG_UST_CTL
>  noinst_PROGRAMS = gen-ust-events
>  gen_ust_events_SOURCES = gen-ust-events.c tp.c tp.h
> -gen_ust_events_LDADD = -llttng-ust -lurcu-bp $(DL_LIBS)
> +gen_ust_events_LDADD = $(UST_LIBS) $(DL_LIBS)
>  endif
>  
>  noinst_SCRIPTS = test_unsupported_op test_invalid_filter test_valid_filter
> diff --git a/tests/regression/ust/baddr-statedump/Makefile.am 
> b/tests/regression/ust/baddr-statedump/Makefile.am
> index bf51f9483..253c9029f 100644
> --- a/tests/regression/ust/baddr-statedump/Makefile.am
> +++ b/tests/regression/ust/

Re: [lttng-dev] [PATCH lttng-tools] fix: check for dtrace and sdt.h before enabling SDT uprobe tests

2019-11-04 Thread Jérémie Galarneau
Merged in master and stable-2.11.

Thanks!
Jérémie

On Thu, Oct 31, 2019 at 04:12:46PM -0400, Michael Jeanson wrote:
> Add a configure switch '--enable-sdt-uprobe / --disable-sdt-uprobe', the
> default behavior of enabling the test if the requirements are found is
> kept but it's now possible to explicitly disable it.
> 
> Also add the detection of the dtrace binary and its override trough the
> DTRACE environment variable.
> 
> Signed-off-by: Michael Jeanson 
> ---
>  configure.ac  | 37 +--
>  tests/utils/testapp/Makefile.am   |  4 +-
>  .../userspace-probe-sdt-binary/Makefile.am|  8 +++-
>  3 files changed, 42 insertions(+), 7 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8c0683fe2..ab0a15b2d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -25,9 +25,6 @@ AC_PROG_CXX
>  RW_PROG_CXX_WORKS
>  AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
>  
> -LTTNG_CHECK_SDT_WORKS
> -AM_CONDITIONAL([SDT_WORKS], [test "x$lttng_cv_sdt_works" = "xyes"])
> -
>  # Checks for programs.
>  AC_PROG_GREP
>  AC_PROG_MAKE_SET
> @@ -815,6 +812,36 @@ AC_SUBST([RUN_PYTHON_AGENT_TEST])
>  AC_SUBST([PYTHON2_AGENT])
>  AC_SUBST([PYTHON3_AGENT])
>  
> +AC_ARG_ENABLE([test-sdt-uprobe],
> +  [AS_HELP_STRING([--enable-test-sdt-uprobe], [enable the LTTng UST SDT 
> uprobe tests [default=autodetect]])],
> +  [test_sdt_uprobe="$enableval"],
> +  [test_sdt_uprobe=autodetect]
> +)
> +
> +AS_IF([test "$test_sdt_uprobe" != "no"], [
> +  LTTNG_CHECK_SDT_WORKS
> +  AC_PATH_PROG([DTRACE], [dtrace])
> +])
> +
> +AS_IF([test "$test_sdt_uprobe" = "yes"], [
> +  AS_IF([test "$lttng_cv_sdt_works" = "no"], [
> +AC_MSG_ERROR([Cannot find 'sys/sdt.h'.])
> +  ])
> +  AS_IF([test "x$DTRACE" = "x"], [
> +AC_MSG_ERROR([Cannot find SystemTap dtrace. You can set the DTRACE 
> variable to override automatic detection.])
> +  ])
> +])
> +
> +AS_IF([test "$test_sdt_uprobe" = "autodetect"], [
> +  AS_IF([test "$lttng_cv_sdt_works" = "yes"], [
> +AS_IF([test "x$DTRACE" != "x"], [
> +  test_sdt_uprobe=yes
> +])
> +  ])
> +])
> +
> +AM_CONDITIONAL([TEST_SDT_UPROBE], [test "$test_sdt_uprobe" = "yes"])
> +
>  # Arguments for binaries build exclusion
>  AC_ARG_ENABLE([bin-lttng], AS_HELP_STRING([--disable-bin-lttng],[Disable the 
> build of lttng binaries]))
>  AC_ARG_ENABLE([bin-lttng-consumerd], 
> AS_HELP_STRING([--disable-bin-lttng-consumerd],
> @@ -1243,6 +1270,10 @@ PPRINT_PROP_BOOL([LTTng-UST Python2 agent tests], 
> $value)
>  test ! -z "$PYTHON3_AGENT" && value=1 || value=0
>  PPRINT_PROP_BOOL([LTTng-UST Python3 agent tests], $value)
>  
> +# LTTng UST Java agent Log4j tests enabled/disabled
> +test "x$test_sdt_uprobe" = "xyes" && value=1 || value=0
> +PPRINT_PROP_BOOL([LTTng-UST SDT uprobe tests], $value)
> +
>  #Python binding enabled/disabled
>  test "x$enable_python_binding" = xyes && value=1 || value=0
>  AS_ECHO
> diff --git a/tests/utils/testapp/Makefile.am b/tests/utils/testapp/Makefile.am
> index 2a4cf5c7b..e2ad1f235 100644
> --- a/tests/utils/testapp/Makefile.am
> +++ b/tests/utils/testapp/Makefile.am
> @@ -12,9 +12,9 @@ if CXX_WORKS
>  SUBDIRS += userspace-probe-elf-cxx-binary
>  endif # CXX_WORKS
>  
> -if SDT_WORKS
> +if TEST_SDT_UPROBE
>  SUBDIRS += userspace-probe-sdt-binary
> -endif # SDT_WORKS
> +endif # TEST_SDT_UPROBE
>  
>  if HAVE_MODULES_USERSPACE_CALLSTACK_CONTEXT
>  SUBDIRS += gen-syscall-events-callstack
> diff --git a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am 
> b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
> index d79ce0ea3..591f4aa6c 100644
> --- a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
> +++ b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
> @@ -26,10 +26,14 @@ libzzz_la_CFLAGS = -I$(abs_builddir)
>  libzzz_la_LDFLAGS = -module -shared -avoid-version -rpath 
> $(abs_builddir)/.libs/
>  nodist_libzzz_la_SOURCES = $(abs_builddir)/foobar_provider.h
>  
> +dtrace_verbose = $(dtrace_verbose_@AM_V@)
> +dtrace_verbose_ = $(dtrace_verbose_@AM_DEFAULT_V@)
> +dtrace_verbose_0 = @echo "  DTRACE  " $@;
> +
>  foobar_provider.h: foobar_provider.d
> - dtrace -s $< -o $@ -h
> + $(dtrace_verbose)$(DTRACE) -s $< -o $@ -h
>  
>  foobar_provider.o: foobar_provider.d
> - dtrace -s $< -o $@ -G
> + $(dtrace_verbose)$(DTRACE) -s $< -o $@ -G
>  
>  CLEANFILES = foobar_provider.h
> -- 
> 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] Babeltrace 2.0.0-rc2

2019-11-01 Thread Jérémie Galarneau
Hi everyone!

Two weeks after having released [1] Babeltrace 2's first release
candidate, today we're releasing Babeltrace 2.0.0-rc2.

A prettified version of this announcement is available at:
https://diamon.org/babeltrace/docs/release-notes/babeltrace-2.0.0-rc2-release-notes.html

What's new since Babeltrace 2.0.0-rc1?
==

Improvements

General:
* Introduce `BT_ASSERT_DBG()` for assertions that must only be
  evaluated in debugging mode (when the `BABELTRACE_DEBUG_MODE`
  environment variable is set to `1` at configuration time).

  `BT_ASSERT()` assertions are now always evaluated, regardless of
  the debugging/production mode.

  This change's purpose is to keep as many slow-path assertions as
  possible to detect more Babeltrace 2 programming errors, even in
  production.

  See `98b15851`.

* Remove ABI versioning in Babeltrace 2 shared object plugins as we
  don't need this property.

  See `7c0244d6`.

* In libbabeltrace2's API:

  * Rename `BT_RANGE_SET_` prefixes to `BT_INTEGER_RANGE_SET_`.

See `eb171ee9`.

  * Make `bt_version_get_major()`, `bt_version_get_minor()`, and
`bt_version_get_patch()` functions return `unsigned int` instead
of `int`.

See `78deb913`.

  * Remove the `BT_GRAPH_RUN_STATUS_END` status code:
`bt_graph_run()` now returns `BT_GRAPH_RUN_STATUS_OK` when all
the graph's sink components are ended.

See `9669d693`.

`ctf` plugin:
Append error causes at more source locations.

This means more precise error messages reported by the `babeltrace2`
[2] CLI tool, for example.

See `b7d2695a, `b30284d1, `2246e99da, and `1419db2bc.

`source.ctf.fs` component class:
Return an error when failing to load or create an index for a
trace.

See `29a8227a`.

`filter.lttng-utils.debug-info` component class:
Create stream classes and event classes which correspond to stream
classes and event classes in incoming trace classes as soon as we
encounter a new trace class, rather than as needed.

See `db5d746d`.

Python bindings:
In `bt2.Graph.add_component()`, validate that the `params` parameter
is implicitly convertible to a `bt2.Mapvalue` object (`dict`, for
example).

See `401b7022`.

Bug fixes
-
General:
Fix many issues reported by static analysis tools (scan-build,
Coverity [3], and compiler warnings).

`source.ctf.fs` component class:
Fix an index handling bug which occured when multiple data stream
files in a CTF trace belong to the same data stream.

See `ce75de14`.

`source.ctf.lttng-live` component class:
Fix a bug in which a disappearing LTTng live tracing session could
lead to an assertion failure.

See `ba90bce7`.

Python bindings:
Fix an assertion failure which occurs when a trace or trace class
destruction listener raises an exception.

See `64961f8b`.

Upcoming

We are still hard at work putting the finishing touches on our way to
the final 2.0.0 release.

We invite you to try this release candidate and report any problems you
may encounter to the `lttng-dev@lists.lttng.org` [4] mailing list or
through the Babeltrace bug tracker [5].

Documentation
-
We are currently documenting the entire Babeltrace 2 C API to make the
development of new component classes as easy as possible.

We'll also work on the Python bindings documentation.

The documentation of the API will be made available on the official
Babeltrace website [6].

Other tasks
---
* Improve test coverage.
* Improve resilience to corrupted/malformed CTF traces.
* Minor internal cleanups and bug fixes.

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

Babeltrace website:
https://diamon.org/babeltrace

Mailing list (for support and development):
`lttng-dev@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

References
==
[1]: 
https://diamon.org/babeltrace/docs/release-notes/babeltrace-2.0.0-rc1-release-notes.html
[2]: https://diamon.org/babeltrace/docs/v2.0/man1/babeltrace2.1/
[3]: https://scan.coverity.com/projects/babeltrace
[4]: https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
[5]: https://bugs.lttng.org/projects/babeltrace
[6]: https://diamon.org/babeltrace/

-- 
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] [PATCH urcu] cds_lfht_is_node_deleted parameter can be marked const

2019-10-28 Thread Jérémie Galarneau
Mark the cds_lfht_node pointer parameter of cds_lfht_is_node_deleted
as const. The fact that this parameter is mutable makes it harder to
use liburcu in const-correct code.

Signed-off-by: Jérémie Galarneau 
---
 include/urcu/rculfhash.h | 2 +-
 src/rculfhash.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/urcu/rculfhash.h b/include/urcu/rculfhash.h
index cbf513e..20b822f 100644
--- a/include/urcu/rculfhash.h
+++ b/include/urcu/rculfhash.h
@@ -499,7 +499,7 @@ int cds_lfht_del(struct cds_lfht *ht, struct cds_lfht_node 
*node);
  * This function does not issue any memory barrier.
  */
 extern
-int cds_lfht_is_node_deleted(struct cds_lfht_node *node);
+int cds_lfht_is_node_deleted(const struct cds_lfht_node *node);
 
 /*
  * cds_lfht_resize - Force a hash table resize
diff --git a/src/rculfhash.c b/src/rculfhash.c
index ff42df0..8e60f19 100644
--- a/src/rculfhash.c
+++ b/src/rculfhash.c
@@ -825,7 +825,7 @@ struct cds_lfht_node *clear_flag(struct cds_lfht_node *node)
 }
 
 static
-int is_removed(struct cds_lfht_node *node)
+int is_removed(const struct cds_lfht_node *node)
 {
return ((unsigned long) node) & REMOVED_FLAG;
 }
@@ -1829,7 +1829,7 @@ int cds_lfht_del(struct cds_lfht *ht, struct 
cds_lfht_node *node)
return ret;
 }
 
-int cds_lfht_is_node_deleted(struct cds_lfht_node *node)
+int cds_lfht_is_node_deleted(const struct cds_lfht_node *node)
 {
return is_removed(CMM_LOAD_SHARED(node->next));
 }
-- 
2.23.0

___
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.11] fix: check for lttng-ust >= 2.11 at configure

2019-10-24 Thread Jérémie Galarneau
Merged in master and stable-2.11. Thanks!

Jérémie

On Wed, Oct 23, 2019 at 11:08:34AM -0400, Michael Jeanson wrote:
> We don't support building lttng-tools against an older version of
> lttng-ust, make this check explicitly at configure.
> 
> Signed-off-by: Michael Jeanson 
> ---
>  configure.ac | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5c4073ef8..357e2b888 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -562,14 +562,13 @@ AC_ARG_WITH([lttng-ust],
>  
>  AS_IF([test "x$with_lttng_ust" = "xyes"],
>[
> -AC_CHECK_LIB([lttng-ust-ctl], [ustctl_recv_channel_from_consumer],
> +AC_CHECK_LIB([lttng-ust-ctl], [lttng_ust_enum_get_from_desc],
>[
>  AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1])
>],
>[
> -AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.2.x. Use [LDFLAGS]=-Ldir 
> and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust 
> to build lttng-tools without LTTng-UST support.])
> -  ],
> -  [-lurcu-common -lurcu-bp -lurcu-cds -lrt -ldl]
> +AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.11.x. Use [LDFLAGS]=-Ldir 
> and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust 
> to build lttng-tools without LTTng-UST support.])
> +  ]
>  )
>]
>  )
> -- 
> 2.17.1
> 
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-ust] Docs: LTTNG-UST(3): missing references to some namespace man pages

2019-10-24 Thread Jérémie Galarneau
On Thu, 24 Oct 2019 at 15:12, Michael Jeanson  wrote:
>
> On 2019-10-24 3:08 p.m., Jérémie Galarneau wrote:
> > The LTTNG-UST(3) manual page is missing references to the mount,
> > network, ipc, and uts namespace man pages.
> >
> > Signed-off-by: Jérémie Galarneau 
> > ---
> >  doc/man/lttng-ust.3.txt | 10 +-
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/doc/man/lttng-ust.3.txt b/doc/man/lttng-ust.3.txt
> > index 1bd4d1e0..2534612a 100644
> > --- a/doc/man/lttng-ust.3.txt
> > +++ b/doc/man/lttng-ust.3.txt
> > @@ -804,15 +804,15 @@ The following man:namespaces(7) context fields are 
> > supported by LTTng-UST:
> >
> >  `ipc_ns`::
> >  System V IPC, POSIX message queues namespace: inode number of the
> > -current IPC namespace in the proc filesystem.
> > +current man:ipc_namespaces(7) namespace in the proc filesystem.
> >
> >  `mnt_ns`::
> > -Mount points namespace: inode number of the current Mount namespace
> > -in the proc filesystem.
> > +Mount points namespace: inode number of the current
> > +man:mount_namespaces(7) in the proc filesystem.
> >
> >  `net_ns`::
> >  Network devices, stacks, ports namespace: inode number of the
> > -current Network namespace in the proc filesystem.
> > +current man:network_namespaces(7) in the proc filesystem.
> >
> >  `pid_ns`::
> >  Process IDs namespace: inode number of the current
> > @@ -824,7 +824,7 @@ The following man:namespaces(7) context fields are 
> > supported by LTTng-UST:
> >
> >  `uts_ns`::
> >  Hostname and NIS domain name namespace: inode number of the
> > -current UTS namespace in the proc filesystem.
> > +current man:uts_namespaces(7) in the proc filesystem.
> >
> >  The following man:credentials(7) context fields are supported by LTTng-UST:
> >
> >
>
> The 'ipc_namespaces(7)' and 'uts_namespaces(7)' aren't present on my
> system, do you have them on Arch?

Yes, of course! ;-)

Jérémie


-- 
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] [PATCH lttng-ust] Docs: LTTNG-UST(3): missing references to some namespace man pages

2019-10-24 Thread Jérémie Galarneau
The LTTNG-UST(3) manual page is missing references to the mount,
network, ipc, and uts namespace man pages.

Signed-off-by: Jérémie Galarneau 
---
 doc/man/lttng-ust.3.txt | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/man/lttng-ust.3.txt b/doc/man/lttng-ust.3.txt
index 1bd4d1e0..2534612a 100644
--- a/doc/man/lttng-ust.3.txt
+++ b/doc/man/lttng-ust.3.txt
@@ -804,15 +804,15 @@ The following man:namespaces(7) context fields are 
supported by LTTng-UST:
 
 `ipc_ns`::
 System V IPC, POSIX message queues namespace: inode number of the
-current IPC namespace in the proc filesystem.
+current man:ipc_namespaces(7) namespace in the proc filesystem.
 
 `mnt_ns`::
-Mount points namespace: inode number of the current Mount namespace
-in the proc filesystem.
+Mount points namespace: inode number of the current
+man:mount_namespaces(7) in the proc filesystem.
 
 `net_ns`::
 Network devices, stacks, ports namespace: inode number of the
-current Network namespace in the proc filesystem.
+current man:network_namespaces(7) in the proc filesystem.
 
 `pid_ns`::
 Process IDs namespace: inode number of the current
@@ -824,7 +824,7 @@ The following man:namespaces(7) context fields are 
supported by LTTng-UST:
 
 `uts_ns`::
 Hostname and NIS domain name namespace: inode number of the
-current UTS namespace in the proc filesystem.
+current man:uts_namespaces(7) in the proc filesystem.
 
 The following man:credentials(7) context fields are supported by LTTng-UST:
 
-- 
2.23.0

___
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.9 - KeKriek

2019-10-18 Thread Jérémie Galarneau
Hi all,

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

2019-10-17 lttng-tools 2.10.9 (Wear Something Gaudy Day)
* Fix: sessiond: TOCTOU error on save of session configuration
* Fix: tests: replace truncation-prone logging helper

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.9.tar.bz2

GPG sig:
https://lttng.org/files/lttng-tools/lttng-tools-2.10.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.9.14 - Joannès

2019-10-18 Thread Jérémie Galarneau
Hi all,

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

2019-10-17 lttng-tools 2.9.14 (Wear Something Gaudy Day)
* Fix: sessiond: TOCTOU error on save of session configuration
* Fix: tests: replace truncation-prone logging helper

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.14.tar.bz2

GPG sig:
https://lttng.org/files/lttng-tools/lttng-tools-2.9.14.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 typo 'Attemp' -> 'Attempt'

2019-10-18 Thread Jérémie Galarneau
Merged in master and stable-2.11.

Thanks!
Jérémie

On Fri, Oct 18, 2019 at 05:12:22PM -0400, Michael Jeanson wrote:
> Signed-off-by: Michael Jeanson 
> ---
>  src/common/trace-chunk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/common/trace-chunk.c b/src/common/trace-chunk.c
> index afba60b38..20dbd0a5e 100644
> --- a/src/common/trace-chunk.c
> +++ b/src/common/trace-chunk.c
> @@ -1269,7 +1269,7 @@ lttng_trace_chunk_registry_publish_chunk(
>*
>* Re-attempt to publish.
>*/
> - ERR("Attemp to publish a trace chunk to the 
> chunk registry raced with a trace chunk deletion");
> + ERR("Attempt to publish a trace chunk to the 
> chunk registry raced with a trace chunk deletion");
>   continue;
>   }
>   }
> -- 
> 2.17.1
> 
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


  1   2   3   4   5   6   7   8   9   10   >