Attila Lendvai | 1 Apr 13:30 2010
Picon

regression after 6d63d32fb7f400e93066cb37a139a43dae4721c1

hi!

seems like something was broken by one of the two patches that follow this one:
6d63d32fb7f400e93066cb37a139a43dae4721c1
"Remove useless check in MAYBE-REWIND-IOBUF."

i don't know which one, because the second newest patch doesn't work
on its own due to a not of type function error.

the symptom is that in some cases the ajax answers in our web server
doesn't arrive to the browser, the network stream seems to be closed.
i suspect some bug around flushing?

stuff mostly work, but there's a reproducible call site (so, it's not
a heisenbug) where the answer body is lost (the headers are properly
sent though). the body is written using write-sequence as a byte
array.

hth,

--

-- 
 attila

Stelian Ionescu | 2 Apr 02:07 2010

Re: regression after 6d63d32fb7f400e93066cb37a139a43dae4721c1

On Thu, 2010-04-01 at 13:30 +0200, Attila Lendvai wrote:
> hi!
> 
> seems like something was broken by one of the two patches that follow this one:
> 6d63d32fb7f400e93066cb37a139a43dae4721c1
> "Remove useless check in MAYBE-REWIND-IOBUF."
> 
> i don't know which one, because the second newest patch doesn't work
> on its own due to a not of type function error.
> 
> the symptom is that in some cases the ajax answers in our web server
> doesn't arrive to the browser, the network stream seems to be closed.
> i suspect some bug around flushing?
> 
> stuff mostly work, but there's a reproducible call site (so, it's not
> a heisenbug) where the answer body is lost (the headers are properly
> sent though). the body is written using write-sequence as a byte
> array.

Thanks for the notice, I'll fix this as soon as possible

--

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
On Thu, 2010-04-01 at 13:30 +0200, Attila Lendvai wrote:
> hi!
> 
(Continue reading)

Stelian Ionescu | 3 Apr 11:00 2010
Picon

New patches: 2-Apr-2010


commit f31fb2244f153f1e73739232cf31a6bb73307cfa
Author: Peter Keller <psilord <at> cs.wisc.edu>
Date:   Fri Apr 2 10:41:07 2010 -0500

    This is the initial revision of the tutorial and associated examples.
    The tutorial describes IPV4 TCP blocking and non-blocking I/O in addition
    to a couple of threaded examples. "tutorial.tmpl" is the source file used by
    "gen-tutorial" to create the atual "tutorial" file. Please see the README for
    more information.

    The autogenerated "tutorial" file is actually committed since it allows people
    who clone the repository to view the tutorial without having to know how to
    make it. This means if tutorial.tmpl or the examples are changed, the tutorial
    file should be regenerated and rechecked in.

    Signed-off-by: Stelian Ionescu <sionescu <at> cddr.org>

 examples/Makefile           |    7 +
 examples/README             |   23 +
 examples/ex1-client.lisp    |   52 +
 examples/ex1-server.lisp    |   84 ++
 examples/ex2-client.lisp    |   37 +
 examples/ex2-server.lisp    |   62 +
 examples/ex3-client.lisp    |   52 +
 examples/ex3-server.lisp    |   94 ++
 examples/ex4-client.lisp    |   71 +
 examples/ex4-server.lisp    |  139 ++
 examples/ex5-server.lisp    |  161 +++
 examples/ex5a-client.lisp   |  185 +++
(Continue reading)

Peter Keller | 4 Apr 02:50 2010
Picon

IOLib tutorial Version 0.0 Completed

Hello,

I've created an IOLib tutorial which describes how to write clients and
servers with IPV4 TCP using blocking I/O with the stream interface and
nonblocking I/O with the event multiplexer and send-to receive-from.

The tutorial and the source for which it is written is in the examples/
directory of the checked out IOLib source codes.  The tutorial and
source code in the official source release of IOLib will always be the
authoritative version. It is recommended one inspects and tries out the
example source code along with the tutorial.

I happen to have a link up to the tutorial here:
http://pages.cs.wisc.edu/~psilord/blog/data/iolib-tutorial/tutorial.html

Have a nice day.

-pete

Stelian Ionescu | 5 Apr 11:00 2010
Picon

New patches: 4-Apr-2010


commit e0edd275e866597ef4fc81ac3fb890f8837dbf02
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Mon Apr 5 02:20:48 2010 +0200

    Remove old NOTINLINE declamations.

 src/streams/gray/io-helpers.lisp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

