Date: Tue, 19 Dec 2000 14:50:43 -0800 From: "Renaud Waldura" <renaud@waldura.com> To: <emulation@freebsd.org> Subject: Re: q3ded 1.17: linux_socketcall returns errno -11 Message-ID: <001f01c06a0e$1edf2200$0402010a@biohz.net> References: <01a901c067b1$8ced2d00$0402010a@biohz.net> <3A3C0199.8DED329B@cup.hp.com> <000901c067c8$d406a7e0$0402010a@biohz.net> <5l3dfmm44y.fsf@assaris.sics.se>
next in thread | previous in thread | raw e-mail | index | archive | help
Assar: thanks for the patch, it applied cleanly against 4.2-RELEASE. As for my problem, it isn't quite solved yet... I recompiled the linux module with DEBUG on, and here is what I get: 01 Linux-emul(90534): newselect(1, 0xbfbfb9f0, 0, 0, 0xbfbfb9e8) 02 Linux-emul(90534): incoming timeout (0/0) 03 Linux-emul(90534): real select returns 0 04 Linux-emul(90534): outgoing timeout (0/0) 05 Linux-emul(90534): newselect_out -> 0 06 Linux-emul(90534): linux_socketcall(what=12, args=0xbfbfba00) 07 Linux-emul(90534): linux_recvfrom(fd=4, buf=0x8220c40, len=16384, flags=0, from=0xbfbfba40, fromlen=0xbfbfba3c) 08 Linux-emul(90534): linux_recvfrom() returns 35 This is how I interpret the trace: 01: newselect(number of FDs == 1 FD set ready for reading == some address FD set ready for writing == NULL FD set ready for OOB == NULL timeout == some address ) Q3ded listens an an open socket, with a timeout. 02-05: the timeout is 0: it's a poll, and select() returns with no error. 06-08: calls linux_recvfrom(), which returns EAGAIN. Now, the funny thing is, the exact same thing happens on Linux. Here is the strace output: 01 gettimeofday({977090705, 46700}, {420, 0}) = 0 02 select(1, [0], NULL, NULL, {0, 0}) = 0 (Timeout) 03 recvfrom(4, 0x8220c40, 16384, 0, 0xbfffba10, 0xbfffba0c) = -1 EAGAIN (Resource temporarily unavailable) Pretty much equivalent to the FreeBSD trace... Unfortunately q3ded on Linux works like a charm, and it doesn't on FreeBSD. So, I'm still looking. Any ideas? --Renaud ----- Original Message ----- From: <assar@freebsd.org> To: "Renaud Waldura" <renaud@waldura.com>; <marcel@freebsd.org> Cc: <emulation@freebsd.org> Sent: Monday, December 18, 2000 2:10 AM Subject: Re: q3ded 1.17: linux_socketcall returns errno -11 > "Renaud Waldura" <renaud@waldura.com> writes: > > > 51543 q3ded CALL gettimeofday(0xbfbfba48,0xbfbfba50) > > 51543 q3ded RET gettimeofday 0 > > 51543 q3ded CALL linux_newselect(0x1,0xbfbfb9d8,0,0,0xbfbfb9d0) > > 51543 q3ded RET linux_newselect 0 > > 51543 q3ded CALL linux_socketcall(0xc,0xbfbfb9e8) > > 51543 q3ded RET linux_socketcall -1 errno 11 Resource deadlock avoided > > Note first that the translation of errno 11 is wrong, on Linux errno > 11 is EAGAIN. > > (marcel: should we add a table of Linux error codes to linux_kdump? ) > > So I assume that what's happening here is that select says that the fd > is ready to be read from but then recvmsg returns EWOULDBLOCK (aka > EAGAIN). > > The only way I can see that currently happening is if MSG_WAITALL for > some reason is set, now wait a moment, MSG_* do not have the same > values on Linux. > > Could you try the following patch and tell us how it goes? I'm afraid > it's against -current. If it doesn't apply with small amounts of > force to -stable, bug me and I can redo it. Marcel: does this look ok? > > /assar > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001f01c06a0e$1edf2200$0402010a>