Comments (8)
Have you enabled trace for everything (i.e. libssh2_trace(session, ~0)
) ?
Is the program busy (100% CPU usage) or waiting for I/O?
Could you try to running the program under the debugger and trying to find where and how it is hanging?
from libssh2.
trace for everything is enabled, I posted the trace after authentication. it blocks inside a read socket syscall, and never returns. the loop in channel read is missing a check to see if it read enough:
Line 1803 in 4138f1e
from libssh2.
a workaround is to put the socket in non-blocking mode.
from libssh2.
the loop in channel read is missing a check to see if it read enough
That is made on purpose in order to improve performance.
Could you include a backtrace at the point where the program is blocked in the read syscall?
from libssh2.
BTW, the socket is already set into non-blocking in libssh2_session_handshake. Setting it also from the outside shouldn't make any difference. Maybe the problem is there.
from libssh2.
Has this issue been addressed/fixed? I am also facing the same problem. For my application, I cannot set the socket to non-blocking mode. It has to be in blocking mode.
from libssh2.
I was able to resolve the problem by using the function "libssh2_session_set_timeout" which is to be used for blocking mode.
from libssh2.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from libssh2.
Related Issues (20)
- I am trying to compile libssh2 as a static library with openSSL 3 but I am getting a of LNK errors in WINDOWS with cmake. HOT 2
- Add support for "strict KEX" protocol extension HOT 1
- Release request (terrapin) HOT 1
- Make a new release to include fix for CVE-2023-48795 HOT 1
- libssh2 1.11.1 release? (with CVE-2023-48795 fix)
- Encryption failure during handshake when using libssh2 and wolfssl HOT 7
- How can I get more descriptive error messages?
- ssh from docker container on arm64 macos ventura to same mac (docker host) fails, ERROR: SSH handshake failed. HOT 1
- (question) when is the terrapin fix going to be released? HOT 1
- libssh2 in PHP: how can I check the supported ciphers and mac algorithms HOT 1
- compilation error with cmake, without passing -DENABLE_ZLIB_COMPRESSION=ON HOT 2
- Unused code setting channel ignore mode HOT 3
- After running this code, the memory usage continuously spikes. What could be the reason? libssh2-1.10.0 HOT 9
- KEX extension indicators are lost in libssh2_session_method_pref() HOT 3
- libssh2 tests are failing HOT 1
- Encrypt-then-MAC feature should be tested in remote end's configuration when receiving data
- Fix AIX build HOT 1
- SFTP failed with the error -41 working with Openssl HOT 9
- libssh2_session_handshake() hangs HOT 3
- libssh2_session_handshake LIBSSH2_ERROR_KEY_EXCHANGE_FAILURE HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libssh2.