Bug 6117 - tl-session prints some log lines incorrectly
Summary: tl-session prints some log lines incorrectly
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: 1.3.1
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: Pierre Ossman
URL:
Keywords: frifl_tester, prosaic
Depends on:
Blocks: 7209
  Show dependency treegraph
 
Reported: 2016-12-29 10:29 CET by Pierre Ossman
Modified: 2021-03-11 10:10 CET (History)
2 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2016-12-29 10:29:57 CET
There are a few raw calls to fprintf() in tl-session.c, rather than the more appropriate logprint(). This causes the lines to end up in vsmagent.log without the proper format (e.g. lacking timestamp).
Comment 2 Karl Mikaelsson cendio 2017-06-08 15:21:04 CEST
On the same theme: the subprocess function from tl-session-common should also include the program name at the start of the logged line, so it's easier to see from where the error comes. It's easy to get confused about where the error occurs when there's a problem executing tl-xinit.
Comment 3 Pierre Ossman cendio 2021-03-08 14:52:25 CET
We also have some direct calls to perror() instead of myperror().
Comment 5 Pierre Ossman cendio 2021-03-09 16:24:28 CET
Most of these issues are for very extreme situations, so they are difficult to test. But two possible scenarios are:

1. Rename the user session root directory for a running session, e.g. mv /var/opt/thinlinc/session/user /var/opt/thinlinc/sessions/foofoo, gives you this log on logout:

> tl-session: unable to change working directory: No such file or directory

2. Hard kill tl-xinit, i.e. killall -9 tl-xinit, gives you this:

> tl-session: tl-xinit was terminated by signal 9
Comment 10 Pierre Ossman cendio 2021-03-09 16:50:04 CET
Works well now. All lines from tl-session should now be properly prefixed with a timestamp.
Comment 11 Frida Flodin cendio 2021-03-11 10:10:39 CET
Tested the fix on RHEL8 and could reproduce with tl-4.12.1 as described in comment 5. Works fine!

Note You need to log in before you can comment on or make changes to this bug.