From attila.lendvai at gmail.com Fri Dec 5 09:26:57 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 5 Dec 2008 10:26:57 +0100 Subject: [iolib-devel] error from close Message-ID: Stelian, please take a look at the backtrace below... does it ring any bells? it probably happens when a connection times out, or in some unusual situation. please not the "unconnected" part in the socket's print-object output... ("nafi" "http worker 5 / LEVEL-1-ERROR-HANDLER" 2008-12-05T00:34:27.217601+01:00 HU.DWIM.WUI::WUI +ERROR+ " *** At: 2008-12-05T00:34:27.203581+01:00 *** In thread: http worker 5 / LEVEL-1-ERROR-HANDLER *** Error: Unhandled memory fault at #x0. *** Backtrace is: 000: ((LAMBDA (ERROR)) #) [:EXTERNAL] 001: ((LABELS HU.DWIM.WUI::LEVEL-1-ERROR-HANDLER) #) 002: (SIGNAL #) [:EXTERNAL] 003: (ERROR SB-SYS:MEMORY-FAULT-ERROR) [:EXTERNAL] 004: (SB-SYS:MEMORY-FAULT-ERROR) 005: (SB-SYS:MEMORY-FAULT-ERROR) [:EXTERNAL] 006: (\"foreign function: #x41E9B2\") 007: (\"foreign function: #x41EA70\") 008: ((CLOSE :AROUND (IO.STREAMS:DUAL-CHANNEL-GRAY-STREAM)) #) [:EXTERNAL] 009: ((CLOSE :AROUND (IO.STREAMS:DUAL-CHANNEL-SINGLE-FD-MIXIN)) #) [:EXTERNAL] 010: ((CLOSE :AROUND (NET.SOCKETS:SOCKET)) #) [:EXTERNAL] 011: (HU.DWIM.WUI::CALL-WITH-SERVER-ERROR-HANDLER # # #) 012: ((FLET #:CLEANUP-FUN-[WORKER-LOOP/SERVE-ONE-REQUEST]634)) [:CLEANUP] -- attila -------------- next part -------------- An HTML attachment was scrubbed... URL: From attila.lendvai at gmail.com Fri Dec 5 09:34:41 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 5 Dec 2008 10:34:41 +0100 Subject: [iolib-devel] error from close In-Reply-To: References: Message-ID: > Stelian, please take a look at the backtrace below... does it ring any bells? > > it probably happens when a connection times out, or in some unusual situation. please not the "unconnected" part in the socket's print-object output... some more info: after this, or something that causes this, or... slime-connect hangs while half-way connected. -- attila From attila.lendvai at gmail.com Fri Dec 5 13:56:30 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 5 Dec 2008 14:56:30 +0100 Subject: [iolib-devel] error from close In-Reply-To: References: Message-ID: another backtrace, now with a little more detail. seems like the remote side times out, or some firewall gets bored due to a slow traffic and closes the connection. the problem only comes after the print-object method of the socket starts saying "unconnected" and we try to call close on the socket then. then the attached backtrace comes and the lisp vm is dead after that. it's also strange that write-sequence happily returns with success to the unconnected socket. hth, -- attila -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: close-backtrace.txt URL: From attila.lendvai at gmail.com Fri Dec 5 20:21:50 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 5 Dec 2008 21:21:50 +0100 Subject: [iolib-devel] error from close In-Reply-To: References: Message-ID: The assertion (NOT (IO.STREAMS::IOBUF-FULL-P IO.STREAMS::IOBUF)) failed. 003: (IO.STREAMS::IOBUF-PUSH-OCTET #S(IO.STREAMS::IOBUF :DATA #.(SB-SYS:INT-SAP #X00648A70) :SIZE 4096 :START 2432 :END 4096) 32) 004: (WRITE-BYTE 32 #) 005: (HU.DWIM.WUI::SEND-HTTP-HEADERS #) [:EXTERNAL] 006: ((HU.DWIM.WUI:HANDLE-TOPLEVEL-CONDITION (T SERIOUS-CONDITION)) # #) 007: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 008: ((HU.DWIM.WUI:HANDLE-TOPLEVEL-CONDITION :AROUND (T T)) # #) 009: ((FLET HU.DWIM.WUI::HANDLE-REQUEST-ERROR) #) 010: ((LABELS HU.DWIM.WUI::LEVEL-1-ERROR-HANDLER) #) 011: (SIGNAL #) [:EXTERNAL] 012: (ERROR NET.SOCKETS:SOCKET-CONNECTION-RESET-ERROR) [:EXTERNAL] 013: (NET.SOCKETS::%SOCKET-ERROR :ECONNRESET 104 6) 014: (NET.SOCKETS::SIGNAL-SOCKET-ERROR # 6) 015: (NET.SOCKETS::SIGNAL-SOCKET-ERROR # 6) [:EXTERNAL] 016: (IO.STREAMS::%FLUSH-OBUF NET.SOCKETS::SOCKET-WRITE-FN 6 #S(IO.STREAMS::IOBUF :DATA #.(SB-SYS:INT-SAP #X00648A70) :SIZE 4096 :START 2432 :END 4096) NIL) 017: (IO.STREAMS::%FLUSH-OBUF-IF-NEEDED #) 018: ((SB-GRAY:STREAM-WRITE-BYTE (IO.STREAMS:DUAL-CHANNEL-GRAY-STREAM T)) # #) 019: (IO.STREAMS::%WRITE-VECTOR # #(47 42 10 9 67 111 112 121 114 105 103 104 ...) 0 8192) 020: (WRITE-SEQUENCE #(47 42 10 9 67 111 112 121 114 105 103 104 ...) #) [:EXTERNAL] 021: (HU.DWIM.WUI::SERVE-STREAM #) [:EXTERNAL] 022: (HU.DWIM.WUI::SERVE-FILE #P\"/opt/ebr42-nafi/workspace/wui/wwwroot/dojo/dojo/dojo.js\") [:EXTERNAL] 023: ((HU.DWIM.WUI::SEND-RESPONSE :AROUND (HU.DWIM.WUI:RESPONSE)) #) -- attila -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at chaitanyagupta.com Thu Dec 18 21:34:47 2008 From: mail at chaitanyagupta.com (Chaitanya Gupta) Date: Fri, 19 Dec 2008 03:04:47 +0530 Subject: [iolib-devel] Documentation? Message-ID: <494AC1F7.1030800@chaitanyagupta.com> Hi, I can't seem to find the IOLib documentation -- there's no link to it on the project page at common-lisp.net. I want to try out the I/O multiplexer but I am clueless on how to go about working with it. Any help on this (or pointer to the doc location) would be great. Cheers, Chaitanya From larsnostdal at gmail.com Wed Dec 24 06:33:59 2008 From: larsnostdal at gmail.com (Lars Rune =?ISO-8859-1?Q?N=F8stdal?=) Date: Wed, 24 Dec 2008 07:33:59 +0100 Subject: [iolib-devel] Documentation? In-Reply-To: <494AC1F7.1030800@chaitanyagupta.com> References: <494AC1F7.1030800@chaitanyagupta.com> Message-ID: <1230100439.4113.22.camel@blackbox.nostdal.org> On Fri, 2008-12-19 at 03:04 +0530, Chaitanya Gupta wrote: > Hi, > > I can't seem to find the IOLib documentation -- there's no link to it on > the project page at common-lisp.net. > > I want to try out the I/O multiplexer but I am clueless on how to go > about working with it. Any help on this (or pointer to the doc location) > would be great. > > Cheers, > Chaitanya > > Hi, I've written a simple HTTP server that uses IOLib. Maybe it can help one figure out how IOLib works or can be used: http://common-lisp.net/~lnostdal/programming/lisp/sw-http/ Basically start by creating a server socket (server.lisp): * make-socket (iolib) * ..and make it non-blocking * set-io-handler (iolib) * set-error-handler (iolib) set-io-handler (iolib) dispatches to the handle-socket-event (sw-http, server.lisp) callback which calls connection-start-reading (sw-http, connection.lisp). connection-start-reading sets up a new callback, connection-handle (sw-http, connection.lisp) by calling set-io-handler (iolib) on the client socket. It also makes sure the client socket is made non-blocking. connection-handle has a (case event ..) form which leads to request-handle (sw-http, request-incoming.lisp) for :read events. Ok, that's basically it with regards to the multiplexing stuff really. This should be familiar stuff quite similar to what's going on in C on a "concept" level. You keep reading until reading would block then make a note of where you are now then return to the event loop (the blocking event-dispatch call/loop in server.lisp) so the next waiting event in line can be served. From mail at chaitanyagupta.com Wed Dec 24 09:05:47 2008 From: mail at chaitanyagupta.com (Chaitanya Gupta) Date: Wed, 24 Dec 2008 14:35:47 +0530 Subject: [iolib-devel] Documentation? In-Reply-To: <1230100439.4113.22.camel@blackbox.nostdal.org> References: <494AC1F7.1030800@chaitanyagupta.com> <1230100439.4113.22.camel@blackbox.nostdal.org> Message-ID: <4951FB6B.5070007@chaitanyagupta.com> An HTML attachment was scrubbed... URL: From sionescu at common-lisp.net Mon Dec 29 05:00:05 2008 From: sionescu at common-lisp.net (Stelian Ionescu) Date: Mon, 29 Dec 2008 05:00:05 +0000 Subject: [iolib-devel] New patches: 28-Dec-2008 Message-ID: An updated tarball of IOLib's source can be downloaded here: http://common-lisp.net/project/iolib/files/snapshots/iolib-20081228.tar.gz Gitweb URL: http://repo.or.cz/w/iolib.git