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

Re: [libssh] #29: [PATCH] channel_read function blocks if not all requested data was read


Hello,

Trac doesn't work for me. The following error appears while I try to post a
message:
-----------------------------
Context Navigation
------------------------------
 Error: Bad Request

Missing or invalid form token. Do you have cookies enabled?
---------------------------
Note: I've enabled cookies.

Sorry for long delay. This is the stack trace requested in comment 10.

{{{
#2  0x080e4138 in ssh_socket_unbuffered_read (s=0x8ca3eb0, buffer=0x8c9e1c8,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:200
200       rc = recv(s->fd,buffer, len, 0);
Current language:  auto; currently c
(gdb) up
#3  0x080e430b in ssh_socket_completeread (s=0x8ca3eb0, buffer=0x8c9e1c8,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:275
275       while((r = ssh_socket_unbuffered_read(s, ((uint8_t*)buffer +
total), toread))) {


 (gdb) bt
#0  0xb776e424 in __kernel_vsyscall ()
#1  0xb770a428 in recv () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x080e4138 in ssh_socket_unbuffered_read (s=0x8ca3eb0, buffer=0x8c9e1c8,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:200
#3  0x080e430b in ssh_socket_completeread (s=0x8ca3eb0, buffer=0x8c9e1c8,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:275
#4  0x080e4985 in ssh_socket_wait_for_data (s=0x8ca3eb0, session=0x8ca4c58,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:405
#5  0x080e1e54 in packet_read2 (session=0x8ca4c58)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/packet.c:94
#6  0x080e2429 in packet_read (session=0x8ca4c58)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/packet.c:401
#7  0x080cdd56 in channel_read (channel=0x8ca9720, dest=0x8cad460, count=1,
is_stderr=0)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/channels.c:1916
#8  0x0809958b in maux::SshDescriptor::read (this=0x8ca46d8, cpBuf=0x8cad460
"", iBufLen=1,
    iFlag=0) at ../SshDescriptor.cc:415
#9  0x08053e57 in autotest::SshAccess::_receive (this=0x8ca46d8,
buffer=@0xb32b10a8)
    at ../SshAccess.cc:177
#10 0x080543ed in autotest::SshAccess::onActivity (this=0x8ca46d8,
pWaiter=0x8ca4298, iFlags=1)
    at ../SshAccess.cc:300
#11 0x08092fd3 in maux::Waiter::onActivity (this=0x8ca4298,
pxDescr=0x8ca46d8, iFlags=1)
    at ../Waiter.cc:915
#12 0x08093b7d in maux::Waiter::dispatchOneEvent (this=0x8ca4298) at
../Waiter.cc:692
#13 0x08094992 in maux::Waiter::doMainLoop (this=0x8ca4298) at
../Waiter.cc:506
#14 0x08096f04 in maux::OwnThread<maux::Waiter>::main (this=0x8ca42f4) at
../Thread.hh:183
#15 0x08091afc in maux::mainThreadFunction (pxThreadStartup=0xb63f972c) at
../Thread.cc:40
#16 0xb770350f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#17 0xb74f07ee in clone () from /lib/tls/i686/cmov/libc.so.6
(gdb) up
#4  0x080e4985 in ssh_socket_wait_for_data (s=0x8ca3eb0, session=0x8ca4c58,
len=16)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/socket.c:405
405         r = ssh_socket_completeread(session->socket,buf,to_read);
(gdb) up
#5  0x080e1e54 in packet_read2 (session=0x8ca4c58)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/packet.c:94
94            rc = ssh_socket_wait_for_data(session->socket, session,
blocksize);
(gdb) up
#6  0x080e2429 in packet_read (session=0x8ca4c58)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/packet.c:401
401       return packet_read2(session);
(gdb) up
#7  0x080cdd56 in channel_read (channel=0x8ca9720, dest=0x8cad460, count=1,
is_stderr=0)
    at /home/shamanin/libssh_lin/libssh-0.4.4/libssh/channels.c:1916
1916        if ((packet_read(session)) != SSH_OK ||
(gdb) print channel->stdout_buffer
$1 = (ssh_buffer) 0x8ca8640
(gdb) print channel->stdout_buffer->used
$2 = 0
(gdb) print *channel->stdout_buffer
$3 = {
  data = 0x8cacc58 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hello
xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n<capabilities>\n<capability>urn:ietf:params:netconf:base:1.0</capability>\n<capability>urn:ietf:params:netc"...,
used = 0, allocated = 2048, pos = 0}

}}}



2010/9/5 libssh <libssh@xxxxxxxxxx>

> #29: [PATCH] channel_read function blocks if not all requested data was
> read
>
> ----------------------+-----------------------------------------------------
>  Reporter:  tysonite  |        Owner:  tysonite
>     Type:  defect    |       Status:  needinfo
>  Priority:  none      |    Milestone:
> Component:  server    |      Version:  0.4
>  Severity:  critical  |   Resolution:
>  Keywords:            |
>
> ----------------------+-----------------------------------------------------
>
> Comment (by gladiac):
>
>  Any news?
>
> --
> Ticket URL: <http://dev.libssh.org/ticket/29#comment:11>
> libssh <http://dev.libssh.org/>
> The SSH Library
>



-- 
Mikhail

Archive administrator: postmaster@lists.cynapses.org