All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: LTTNG_ENABLE_EVENT lsm cmd type?
@ 2013-07-04 17:05 Thibault, Daniel
  0 siblings, 0 replies; 2+ messages in thread
From: Thibault, Daniel @ 2013-07-04 17:05 UTC (permalink / raw)
  To: lttng-dev; +Cc: Painchaud, Frederic, Couture, Mario

-----Message d'origine-----
Date: Thu, 4 Jul 2013 16:27:25 +0000
From: "Thibault, Daniel" <Daniel.Thibault@drdc-rddc.gc.ca>
To: "lttng-dev@lists.lttng.org" <lttng-dev@lists.lttng.org>

   [...] 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?
-----Fin du message d'origine-----

   I added a DBG statement and promptly found out that lttng-ctl.c's test should be:

	if (ev->name[0] != '*') {

   Because lttng_enable_event receives ev->name == "*" , not "".

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
CANADA
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
<http://www.valcartier.drdc-rddc.gc.ca/>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* LTTNG_ENABLE_EVENT lsm cmd type?
@ 2013-07-04 16:27 Thibault, Daniel
  0 siblings, 0 replies; 2+ messages in thread
From: Thibault, Daniel @ 2013-07-04 16:27 UTC (permalink / raw)
  To: lttng-dev; +Cc: Painchaud, Frederic, Couture, Mario

   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?

Using:
lttng-tools-2.2.0-30-d771f83
lttng-ust-2.2.0-7-(rc2-46)-2dac206
userspace-rcu-0.7.4-199-(0.7.7-58)-98f483d

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
CANADA
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
<http://www.valcartier.drdc-rddc.gc.ca/>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-04 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-04 17:05 LTTNG_ENABLE_EVENT lsm cmd type? Thibault, Daniel
  -- strict thread matches above, loose matches on Subject: below --
2013-07-04 16:27 Thibault, Daniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.