ancruna / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

100% CPU usage, mongoose 2.11 #248

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Background:
I've been using mongoose to test how a broken wget development build behaves in 
different circumstances. I currently have a development build of wget that 
drops connections due to some fault. Wget will then reconnect to the server and 
attempt to continue the download. Wget has recently switched to a more 
"abstract" method of addressing sockets by using file descriptors in windows, 
as is typically done by unix. Since this switch a lot of problems have occurred 
in my dev builds; data dropouts, crashes, etc.

Problem:
I was testing wget dev with mongoose and I notice what happens is each time the 
connection drops and a new one is started the CPU usage in mongoose is spread 
over another thread. For example
50% thread1
then after a drop and reconnect
50% thread1
50% thread2
another drop reconnect
33% thread1
33% thread2
33% thread3
another
25% 1
25% 2
25% 3
25% 4
and so on until I have about 10 threads using 10% CPU usage each. During this 
time there is only one active tcp connection, and even if I stop wget from 
reconnecting (ie wget isn't running any longer) and there are no tcp 
connections, mongoose still continues to use cpu in its threads for a total of 
100% CPU usage. This is on an Intel e6600.

The wget command that I am using to connect to the mongoose webserver and test 
wget throughput is like this
wget --no-check-certificate --verbose --debug 
https://localhost:4433/ubuntu904desktop.rar -O NUL > out 2>&1

ubuntu904 is a 1.7GB virtual machine archive file that I have in the same 
directory as monsoon and I use for testing.

The steps to reproduce are
Start mongoose in a directory that has my conf, my cert and a large file, 1+GB.
Run the above wget command attempting to download your large file.
Wget should continually drop out and reconnect and this should cause mongoose 
to quickly hit 100% CPU.

Attached is a screenshot, the faulty wget, a test server certificate, my 
monsoon conf, my wget output, and the openssl libs for wget (stable -- from the 
getgnuwin32 project, which I maintain).

What version of the product are you using? On what operating system?
mongoose-2.11.exe on Vista SP2 x86
a494d4d9ac522f13a3fa5e1c2c0cb467

Original issue reported on code.google.com by term...@gmail.com on 8 Apr 2011 at 3:48

Attachments:

GoogleCodeExporter commented 9 years ago
Tried you binaries on the latest code, and mongoose appears to work well.
Thank you!

Original comment by valenok on 23 Sep 2012 at 1:33