Bugs item #1902169, was opened at 2008-02-26 15:17 Message generated for change (Comment added) made by bagder You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1902169&group_id=125852
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: API Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Tefnet (ekatalog) >Assigned to: Daniel Stenberg (bagder) Summary: second channel creation fails Initial Comment: As shown in included source code, libssh2 won't create a channel for the second time. this is what appears in openssh daemon logs: Feb 26 15:01:34 biuro sshd[3155]: error: buffer_get_string_ret: bad string length 1702663341 Feb 26 15:01:34 biuro sshd[3155]: fatal: buffer_get_string: buffer error Feb 26 15:01:34 biuro sshd[3155]: pam_unix(sshd:session): session closed for user tefnet on second channel creation in a program, it would return a NULL channel pointer and give no hint in last_error. software versions: libssh2-0.18 openssh-4.7_p1 linux-2.6.17.13 ---------------------------------------------------------------------- >Comment By: Daniel Stenberg (bagder) Date: 2009-02-18 00:36 Message: I just uploaded 1902169.patch to this bug entry. Can you please see if this makes the function run nicer for you? ---------------------------------------------------------------------- Comment By: Paul Thomas (thomaspu) Date: 2008-09-11 03:34 Message: I too have encountered this problem. My quick fix was to always retry channel creation. But this is quite a band-aide approach! ---------------------------------------------------------------------- Comment By: Tefnet (ekatalog) Date: 2008-02-28 12:47 Message: Logged In: YES user_id=1264460 Originator: YES I haven't found any other references to direct_state except for this function. It looks like it's not used. Can we safely skip this part of code? ---------------------------------------------------------------------- Comment By: Tefnet (ekatalog) Date: 2008-02-28 12:40 Message: Logged In: YES user_id=1264460 Originator: YES There is a quick fix when running a single channel at a time. Changing libssh2_channel_direct_tcpip_ex() in tunnel.c from: if (session->direct_state == libssh2_NB_state_idle) to: if (session->direct_state == libssh2_NB_state_idle || 1) fixes the problem. Something with direct_stare is messed up. Investigation continues... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1902169&group_id=125852 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel