9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@cse.psu.edu
Subject: Re: [9fans] bug in ape?
Date: Wed, 19 Dec 2007 22:23:47 +0100	[thread overview]
Message-ID: <448ba62499b12b914d3c049236e05694@gmx.de> (raw)
In-Reply-To: <13426df10712182036u75556ebei34744ac7fab4099c@mail.gmail.com>

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


      reply	other threads:[~2007-12-19 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18 20:22 ron minnich
2007-12-19  2:51 ` sqweek
2007-12-19  4:36   ` ron minnich
2007-12-19 21:23     ` cinap_lenrek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=448ba62499b12b914d3c049236e05694@gmx.de \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).