www.cendio.com
Bug 5157 - shadow notification is race:y and can give false information
: shadow notification is race:y and can give false information
Status: CLOSED FIXED
: ThinLinc
VNC
: trunk
: PC Unknown
: P2 Normal
: 4.3.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2014-05-22 10:56 by
Modified: 2014-12-19 09:35 (History)
Acceptance Criteria:


Attachments


Note

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


Description From cendio 2014-05-22 10:56:58
There's this FIXME in the code:

    # FIXME: We have a very small window for a race condition here, i.e. if
    #        start_byte happens to be in the middle of either a _CONNECT_STRING
    #        or a _DISCONNECT_STRING. We could seek back to the beginning of
    #        the line before parsing in order to close this window, but
    #        unfortunately this open up another window - two parse_log calls on
    #        the same line containing a _CONNECT_STRING or a
_DISCONNECT_STRING.
    #        There is probably a solution to this, however the window is so
    #        small that it's not worth spending time on right now.

Unfortunately it seems it happens in practice now in issue 15241.

The code also has a race between stat():ing the file and actually reading it.

The proper solution is probably to keep the file open and do blocking reads on
it. That would also get rid of the polling timer and make it properly event
driven.
------- Comment #1 From cendio 2014-06-03 14:09:28 -------
r29041.
------- Comment #2 From cendio 2014-10-08 10:07:02 -------
Verified that the issue can be reproduced using following commands with
ThinLinc 4.2.0, eg. no notification popup is show;

  echo -n "tl-shadow-notify: OpenAuthenticatedConnectio" >> xinit.log 
  echo "n" >> xinit.log 

and same test with ThinLinc build 4509 works as expected.