[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libssh write problem

On Friday 02 November 2012 17:55:26 Vasuki Gubbi wrote:
> Hello,
> I am using libssh 0.5.2 in a multithreaded application. I establish session
> and also write simultaneously to multiple different hosts simultaneously.
> I have following code to work with pthread library.
> ssh_threads_set_callbacks(ssh_threads_get_pthread());
> ssh_init();
> I am using sockets in blocking mode. But I see once in a while method
> struck in channel_write call. I am enclosing the 2 threads that are struck
> in this position and does not seem to comeout of it.
> Does anyone know if my usage of library is wrong or it is a some kind of
> bug in libssh?

A backtrace without debug symbols doesn't really help. Did you follow:

    At all times, you may use different sessions inside threads, make parallel
    connections, read/write on different sessions and so on. You *cannot* use
    a single session (or channels for a single session) in several threads at
    the same time. This will most likely lead to internal state corruption.
    This limitation is being worked out and will maybe disappear later.


Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

Re: libssh write problemVasuki Gubbi <gkvasuki@xxxxxxxxx>
libssh write problemVasuki Gubbi <gkvasuki@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org