Git Product home page Git Product logo

Comments (8)

salva avatar salva commented on July 22, 2024

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.

programmerjake avatar programmerjake commented on July 22, 2024

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:

rc = _libssh2_transport_read(session);

from libssh2.

programmerjake avatar programmerjake commented on July 22, 2024

a workaround is to put the socket in non-blocking mode.

from libssh2.

salva avatar salva commented on July 22, 2024

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.

salva avatar salva commented on July 22, 2024

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.

gmanasi13 avatar gmanasi13 commented on July 22, 2024

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.

gmanasi13 avatar gmanasi13 commented on July 22, 2024

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.

stale avatar stale commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.