commit aa4d4f491a7472781b2695eff056fc4d0681a244
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Mon Apr 5 02:20:10 2010 +0200

    Fix tests SIMPLE-UDP-CLIENT.[12]

 tests/sockets.lisp |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

commit 67d3bfd5eec87b753cf50c39a5f28270bedde659
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Sun Apr 4 22:37:21 2010 +0200

    Style change.

 src/multiplex/fd-wait.lisp |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

commit f8b796e161da7c7bdab5613318913eba9a938f5c
Author: Stelian Ionescu <sionescu <at> cddr.org>
(Continue reading)

Stelian Ionescu | 6 Apr 11:00 2010
Picon

New patches: 5-Apr-2010


commit d2788079b696d0206135839d114bfc1cd93d4b68
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Tue Apr 6 00:13:22 2010 +0200

    Don't define FDOPENDIR on BSD systems for the moment.

 src/syscalls/ffi-functions-unix.lisp |    2 +-
 src/syscalls/pkgdcl.lisp             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

commit 86cc0b2a2194a237118c2399c00628b06a082d2a
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Mon Apr 5 23:49:58 2010 +0200

    Use DEFWRAPPER for CMSG accessors.

 src/syscalls/ffi-wrappers-unix.lisp |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

commit 03d08294bf1d5714d0492ac7bb49e04f1a5aebcc
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Mon Apr 5 23:01:00 2010 +0200

    Make DIRFD a wrapper, export always.

 src/syscalls/ffi-functions-unix.lisp |    5 -----
 src/syscalls/ffi-wrappers-unix.lisp  |   11 +++++++++++
 src/syscalls/pkgdcl.lisp             |    2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)
(Continue reading)

Stelian Ionescu | 8 Apr 11:00 2010
Picon

New patches: 7-Apr-2010


commit be796baeed9afae13a7fdbc9b382b3f34f7a7f84
Author: Peter Keller <psilord <at> cs.wisc.edu>
Date:   Wed Apr 7 23:23:26 2010 +0200

    Explain that the client "quit" feature doesn't exist in ex7-server either.

 examples/tutorial      |   24 ++++++++++++------------
 examples/tutorial.tmpl |   24 ++++++++++++------------
 2 files changed, 24 insertions(+), 24 deletions(-)

An updated tarball of IOLib's source can be downloaded here:
http://common-lisp.net/project/iolib/files/snapshots/iolib-20100407.tar.gz

Gitweb URL:
http://repo.or.cz/w/iolib.git

Andrey Moskvitin | 8 Apr 18:03 2010
Picon

PATCH: with-accept-connection and shutdown

Hi,


I found that with-accept-connection is no call shutdown on the socket, 
but without this FIN will be sent to the client.

diff --git a/src/sockets/make-socket.lisp b/src/sockets/make-socket.lisp
index b87a214..e4e1d06 100644
--- a/src/sockets/make-socket.lisp
+++ b/src/sockets/make-socket.lisp
<at> <at> -274,7 +274,10 <at> <at> The socket is automatically closed upon exit."
 (defmacro with-accept-connection ((var passive-socket &rest args) &body body)
   "Bind VAR to a socket created by passing PASSIVE-SOCKET and ARGS to ACCEPT-CONNECTION and execute BODY as implicit PROGN.
 The socket is automatically closed upon exit."
-  `(with-open-stream (,var (accept-connection ,passive-socket , <at> args)) , <at> body))
+  `(with-open-stream (,var (accept-connection ,passive-socket , <at> args))
+     (unwind-protect
+          (progn , <at> body)
+       (shutdown ,var :write t :read t))))
 
 ;;; MAKE-SOCKET-FROM-FD
 

