commit b8a3c1a535009ba60a3f9156c9e01386efd7e7ba Author: Stelian Ionescu sionescu@cddr.org Date: Sat Dec 26 22:36:11 2009 +0100
Fix a couple of bugs in echo-server.lisp
Thanks to Peter Keller.
examples/echo-server.lisp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
An updated tarball of IOLib's source can be downloaded here: http://common-lisp.net/project/iolib/files/snapshots/iolib-20091226.tar.gz
Gitweb URL: http://repo.or.cz/w/iolib.git
On Sun, Dec 27, 2009 at 05:00:11AM -0500, Stelian Ionescu wrote:
commit b8a3c1a535009ba60a3f9156c9e01386efd7e7ba Author: Stelian Ionescu sionescu@cddr.org Date: Sat Dec 26 22:36:11 2009 +0100
Fix a couple of bugs in echo-server.lisp Thanks to Peter Keller.
examples/echo-server.lisp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
It turns out I found another unrelated bug. :)
To reproduce unreliably:
; run the server like this: * (run-server :port 10000 :new-process nil :timeout 60)
In another xterm:
telnet localhost 10000
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. hello 1: hello how 1: how
1: are 1: are you telnet> close Connection closed.
Then:
telnet localhost 10000
Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. <hangs>
Transcript of what SBCL 1.0.33.30 does:
* (run-server :port 10000 :new-process nil :timeout 60) Accepted client 1 1: hello 1: how 1: 1: are Accepted client 2 1: you 1: closing
debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING {AA09C79}>: The value NIL is not of type IOLIB.MULTIPLEX::FD-HANDLER.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level.
(IOLIB.MULTIPLEX::%DISPATCH-EVENT #S(IOLIB.MULTIPLEX::FD-ENTRY :FD 8 :READ-HANDLER NIL :WRITE-HANDLER NIL :ERROR-CALLBACK NIL) :WRITE :ERROR 1478256.382031317d0) 0] *
Trouble is, it doesn't happen all the time, so maybe a thread race condition? It only happened once for me so far in my testing. Had I known it wasn't easily reproducable, I would have gotten a full backtrace.
Thank you.
-pete
On Mon, Dec 28, 2009 at 02:32:14AM -0600, Peter Keller wrote:
It only happened once for me so far in my testing. Had I known it wasn't easily reproducable, I would have gotten a full backtrace.
It figures I'd get the failure 5 seconds after sending the emai:
0] backtrace
0: (IOLIB.MULTIPLEX::%DISPATCH-EVENT #S(IOLIB.MULTIPLEX::FD-ENTRY :FD 8 :READ-HANDLER NIL :WRITE-HANDLER NIL :ERROR-CALLBACK NIL) :WRITE :ERROR 1478938.390490213d0) 1: (IOLIB.MULTIPLEX::%HANDLE-ONE-FD #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B2080C1}> (8 (:ERROR :READ :WRITE)) 1478938.390490213d0 #<unavailable argument>) 2: (IOLIB.MULTIPLEX::DISPATCH-FD-EVENTS-ONCE #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B2080C1}> 7.825390378013253d0 1478938.390490213d0) 3: ((SB-PCL::FAST-METHOD IOLIB.MULTIPLEX:EVENT-DISPATCH (IOLIB.MULTIPLEX:EVENT-BASE)) #<unavailable argument> #<unavailable argument> #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B2080C1}>)[:EXTERNAL] 4: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) #<unused argument> #<unused argument> #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B2080C1}> -303312229 2) 5: ((FLET %RUN-SERVER)) 6: (RUN-SERVER :HOST #/ip/0.0.0.0 :PORT 10000 :NEW-PROCESS NIL :TIMEOUT 3600) 7: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RUN-SERVER :PORT 10000 :NEW-PROCESS NIL :TIMEOUT 3600) #<NULL-LEXENV>) 8: (SB-EXT:INTERACTIVE-EVAL (RUN-SERVER :PORT 10000 :NEW-PROCESS NIL :TIMEOUT 3600))[:EXTERNAL] 9: (SB-IMPL::REPL-FUN NIL) 10: ((LAMBDA ())) 11: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {AD29EAD}>) 12: (SB-IMPL::TOPLEVEL-REPL NIL) 13: (SB-IMPL::TOPLEVEL-INIT) 14: ((LABELS SB-IMPL::RESTART-LISP))
-pete
On Mon, 2009-12-28 at 02:37 -0600, Peter Keller wrote:
On Mon, Dec 28, 2009 at 02:32:14AM -0600, Peter Keller wrote:
It only happened once for me so far in my testing. Had I known it wasn't easily reproducable, I would have gotten a full backtrace.
It figures I'd get the failure 5 seconds after sending the emai:
0] backtrace
0: (IOLIB.MULTIPLEX::%DISPATCH-EVENT #S(IOLIB.MULTIPLEX::FD-ENTRY :FD 8 :READ-HANDLER NIL :WRITE-HANDLER NIL :ERROR-CALLBACK NIL) :WRITE :ERROR 1478938.390490213d0) 1: (IOLIB.MULTIPLEX::%HANDLE-ONE-FD #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B2080C1}> (8 (:ERROR :READ :WRITE)) 1478938.390490213d0 #<unavailable argument>)
I think that one of the patches by David Lichteblau that I've just committed fixes this. Please try again :)
On Mon, Dec 28, 2009 at 04:39:19PM +0100, Stelian Ionescu wrote:
I think that one of the patches by David Lichteblau that I've just committed fixes this. Please try again :)
Ok, I've: ./clbuild update iolib ./clbuild recompile iolib
I stopped my running sbcl, started a new one, loaded my code, and hit the same error. However, it is completely reproducable now, which means it is probably in my code somewhere so I'll have to debug it a while.
I've included the stack trace, just in case it is in your library and you happen to see it.
Thank you.
-pete
The value NIL is not of type IOLIB.MULTIPLEX::FD-HANDLER.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level.
(IOLIB.MULTIPLEX::%DISPATCH-EVENT #S(IOLIB.MULTIPLEX::FD-ENTRY :FD 8 :READ-HANDLER NIL :WRITE-HANDLER NIL :ERROR-CALLBACK NIL) :WRITE :ERROR 1515890.136375863d0) 0] backtrace
0: (IOLIB.MULTIPLEX::%DISPATCH-EVENT #S(IOLIB.MULTIPLEX::FD-ENTRY :FD 8 :READ-HANDLER NIL :WRITE-HANDLER NIL :ERROR-CALLBACK NIL) :WRITE :ERROR 1515890.136375863d0) 1: (IOLIB.MULTIPLEX::%HANDLE-ONE-FD #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B8DCB29}> (8 (:ERROR :READ :WRITE)) 1515890.136375863d0 #<unavailable argument>) 2: (IOLIB.MULTIPLEX::DISPATCH-FD-EVENTS-ONCE #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B8DCB29}> 0.05363454087637365d0 1515890.136375863d0) 3: ((SB-PCL::FAST-METHOD IOLIB.MULTIPLEX:EVENT-DISPATCH (IOLIB.MULTIPLEX:EVENT-BASE)) #<unavailable argument> #<unavailable argument> #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B8DCB29}>)[:EXTERNAL] 4: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) #<unused argument> #<unused argument> #<event base, 2 FDs monitored, using: #<epoll(4) multiplexer> {B8DCB29}> -303338815 4) 5: (START-SERVER :HOST #/ip/0.0.0.0 :PORT NIL :TIMEOUT 86400) 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (START-SERVER) #<NULL-LEXENV>) 7: (INTERACTIVE-EVAL (START-SERVER))[:EXTERNAL] 8: (SB-IMPL::REPL-FUN NIL) 9: ((LAMBDA ())) 10: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {AD29EAD}>) 11: (SB-IMPL::TOPLEVEL-REPL NIL) 12: (SB-IMPL::TOPLEVEL-INIT) 13: ((LABELS SB-IMPL::RESTART-LISP))