Bug 260559 - [tml][vncviewer] Enhance protocol framework and VNC viewer robustness
Summary: [tml][vncviewer] Enhance protocol framework and VNC viewer robustness
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sequoyah (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: TmL Inbox CLA
QA Contact:
URL:
Whiteboard: released_0.3M6
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2009-01-09 11:17 EST by Fabio Rigo CLA
Modified: 2016-11-08 14:46 EST (History)
3 users (show)

See Also:


Attachments
A patch that implements minor bug fixes and an Event Handler for handling socket related requests (65.95 KB, patch)
2009-02-02 07:37 EST, Fabio Rigo CLA
fabio.fantato: iplog+
Details | Diff
Sequence diagrams that compare old implementation with the proposed solution (61.38 KB, image/pjpeg)
2009-02-02 07:38 EST, Fabio Rigo CLA
fabio.fantato: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rigo CLA 2009-01-09 11:17:19 EST
Today, there is lack of control over the network resources involved in the communication (sockets). It is possible for any thread to access a socket for sending data, starting, stopping and reconnecting. 

Moreover, there are some known inappropriate exception handling blocks (stack trace printing) and it is possible to reach infinite loops during input stream reading at the VNC viewer.
Comment 1 Fabio Rigo CLA 2009-02-02 07:37:16 EST
Created attachment 124412 [details]
A patch that implements minor bug fixes and an Event Handler for handling socket related requests
Comment 2 Fabio Rigo CLA 2009-02-02 07:38:49 EST
Created attachment 124413 [details]
Sequence diagrams that compare old implementation with the proposed solution
Comment 3 Fabio Rigo CLA 2009-02-02 07:39:05 EST
Hi guys, 

I am posting a proposal for enhancement on the points described in the bug. In the attached patch(260559_patch.txt), you'll find several minor changes and one major change to enhance concurrency control on the socket. 

For the major change I have adopted a solution based on a single thread access to the socket object. This thread is called the "Event Handler". 

Other threads requests to the Event Handler to perform actions on the socket, and it is the Event Handler job to schedule the requests and execute them without concurrency. The attached sequence diagram illustrates how the mechanism works compared to the old implementation. 

The scheduling is not expected to decrease performance, because it is based on simple boolean tests. In the lack of start/stop/reconnect requests, this thread will work basically as a message sender thread. 

I will appreciate if you dedicate some of your time analysing this, and if you have any comments please post them as well. 

Thanks and best regards
Comment 4 Fabio Rigo CLA 2009-02-02 07:54:47 EST
I wrote the code of all new classes that are contained in the archive. I have
the right to contribute the code to Eclipse, and authorize to license it
through EPL.
Comment 5 Daniel Barboza Franco CLA 2009-02-05 14:00:37 EST
Hi,

The patch has been tested with different vnc servers. The Event handler resolved the majority of the crash problems and deadlock situations.

Integration branch: branch_dsdp_tml_bug_260559
Merged to: HEAD

many thanks,
Daniel.
Comment 6 Fabio Fantato CLA 2009-03-11 11:48:44 EDT
released_0.3M6