Andrey
<div>
<p>Hi,</p>
<div><br></div>
<div>I found that with-accept-connection is no call shutdown on the socket,&nbsp;</div>
<div>but without this FIN will be sent to the client.</div>
<div><br></div>
<div>
<div>diff --git a/src/sockets/make-socket.lisp b/src/sockets/make-socket.lisp</div>
<div>index b87a214..e4e1d06 100644</div>
<div>--- a/src/sockets/make-socket.lisp</div>
<div>+++ b/src/sockets/make-socket.lisp</div>
<div> <at>  <at>  -274,7 +274,10  <at>  <at>  The socket is automatically closed upon exit."</div>
<div>&nbsp;(defmacro with-accept-connection ((var passive-socket &amp;rest args) &amp;body body)</div>
<div>&nbsp;&nbsp; "Bind VAR to a socket created by passing PASSIVE-SOCKET and ARGS to ACCEPT-CONNECTION and execute BODY as implicit PROGN.</div>
<div>&nbsp;The socket is automatically closed upon exit."</div>
<div>- &nbsp;`(with-open-stream (,var (accept-connection ,passive-socket , <at> args)) , <at> body))</div>
<div>+ &nbsp;`(with-open-stream (,var (accept-connection ,passive-socket , <at> args))</div>
<div>+ &nbsp; &nbsp; (unwind-protect</div>
<div>+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(progn , <at> body)</div>
<div>+ &nbsp; &nbsp; &nbsp; (shutdown ,var :write t :read t))))</div>
<div>&nbsp;</div>
<div>
&nbsp;;;; MAKE-SOCKET-FROM-FD</div>
<div>&nbsp;</div>
<div><br></div>
</div>
<div>Andrey</div>
</div>
Stelian Ionescu | 10 Apr 11:00 2010
Picon

New patches: 9-Apr-2010


commit a7674ea8a491cb4b3fd636e5952c3141611176da
Author: Stelian Ionescu <sionescu <at> cddr.org>
Date:   Fri Apr 9 16:28:26 2010 +0200

    Fix macro FLAGS-CASE

 src/base/matching.lisp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

An updated tarball of IOLib's source can be downloaded here:
http://common-lisp.net/project/iolib/files/snapshots/iolib-20100409.tar.gz

Gitweb URL:
http://repo.or.cz/w/iolib.git

Peter Keller | 10 Apr 21:07 2010
Picon

Compile failure

Hello,

I updated my clbuild copy of iolib with the last set of patches as current on
Sat Apr 10 14:05:19 CDT 2010 and got this build failure.

It looks like SHA a7674ea8a491cb4b3fd636e5952c3141611176da caused the error.

Thank you.

-pete

; /home/psilord/clbuild/source/iolib/src/multiplex/event-loop.fasl written
; compilation finished in 0:00:01.252
; compiling file "/home/psilord/clbuild/source/iolib/src/multiplex/fd-wait.lisp" (written 04 APR
2010 09:08:36 PM):
; compiling (IN-PACKAGE :IOLIB.MULTIPLEX)
; compiling (DEFINE-CONDITION POLL-ERROR ...)
; compiling (DEFINE-CONDITION POLL-TIMEOUT ...)
; compiling (DEFUN COMPUTE-POLL-FLAGS ...)
; compiling (DEFUN PROCESS-POLL-REVENTS ...)
; file: /home/psilord/clbuild/source/iolib/src/multiplex/fd-wait.lisp
; in: DEFUN PROCESS-POLL-REVENTS
;     (IOLIB.BASE:FLAGS-CASE IOLIB.MULTIPLEX::REVENTS
;       ((IOLIB.SYSCALLS:POLLIN IOLIB.SYSCALLS:POLLRDHUP IOLIB.SYSCALLS:POLLPRI)
;        (SETF IOLIB.MULTIPLEX::READP T))
;       ((IOLIB.SYSCALLS:POLLOUT IOLIB.SYSCALLS:POLLHUP)
;        (SETF IOLIB.MULTIPLEX::WRITEP T))
;       ((IOLIB.SYSCALLS:POLLERR)
;        (ERROR 'IOLIB.MULTIPLEX:POLL-ERROR :FD IOLIB.MULTIPLEX::FD))
;       ((IOLIB.SYSCALLS:POLLNVAL)
;        (ERROR 'IOLIB.MULTIPLEX:POLL-ERROR :FD IOLIB.MULTIPLEX::FD :IDENTIFIER
;               "Invalid file descriptor")))
; --> LET PROGN WHEN IF PROGN 
; ==>
;   ((SETF IOLIB.MULTIPLEX::READP T))
; 
; caught ERROR:
;   illegal function call

; ==>
;   ((SETF IOLIB.MULTIPLEX::WRITEP T))
; 
; caught ERROR:
;   illegal function call

; ==>
;   ((ERROR 'IOLIB.MULTIPLEX:POLL-ERROR :FD IOLIB.MULTIPLEX::FD))
; 
; caught ERROR:
;   illegal function call

; ==>
;   ((ERROR 'IOLIB.MULTIPLEX:POLL-ERROR :FD IOLIB.MULTIPLEX::FD :IDENTIFIER
;           "Invalid file descriptor"))
; 
; caught ERROR:
;   illegal function call


Gmane