Hello,

I am doing a research on software model checking and using an example 
program in the JSch package as a subject for an experiment. By the 
verification result, I found that program "ScpTo" in directory "example" 
may produce an exception under a certain thread schedule. Here is a 
summary of the bug.

- Two threads are involved: the main thread and a Session thread, which 
is created by the call at (ScpTo.java: 29).
- There is no synchronization between these threads. As a result, they 
run independently in parallel.
- The main thread runs along the following trace.

     throw new JSchException("channel is not opened."); (Channel.java: 188)
     channel.connect(); (ScpTo.java: 42)

- This happens if the main thread reaches the failed point before the 
Session thread assigns member "recipient" at (Session.java: 1403).

I am not sure if the developer has been aware of this possibility. Even 
though this specific execution order rarely occurs in actual execution, 
I think it would be good to report the possible failure to the program 
developer.

Regards,
Watcharin Leungwattanakit


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to