From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <448ba62499b12b914d3c049236e05694@gmx.de> To: 9fans@cse.psu.edu Subject: Re: [9fans] bug in ape? Date: Wed, 19 Dec 2007 22:23:47 +0100 From: cinap_lenrek@gmx.de In-Reply-To: <13426df10712182036u75556ebei34744ac7fab4099c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 1cb906e8-ead3-11e9-9d60-3106f5b1d025 Ron, you are right... I wrote a simple test program that makes a socket and selects on it and then calls recv() if it is readable. Here is my stacktrace: acid: lstk() read(nbytes=0xa,buf=0xdfffeb7e,d=0x4)+0x0 /sys/src/ape/lib/ap/plan9/read.c:10 noblock=0x0 n=0x9 recv(flags=0x0,fd=0x4,a=0xdfffeb7e,n=0xa)+0x3e /sys/src/ape/lib/bsd/send.c:30 main()+0x153 /tmp/socktest/a.c:39 fd=0x4 a=0x50000002 s=0x10 x=0x0 _main+0x26 /sys/src/ape/lib/ap/386/main9.s:12 It calls the right read() from /sys/src/ape/lib/ap/plan9/read.c. But i still dont understand why the stacktrace you posted shows recv() calling read from /sys/src/libc/9sys/read.c :-( How can that happen? >> pread()+0x7 /sys/src/libc/9syscall/pread.s:5 >> read(fd=0x5,buf=0x110414,n=0x1000)+0x2f /sys/src/libc/9sys/read.c:7 >> recv(flags=0x0,fd=0x5,a=0x110414,n=0x1000)+0x3e >> /sys/src/ape/lib/bsd/send.c:30 >> libssh2_packet_read(session=0x1102f8)+0x176 >> /usr/bootes/libssh2/libssh2-0.18/src/transport.c:326 >> libssh2_channel_read_ex(channel=0x114460,buflen=0x1000,stream_id=0x0,buf=0xdfffdee8)+0x2a7 >> >> /usr/bootes/libssh2/libssh2-0.18/src/channel.c:1442 >> fromnet(c=0x114460,s=0x1102f8)+0x2e >> /usr/bootes/libssh2/libssh2-0.18/clients/ssh2.c:75 >> main(argc=0x2,argv=0xdfffef94)+0x47c >> /usr/bootes/libssh2/libssh2-0.18/clients/ssh2.c:253 >> _main+0x31 /sys/src/libc/386/main9.s:16 -- cinap