Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection. #43

Closed
KeanuLe opened this issue May 14, 2012 · 6 comments

Comments

@KeanuLe
Copy link

KeanuLe commented May 14, 2012

ab -n 10000 -c 1000 http://127.0.0.1:8080/ <=== _OK_ (localhost)

ab -n 10000 -c 1000 http://192.168.2.3:8080/ <=== _EXCEPTION!!!_

_Nginx reverse proxy:
ab -n 10000 -c 1000 http://192.168.2.3/ <=== _EXCEPTION!!!

ab -n 10000 -c 1000 http://127.0.0.1/ <=== _EXCEPTION!!!_

No problem with node.js, tornado or g-wan.

root@ubuntu:/home/ubuntu12/vibe.d/bin# ./run_example.sh simplehttp
[B71F3F80:00000000 WRN] Failed to parse config file /etc/vibe/vibe.conf: /etc/vibe/vibe.conf: No such file or directory
[B71F3F80:00000000 INF] Listening on 0.0.0.0 port 8080 succeeded
[B71F3F80:00000000 ERR] Error binding listening socket
[B71F3F80:00000000 INF] Listening on :: port 8080 failed
[B71F3F80:00000000 INF] Running event loop...
[B71F3F80:00000000 trc] accept
[B71F3F80:00000000 trc] accepted 10
[B71F3F80:00000000 dbg] Creating new fiber...
[B71F3F80:00000000 dbg] initial task call
[B71F3F80:B71F8C80 trc] entering task.
[B71F3F80:B71F8C80 dbg] start task (fd 10).
[B71F3F80:B71F8C80 trc] reading request..
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 dbg] run task out
[B71F3F80:00000000 trc] accept
[B71F3F80:00000000 trc] accepted -1
[B71F3F80:00000000 trc] handled incoming connections...
[B71F3F80:00000000 trc] socket 10 write event (false)!
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 trc] socket 10 read event!
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (14)
[B71F3F80:B71F8C80 trc] req: GET / HTTP/1.1
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (24)
[B71F3F80:B71F8C80 trc] hdr: Host: 192.168.1.3:8080
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (22)
[B71F3F80:B71F8C80 trc] hdr: Connection: keep-alive
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (114)
[B71F3F80:B71F8C80 trc] hdr: User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (71)
[B71F3F80:B71F8C80 trc] hdr: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (34)
[B71F3F80:B71F8C80 trc] hdr: Accept-Encoding: gzip,deflate,sdch
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (31)
[B71F3F80:B71F8C80 trc] hdr: Accept-Language: en-US,en;q=0.8
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (46)
[B71F3F80:B71F8C80 trc] hdr: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (0)
[B71F3F80:B71F8C80 trc] Got request header.
[B71F3F80:B71F8C80 trc] handle request (body 0)
[B71F3F80:B71F8C80 trc] evbuffer_add (fd 10): 140 B
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] evbuffer_add (fd 10): 13 B
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] reading request..
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 trc] socket 10 write event (false)!
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 dbg] Socket event on fd 10: 65
[B71F3F80:00000000 dbg] Remote host on fd 10 timed out.
[B71F3F80:00000000 trc] resuming corresponding task...
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 dbg] Exception while parsing request: object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(ubyte[] vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.readLine(uint, immutable(char)[])+0xaf) [0x80fa4e3]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(ubyte[] vibe.stream.stream.LimitedInputStream.readLine(uint, immutable(char)[])+0x69) [0x80e13a5]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(vibe.http.server.HttpServerRequest vibe.http.server.parseRequest(vibe.core.driver.TcpConnection)+0x5a) [0x80feb2a]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0x2a8) [0x80fdd08]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b39]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ad9]
[(nil)]
[B71F3F80:B71F8C80 WRN] Handling of connection failed: Operating on closed TCPConnection.
[B71F3F80:B71F8C80 dbg] object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.write(const(ubyte[]), bool)+0x43) [0x80fa71f]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.stream.stream.OutputStream.write(const(char[]), bool)+0x3f) [0x80e0ebf]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeHeader()+0x128) [0x80fd7b0]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(@property vibe.stream.stream.OutputStream vibe.http.server.HttpServerResponse.bodyWriter()+0x1d3) [0x80fd0e3]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener).void errorOut(int, immutable(char)[], immutable(char)[])+0x148) [0x80fea68]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0xddc) [0x80fe83c]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b39]
/tmp/.rdmd-0/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ad9]
[(nil)]
[B71F3F80:B71F8C80 dbg] task finished.
[B71F3F80:B71F8C80 trc] exiting task.
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 trc] accept
[B71F3F80:00000000 trc] accepted 10
[B71F3F80:00000000 dbg] initial task call
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] entering task.
[B71F3F80:B71F8C80 dbg] start task (fd 10).
[B71F3F80:B71F8C80 trc] reading request..
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 dbg] run task out
[B71F3F80:00000000 trc] accept
[B71F3F80:00000000 trc] accepted -1
[B71F3F80:00000000 trc] handled incoming connections...
[B71F3F80:00000000 trc] socket 10 read event!
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (25)
[B71F3F80:B71F8C80 trc] req: GET /favicon.ico HTTP/1.1
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (24)
[B71F3F80:B71F8C80 trc] hdr: Host: 192.168.1.3:8080
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (22)
[B71F3F80:B71F8C80 trc] hdr: Connection: keep-alive
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (11)
[B71F3F80:B71F8C80 trc] hdr: Accept: */*
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (114)
[B71F3F80:B71F8C80 trc] hdr: User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (34)
[B71F3F80:B71F8C80 trc] hdr: Accept-Encoding: gzip,deflate,sdch
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (31)
[B71F3F80:B71F8C80 trc] hdr: Accept-Language: en-US,en;q=0.8
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (46)
[B71F3F80:B71F8C80 trc] hdr: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] TCPConnection.readline return data (0)
[B71F3F80:B71F8C80 trc] Got request header.
[B71F3F80:B71F8C80 trc] handle request (body 0)
[B71F3F80:B71F8C80 trc] evbuffer_add (fd 10): 140 B
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] evbuffer_add (fd 10): 13 B
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] bufferevent_flush
[B71F3F80:B71F8C80 trc] reading request..
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
[B71F3F80:00000000 trc] socket 10 write event (false)!
[B71F3F80:B71F8C80 trc] resume
[B71F3F80:B71F8C80 trc] evbuffer_readln (fd 10)
[B71F3F80:B71F8C80 trc] yield
@KeanuLe
Copy link
Author

KeanuLe commented May 15, 2012

ab -n 10000 -c 1000 http://192.168.2.3:8080/ <=== _FIXED_: #44, 10aba8f3117

Nginx reverse proxy:
ab -n 10000 -c 1000 http://192.168.2.3/ <=== _EXCEPTION!!!_
ab -n 10000 -c 1000 http://127.0.0.1/ <=== _EXCEPTION!!!_

upstream example_servers {
  server 127.0.0.1:8080;
}
server {
location / {
    try_files $uri @example;
}

location @example {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass       http://example_servers;
}
}
[B7167F80:B6B693C0 ERR] Error after page has been written: object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.write(const(ubyte[]), bool)+0x43) [0x80fa71f]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.stream.stream.OutputStream.write(const(char[]), bool)+0x3f) [0x80e0ebf]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeHeader()+0x128) [0x80fd7b0]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(@property vibe.stream.stream.OutputStream vibe.http.server.HttpServerResponse.bodyWriter()+0x189) [0x80fd099]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeBody(const(ubyte[]), immutable(char)[])+0x90) [0x80fcdfc]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void simplehttp.handleRequest(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x29) [0x80d4069]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void std.functional.DelegateFaker!(void function(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)*).DelegateFaker.doIt(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x45) [0x80f9135]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0xbea) [0x80fe652]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b49]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ae9]
[(nil)]
[B7167F80:B6B693C0 WRN] Handling of connection failed: Operating on closed TCPConnection.
[B7167F80:B6B693C0 ERR] Error after page has been written: object.Exception@../source/vibe/core/drivers/libevent2_tcp.d(287): Operating on closed TCPConnection.
----------------
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(pure @safe bool std.exception.enforce!(bool, "../source/vibe/core/drivers/libevent2_tcp.d", 287).enforce(bool, lazy const(char)[])+0x2f) [0x80fb1fb]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.drivers.libevent2_tcp.Libevent2TcpConnection.write(const(ubyte[]), bool)+0x43) [0x80fa71f]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.stream.stream.OutputStream.write(const(char[]), bool)+0x3f) [0x80e0ebf]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeHeader()+0x128) [0x80fd7b0]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(@property vibe.stream.stream.OutputStream vibe.http.server.HttpServerResponse.bodyWriter()+0x189) [0x80fd099]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.HttpServerResponse.writeBody(const(ubyte[]), immutable(char)[])+0x90) [0x80fcdfc]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void simplehttp.handleRequest(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x29) [0x80d4069]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void std.functional.DelegateFaker!(void function(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)*).DelegateFaker.doIt(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x45) [0x80f9135]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection, vibe.http.server.HTTPServerListener)+0xbea) [0x80fe652]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void __lambda17(vibe.core.driver.TcpConnection)+0x27) [0x80fc7e3]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(extern (C) void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void delegate() client_task(vibe.core.drivers.libevent2_tcp.TcpContext*, vibe.core.drivers.libevent2_tcp.TcpContext*).void __lambda16()+0x8f) [0x80fadb7]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void vibe.core.core.defaultFiberFunc()+0x70) [0x80e3154]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(void core.thread.Fiber.run()+0x19) [0x8146b49]
/tmp/.rdmd-1000/home/ubuntu12/vibe.d/bin/../source/examples/simplehttp.d.52821A90AD271535875DEF3D72F9A9E9(fiber_entryPoint+0x49) [0x8146ae9]
[(nil)]
[B7167F80:B6B693C0 WRN] Handling of connection failed: Operating on closed TCPConnection.

s-ludwig added a commit that referenced this issue May 20, 2012
Fixed the return value of Libevent2TcpConnection.waitForData.
The HTTP server checks for client disconnects before reading a consecutive request of a keep-alive connection now (avoids "operating on closed connection" errors).
Fixes issues #20 and possibly #43.
@s-ludwig
Copy link
Member

Can you recheck if this still occurs? From the log output I think it is fixed with the previous commit.

@unknownbrackets
Copy link

This was happening for me in a snapshot from 28ba2df, but appears fixed in 6230af0.

Was very reproducible: just wait 10-15 seconds after loading a page, and the exception comes up. Then the next page load will hang. Very annoying, very good to be gone.

-[Unknown]

@s-ludwig
Copy link
Member

Ok thanks, I'll close the issue then for now.

@unknownbrackets
Copy link

Turns out this is still happening. Easy to reproduce in Chrome with pipelining enabled or Firefox with pipelining enabled.

It was happening less but I still get it all the time.

-[Unknown]

s-ludwig added a commit that referenced this issue Jun 27, 2012
…P connections - should fix the remaining part of issue #43.
@s-ludwig
Copy link
Member

Turned out that TcpConnection.close() was not working correctly. It's somehow rediculous how difficult such things can be to get right with libevent-like libraries compared to bare metal socket code - caused by hidden state that they introduce and which is not really documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants