[lttng-dev] LTTNG_ENABLE_EVENT lsm cmd type?

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Thu Jul 4 12:27:25 EDT 2013

   In the process of hunting down what is going on with a bug that occurs on one machine but not on the other, I ran into this:

$ sudo -H lttng -vvv create hsession
DEBUG3 [30339/30339]: URI string: file:///root/lttng-traces/hsession-20130704-112000 (in uri_parse() at uri.c:291)
DEBUG3 [30339/30339]: URI file destination: /root/lttng-traces/hsession-20130704-112000 (in uri_parse() at uri.c:328)
DEBUG3 [30339/30339]: URI dtype: 3, proto: 0, host: , subdir: , ctrl: 0, data: 0 (in uri_parse() at uri.c:505)
DEBUG1 [30339/30339]: LSM cmd type : 8 (in send_session_msg() at lttng-ctl.c:130)
Session hsession created.
Traces will be written in /root/lttng-traces/hsession-20130704-112000
DEBUG1 [30339/30339]: Init config session in /root (in config_init() at conf.c:290)

$ sudo -H lttng -vvv enable-event -a -u
DEBUG2 [30341/30341]: Config file path found: /root (in get_session_name() at utils.c:51)
DEBUG1 [30341/30341]: Session name found: hsession (in get_session_name() at utils.c:52)
DEBUG1 [30341/30341]: LSM cmd type : 6 (in send_session_msg() at lttng-ctl.c:130)

On one machine the log continues with:

All UST events are enabled in channel channel0

While on the other I get:

Error: Events: UST create session failed (channel channel0, session hsession)
DEBUG1 [30341/30341]: Clean exit (in clean_exit() at lttng.c:177)

   Setting this bug aside for now (until I can reliably recreate it), what strikes me as odd is the lsm cmd type value: it is LTTNG_ENABLE_EVENT (6) in both cases.  Shouldn't it rather be LTTNG_ENABLE_ALL_EVENT (7)?  This lsm cmd type assignation occurs in only one place, lttng-tools/src/lib/lttng-ctl/lttng-ctl.c:685:

	if (ev->name[0] != '\0') {
		lsm.cmd_type = LTTNG_ENABLE_EVENT;
	} else {
		lsm.cmd_type = LTTNG_ENABLE_ALL_EVENT;

   Since the command was 'lttng enable-event -a -u', one would expect ev->name[0] to indeed be '\0', so what's going on?


Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC  G3J 1X5
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada

More information about the lttng-dev mailing list