[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libssh write problem
[Thread Prev] | [Thread Next]
- Subject: Re: libssh write problem
- From: Vasuki Gubbi <gkvasuki@xxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sun, 4 Nov 2012 19:13:53 -0800
- To: libssh@xxxxxxxxxx
Anreas, Thank you for your answer. But unfortunately, this was observed on production system for which I did not have debug information. But my stack trace shows a poll call when I am writing on ssh channel. Why do we need a poll on socket when writing to a channel? Also netstat shows no ssh socket open. So at socket level, socket is closed, but poll is still not returned. Why is call trace struck at poll? I am assuming this poll is poll on the socket. Thanks and Regards, Vasuki On Sat, Nov 3, 2012 at 4:21 AM, Andreas Schneider <asn@xxxxxxxxxxxxxx>wrote: > 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. > > http://api.libssh.org/stable/libssh_tutor_threads.html > > -- > Andreas Schneider GPG-ID: F33E3FC6 > www.cryptomilk.org asn@xxxxxxxxxxxxxx > > >
libssh write problem | Vasuki Gubbi <gkvasuki@xxxxxxxxx> |
Re: libssh write problem | Andreas Schneider <asn@xxxxxxxxxxxxxx> |