All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem saving session in custom LTTNG_HOME
@ 2018-02-16 23:11 Shehab Elsayed
  0 siblings, 0 replies; 3+ messages in thread
From: Shehab Elsayed @ 2018-02-16 23:11 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 598 bytes --]

Hi All,

I am running into a problem when setting LTTNG_HOME and trying to save a
session. When I do so, it always ends up saving the session to
$HOME/.lttng/sessions instead of $LTTNG_HOME/.lttng/sessions.

I looked at tools/src/bin/lttng-sessiond/save.c and in the save_session
function it executes this line when there is no provided path

char *home_dir = utils_get_user_home_dir ....

Shouldn't it be calling utils_get_home_dir instead?

When I do change the function, "lttng save" always ends up in an error
of invalid pointer.

Any idea why this might be happening?

Thanks,

Shehab Elsayed

[-- Attachment #1.2: Type: text/html, Size: 2721 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

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

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

* Re: Problem saving session in custom LTTNG_HOME
       [not found] <CAC-H6tsYi4VGfOj6U2swnVU7mWb23_2NBAtdHgpUTfTSMwNL9w@mail.gmail.com>
@ 2018-02-19 19:48 ` Jonathan Rajotte-Julien
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Rajotte-Julien @ 2018-02-19 19:48 UTC (permalink / raw)
  To: Shehab Elsayed; +Cc: lttng-dev

Hi,

On Fri, Feb 16, 2018 at 06:10:02PM -0500, Shehab Elsayed wrote:
> Hi All,
> 
> I am running into a problem when setting LTTNG_HOME and trying to save a
> session. When I do so, it always ends up saving the session to
> $HOME/.lttng/sessions instead of $LTTNG_HOME/.lttng/sessions.
> 
> I looked at tools/src/bin/lttng-sessiond/save.c and in the save_session
> function it executes this line when there is no provided path
> 
> char *home_dir = utils_get_user_home_dir ....
> 
> Shouldn't it be calling utils_get_home_dir instead?

Based on the man page, you seem to be right. Jérémie might want to validate if
this was the initial intent. Overall, it would make sense to go the way you are
proposing. I'm not sure that simply swapping one for the other will do what you
expect. If I'm not mistaken utils_get_home_dir will end up saving file in the
LTTNG_HOME/HOME of the user that started the sessiond and not the
caller of the save command. Could you validate?

> 
> When I do change the function, "lttng save" always ends up in an error
> of invalid pointer.

Keep in mind that utils_get_user_home_dir allocate a string that needs to be
freed while utils_get_home_dir does not. You might need to review the memory
handling in this function(save_session).

> 
> Any idea why this might be happening?

Either a backtrace of lttng-sessiond or some code would have been useful here.

Cheers.

-- 
Jonathan Rajotte-Julien
EfficiOS
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

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

* Problem saving session in custom LTTNG_HOME
@ 2018-02-16 23:10 Shehab Elsayed
  0 siblings, 0 replies; 3+ messages in thread
From: Shehab Elsayed @ 2018-02-16 23:10 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 598 bytes --]

Hi All,

I am running into a problem when setting LTTNG_HOME and trying to save a
session. When I do so, it always ends up saving the session to
$HOME/.lttng/sessions instead of $LTTNG_HOME/.lttng/sessions.

I looked at tools/src/bin/lttng-sessiond/save.c and in the save_session
function it executes this line when there is no provided path

char *home_dir = utils_get_user_home_dir ....

Shouldn't it be calling utils_get_home_dir instead?

When I do change the function, "lttng save" always ends up in an error
of invalid pointer.

Any idea why this might be happening?

Thanks,

Shehab Elsayed

[-- Attachment #1.2: Type: text/html, Size: 1664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

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

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

end of thread, other threads:[~2018-02-19 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 23:11 Problem saving session in custom LTTNG_HOME Shehab Elsayed
     [not found] <CAC-H6tsYi4VGfOj6U2swnVU7mWb23_2NBAtdHgpUTfTSMwNL9w@mail.gmail.com>
2018-02-19 19:48 ` Jonathan Rajotte-Julien
  -- strict thread matches above, loose matches on Subject: below --
2018-02-16 23:10 Shehab Elsayed

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.