includeos / acorn

Acorn Web Server Appliance, built with IncludeOS
Apache License 2.0
93 stars 13 forks source link

IncludeOS goes unresponsive when request spamming for a file #35

Closed AndreasAakesson closed 8 years ago

AndreasAakesson commented 8 years ago

To replicate the error:

Then it won't take long for the OS to go unresponsive (like 10 requests maybe). Timers still working.

My first guess something is overwriting memory. The heap is growing, so I guess there is a leak somewhere. ... or maybe not. It's between 3.5MB and 3.6MB

AndreasAakesson commented 8 years ago

Some output:

<Connection:[10.0.0.1:40444]> @on_data, size=413
<Connection:[10.0.0.1:40444]> Complete Request: [@GET:/static/books/borkman.txt] Payload (0/0 B)
<Response> Deleted (10.0.0.42:80 10.0.0.1:40444 (ESTABLISHED))
<Waitress> Found file: borkman.txt (176554 B)
<WriteQueue> Advance: Done (118) current++ [1]
<Response> Sending file: borkman.txt (176554 B).
<WriteQueue> Advance: Done (64000) current++ [2]
<Request> Deleted
<Connection:[10.0.0.1:40444]> Disconnect: Connection closing
<Response> Deleted (10.0.0.42:80 10.0.0.1:40444 (CLOSE-WAIT))
<Connection:[10.0.0.1:40444]> Deleted
<Connection:[10.0.0.1:40446]> @on_data, size=368
<Connection:[10.0.0.1:40446]> Complete Request: [@GET:/favicon.ico] Payload (0/0 B)
<Response> Deleted (10.0.0.42:80 10.0.0.1:40446 (ESTABLISHED))
<Waitress> Found file: favicon.ico (318 B)
<WriteQueue> Advance: Done (117) current++ [1]
<Response> Sending file: favicon.ico (318 B).
<Response> Success sending favicon.ico => 10.0.0.1:40446
<WriteQueue> Advance: Done (318) current++ [2]
<Request> Deleted
<Response> Error sending borkman.txt => 10.0.0.1:40444 [General I/O error: Write failed]
<WriteQueue::reset> Reset
<Connection::~Connection> Deleted 10.0.0.42:80 10.0.0.1:40444 (LAST-ACK)
<WriteQueue> Acknowledge done, current-- [1]
<WriteQueue> Acknowledge done, current-- [0]
<Server> New Connection [ 10.0.0.1:40448 ]
<Server> New Connection [ 10.0.0.1:40450 ]
<Connection:[10.0.0.1:40446]> @on_data, size=413
<Connection:[10.0.0.1:40446]> Complete Request: [@GET:/static/books/borkman.txt] Payload (0/0 B)
<Response> Deleted (10.0.0.42:80 10.0.0.1:40446 (ESTABLISHED))
<Waitress> Found file: borkman.txt (176554 B)
<WriteQueue> Advance: Done (118) current++ [1]
<Response> Sending file: borkman.txt (176554 B).
<Request> Deleted
<WriteQueue> Acknowledge done, current-- [0]
<WriteQueue> Advance: Done (64000) current++ [1]
<WriteQueue> Acknowledge done, current-- [0]
<WriteQueue> Advance: Done (64000) current++ [1]
<WriteQueue> Acknowledge done, current-- [0]
<Response> Success sending borkman.txt => 10.0.0.1:40446
<WriteQueue> Advance: Done (48554) current++ [1]
<WriteQueue> Acknowledge done, current-- [0]
<Connection:[10.0.0.1:40446]> @on_data, size=413
<Connection:[10.0.0.1:40446]> Complete Request: [@GET:/static/books/borkman.txt] Payload (0/0 B)
<Response> Deleted (10.0.0.42:80 10.0.0.1:40446 (ESTABLISHED))
<Waitress> Found file: borkman.txt (176554 B)
<WriteQueue> Advance: Done (118) current++ [1]
<Response> Sending file: borkman.txt (176554 B).
<WriteQueue> Advance: Done (64000) current++ [2]
<Request> Deleted
<WriteQueue> Acknowledge done, current-- [1]
<WriteQueue> Advance: Done (64000) current++ [2]
<WriteQueue> Acknowledge done, current-- [1]
<Response> Success sending borkman.txt => 10.0.0.1:40446
<WriteQueue> Advance: Done (48554) current++ [2]
<WriteQueue> Acknowledge done, current-- [1]
<WriteQueue> Acknowledge done, current-- [0]
<Connection:[10.0.0.1:40446]> @on_data, size=413
<Connection:[10.0.0.1:40446]> Complete Request: [@GET:/static/books/borkman.txt] Payload (0/0 B)
<Response> Deleted (10.0.0.42:80 10.0.0.1:40446 (ESTABLISHED))
<Waitress> Found file: borkman.txt (176554 B)
<WriteQueue> Advance: Done (118) current++ [1]
<Response> Sending file: borkman.txt (176554 B).
<WriteQueue> Advance: Done (64000) current++ [2]
<Request> Deleted
<Connection:[10.0.0.1:40446]> Disconnect: Connection closing
<Response> Deleted (10.0.0.42:80 10.0.0.1:40446 (CLOSE-WAIT))
<Connection:[10.0.0.1:40446]> Deleted
<Connection:[10.0.0.1:40448]> @on_data, size=368
<Connection:[10.0.0.1:40448]> Complete Request: [@GET:/favicon.ico] Payload (0/0 B)
<Waitress> Found file: favicon.ico (318 B)
<WriteQueue> Advance: Done (117) current++ [1]
<Response> Sending file: favicon.ico (318 B).
<Response> Success sending favicon.ico => 10.0.0.1:40448
<WriteQueue> Advance: Done (318) current++ [2]
<Request> Deleted
<Connection:[10.0.0.1:40450]> @on_data, size=413
<Connection:[10.0.0.1:40450]> Complete Request: [@GET:/static/books/borkman.txt] Payload (0/0 B)
<Waitress> Found file: borkman.txt (176554 B)
<WriteQueue> Advance: Done (118) current++ [1]
<Response> Sending file: borkman.txt (176554 B).
<Request> Deleted
<Connection:[10.0.0.1:40450]> Disconnect: Connection closing
<Response> Deleted (10.0.0.42:80 10.0.0.1:40450 (CLOSE-WAIT))
<Connection:[10.0.0.1:40450]> Deleted
<Connection:[10.0.0.1:40448]> Disconnect: Connection closing
<Response> Deleted (10.0.0.42:80 10.0.0.1:40448 (CLOSE-WAIT))
<Connection:[10.0.0.1:40448]> Deleted
@onTimeout [2016-08-15T10:31:14Z]
LISTENERS:
Port [ 80 ]  SynQueue ( 25 ) 
    10.0.0.42:80 10.0.0.1:40460 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40458 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40456 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40454 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40452 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40460 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40458 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40456 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40454 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40452 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40460 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40458 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40456 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40454 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40452 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40460 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40458 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40456 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40454 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40452 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40460 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40458 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40456 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40454 (SYN-RCV)
    10.0.0.42:80 10.0.0.1:40452 (SYN-RCV)

CONNECTIONS:
Proto   Recv    Send    In  Out Local           Remote          State
tcp4                    10.0.0.42:80        10.0.0.1:40446      LAST-ACK
tcp4                    10.0.0.42:80        10.0.0.1:40448      LAST-ACK
tcp4                    10.0.0.42:80        10.0.0.1:40450      LAST-ACK