Juggle Home - Bits'n'Pieces - Feature Hitlist - Problem Reports - Mailing lists - The J Repository - References +-------------------+ | 9!:12'' | |5 | +-------------------+

From neitzel@spog.gaertner.de Tue Mar 14 01:45:32 2000 Received: (from neitzel@localhost) by spog.gaertner.de (8.8.8/8.8.8/Nase) id BAA20688; Tue, 14 Mar 2000 01:45:32 +0100 Message-Id: <200003140045.BAA20688@spog.gaertner.de> Date: Tue, 14 Mar 2000 01:45:32 +0100 From: Dan King <danking@sympatico.ca> Reply-To: danking@sympatico.ca To: bugs@spog.gaertner.de Cc: tbenda@wronski.math.uwaterloo.ca Subject: sdselect socket problem in BSD/Linux X-Send-Pr-Version: 3.104 >Number: 35 >Category: j-engine >Synopsis: sdselect misreports the states of the sockets >Confidential: no >Severity: serious >Priority: high >Responsible: neitzel >State: closed >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Mar 14 01:52:01 MET 2000 >Last-Modified: Fri May 30 19:17:06 MET DST 2003 >Originator: Dan King >Organization: >Release: J 4.02b and anything earlier >Environment: Any Unix with fdset longer than a single word. >Description: We believe that this is a new problem associated with regular blocking sockets. We believe it is not in the current problem list report. We have found this problem under the Unix and Linux distributions of J. The problem concerns the sdselect (16!:10) command. We ran a test under two versions of Linux and FreeBSD Unix and all reported the same problem. Basically, the problem is that sdselect misreports the states of the sockets by reporting wrong socket numbers as well as wrong states for those sockets (for example, all sockets are marked for reading, writing, and error all at the same time). This is for basic blocking sockets and has nothing to do with asynchronous sockets (I realize that UNIX does not support async sockets). Can you please look into this problem or at comment on the current state of sockets in Linux J (ie. on whether Linux J sockets are fully supported or tested). An example session log for the problem is shown below. >How-To-Repeat: load 'socket' echo s =: sdcheck sdsocket '' 3 echo sdcheck sdconnect s;2;'216.209.77.36';2000 echo sdselect '' +-+----+----+----+ |0|1031|2055|3079| NB. <- should be 0;'';3;'' +-+----+----+----+ echo 'hello' sdsend s,0 0 5 echo sdselect '' +-+----+----+----+ |0|1031|2055|3079| +-+----+----+----+ >Fix: >Audit-Trail: From: Martin Neitzel <neitzel@gaertner.de> To: danking@sympatico.ca Cc: bugs@gaertner.de Subject: Re: j-engine/35: sdselect socket problem in BSD/Linux Date: Tue, 14 Mar 2000 02:32:19 +0100 (MET) Thanks for your bug report, Dan. The state of sockets (16!:) on Unix is "fully supported" and if sdselect does not work then that's a bug which needs fixing. I checked your example on two Linux systems where runs just fine and a third one where I could repeat your sequence. I'll check out a FreeBSD system later. In the meantime, please send me your exact specs on J built used for which Unix/Linux system exactly. I need the distribution name incl. version ("Redhat 6.0") and the "uname -a" output and the J 9!:14'' info. [Please keep the Cc: to bugs@gaertner.de, the Subject: line, and and do not quote this mail.] From: Martin Neitzel <neitzel@gaertner.de> To: danking@sympatico.ca, tbenda@wronski.math.uwaterloo.ca Cc: bugs@gaertner.de, daveb@samurai.com, diamonddirect@hotmail.com, mniemiec@interserv.com, pagun@eagle.ca, thomas@titan.chem.utoronto.ca Subject: Re: j-engine/35: sdselect socket problem in BSD/Linux Date: Wed, 15 Mar 2000 02:48:16 +0100 (MET) > uname -a > FreeBSD bsd 3.4-RELEASE FreeBSD 3.4-RELEASE #0: Tue Dec 28 22:18:05 GMT > 1999 jkh@highwing.cdrom.com:/usr/src/sys/compile/GENERIC i386 > > 9!:14 ]'' > 4.02/1998-12-15/02:26 OK, that's an a.out J 4.02a binary (compiled on my FreeBSD-2.2.5 box) on a FreeBSD 3.4 box which is ELF. You must be running the 2.x-compat libs, right? Well, let's try to reproduce that... Well, J-402a-FreeBSD sdselect works fine on my FreeBSD 3.1 box (ELF, too). You are not by any chance running a J-402a-*Linux* binary on the FreeBSD-3.4 box? Because that reproduces the bug here, too. (Hint: Telling me so right at the start would would have saved me two hours past midnight.) > Linux Debian (dunno version) Sorry, but it *is* important to me. I have roughly 4 or 5 different Debian systems alone at hand here. Please find that CDROM or just do a cat /etc/debian_version ;-) > uname -a > Linux ldj 2.0.36 #2 Sun Mar 5 10:53:18 EST 2000 i686 unknown Hmm. Could be a tad newer than Debian 2.0 which has a 2.0.34 kernel. > 9!:14 ]'' > 4.02/Mar 20 1999/05:42:16 This is clearly the J-402b-Linux binary. (Built on a Debian 2.0 system with the 2.0.7 glibc.) Please report the following info to me: Your C standard libraries on your system, i.e. do a ls -l /lib/libc* . The output of ldd /usr/local/bin/jint-402b (or whatever the proper path is). [And folks, once again: *please* don't drop bugs@gaertner.de from the Cc:, keep the quoted material to a minimum and don't touch the subject. Because, otherwise, there goes another hour for fixing up the PR manually.] State-Changed-From-To: open-analyzed State-Changed-By: neitzel State-Changed-When: Wed Mar 15 04:29:26 MET 2000 State-Changed-Why: I found the bug. It might take a week to create the new binary. Unfortunately, there is no work-around you could use until then. From: Tomas Benda <tbenda@undergrad.math.uwaterloo.ca> To: Martin Neitzel <neitzel@gaertner.de> Cc: Danish Ahmed <diamonddirect@hotmail.com>, thomas@titan.chem.utoronto.ca, "Mark D. Niemiec" <mniemiec@interserv.com>, Dave Berman <daveb@samurai.com>, gunnar helgason <pagun@eagle.ca> Subject: Re: j-engine/35: sdselect socket problem in BSD/Linux Date: Tue, 28 Mar 2000 13:46:37 -0500 (EST) We are running FreeBSD 3.4 with J402a for UNIX. Here's the readme file which came with the download: [...] This is J Release 4.02a for Unix. Copyright (c) 1998, Iverson Software Inc. All rights reserved. Operating system: FreeBSD Processor: i386 (and its family) [...] The following information identifies this package uniquely: Thu Dec 17 00:48:17 CET 1998 FreeBSD miles.is.gaertner.de 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #1: Sun Mar 29 03:32:19 CEST 1998 root@miles.gaertner.de:/usr/src/sys/compile/MILES i386 State-Changed-From-To: analyzed-feedback State-Changed-By: neitzel State-Changed-When: Sat Apr 1 23:45:21 MET DST 2000 State-Changed-Why: I have fixed the bug responsible for the numbers in the thousands range. I made a new patch level release incorporating the fix. Please get ftp://juggle.gaertner.de/pub/j/j402c-Linux.tgz and give me feedback if you are happy with it. I will make patch releases for all platforms then. (I am actually not sure whether the "exceptional events" return value is correct. I would open this as a separate PR, though.) State-Changed-From-To: feedback-closed State-Changed-By: neitzel State-Changed-When: Fri May 30 19:15:20 MET DST 2003 State-Changed-Why: no feedback after 2 years, assume the problem is truly fixed. . >Unformatted:

+-------------------+ | 9!:12'' | |5 | +-------------------+ Juggle Home - Bits'n'Pieces - Feature Hitlist - Problem Reports - Mailing lists - The J Repository - References