# nginx-0.7.53/Windows select error and dead loop

**URL:** <https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659>\
**Category:** NGINX\
**Created:** [April 28, 2009, 10:23am UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659 "2009-04-28T10:23:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![diogin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7cd45c/32.png) [@diogin](https://www.ruby-forum.com/u/diogin)\
**Post date:** [April 28, 2009, 10:23am UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659/1 "2009-04-28T10:23:59Z")

</div>

Hello,

I started 0.7.53 Windows build hours ago and it come into crazy dead  
loop minutes later, these have been occured two times. The CPU is 100%  
since I started two worker, and the error.log file has been increasing  
to nearly 8GB with “select error” messages.

Here are my nginx.conf:

---- nginx.conf begin ----

worker\_processes 2;  
error\_log D:/diogin/http/site/logs/error.log;  
pid D:/diogin/http/site/temp/nginx.pid;  
events {  
worker\_connections 1024;  
}  
http {  
include D:/diogin/soft/dat/nginx/mime.types;  
default\_type application/octet-stream;  
log\_format main ‘$remote\_addr [$time\_local] “$request”  
$status’;  
access\_log D:/diogin/http/site/logs/access.log main;  
sendfile on;  
keepalive\_timeout 65;  
server {  
listen 83;  
server\_name [site.example.net](http://site.example.net);  
gzip on;  
gzip\_types text/css application/x-javascript;  
location / {  
root D:/example/site;  
index index.html index.htm;  
rewrite ^(.\*)-[0-9]+.(css|js|gif|jpe?g|png|bmp|swf|ico)$  
$1.$2 break;  
add\_header Cache-Control max-age=2952000;  
}  
}  
}

---- nginx.conf end ----

and these are the errors from error.log:

---- error.log begin ----

2009/04/28 13:47:00 2448#1732: select event fd:120 ev:0 is already set  
while accepting new connection on 0.0.0.0:83  
2009/04/28 15:28:37 1136#2784: select event fd:120 ev:0 is already set  
while accepting new connection on 0.0.0.0:83  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
2009/04/28 15:28:58 1136#2784: select() failed (10022: An invalid  
argument was supplied)  
…

---- error.log end ----

Thanks.

Posted at Nginx Forum:

> **[nginx-0.7.53/Windows select error and dead loop](https://forum.nginx.org/read.php?2,1495,1495#msg-1495)**
>
> Hello, I started 0.7.53 Windows build hours ago and it come into crazy dead loop minutes later, these have been occured two times. The CPU is 100% since I started two worker, and the error.log file has been increasing to nearly 8GB with "select...

---

<div class="post-metadata">

**Author:** ![diogin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7cd45c/32.png) [@diogin](https://www.ruby-forum.com/u/diogin)\
**Post date:** [April 28, 2009, 10:46am UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659/2 "2009-04-28T10:46:53Z")

</div>

I checked netstat -an, and here are the results:

TCP 0.0.0.0:83 0.0.0.0:0 LISTENING  
TCP 0.0.0.0:83 0.0.0.0:0 LISTENING

It seems the two worker processes both try to listen on the same socket,  
which generates the error “select event fd:120 ev:0 is already set while  
accepting new connection on 0.0.0.0:83”?

Am I missing anything or is my nginx.conf misconfigured?

Posted at Nginx Forum:

> **[Re: nginx-0.7.53/Windows select error and dead loop](https://forum.nginx.org/read.php?2,1495,1496#msg-1496)**
>
> Hello, I started 0.7.53 Windows build hours ago and it come into crazy dead loop minutes later, these have been occured two times. The CPU is 100% since I started two worker, and the error.log file has been increasing to nearly 8GB with "select...

---

<div class="post-metadata">

**Author:** ![diogin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7cd45c/32.png) [@diogin](https://www.ruby-forum.com/u/diogin)\
**Post date:** [April 28, 2009, 11:10am UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659/3 "2009-04-28T11:10:17Z")

</div>

diogin wrote:

> I checked netstat -an, and here are the results:
> 
> TCP 0.0.0.0:83 0.0.0.0:0 LISTENING  
> TCP 0.0.0.0:83 0.0.0.0:0 LISTENING
> 
> It seems the two worker processes both try to listen on the same socket,  
> which generates the error “select event fd:120 ev:0 is already set while  
> accepting new connection on 0.0.0.0:83”?
> 
> Am I missing anything or is my nginx.conf misconfigured?
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,1495,1496#msg-1496](http://forum.nginx.org/read.php?2,1495,1496#msg-1496)

oh, I have posted this bug before you  
[http://www.ruby-forum.com/topic/184732#808203](http://www.ruby-forum.com/topic/184732#808203)  
[http://www.ruby-forum.com/topic/184732#808773](http://www.ruby-forum.com/topic/184732#808773)

I think worker\_processes set only 1 now

---

<div class="post-metadata">

**Author:** ![diogin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7cd45c/32.png) [@diogin](https://www.ruby-forum.com/u/diogin)\
**Post date:** [April 28, 2009, 12:00pm UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659/4 "2009-04-28T12:00:07Z")

</div>

Igor S. wrote:

> On Tue, Apr 28, 2009 at 11:10:17AM +0200, Chris Wan wrote:
> 
> > > Am I missing anything or is my nginx.conf misconfigured?
> > > 
> > > Posted at Nginx Forum:  
> > > [http://forum.nginx.org/read.php?2,1495,1496#msg-1496](http://forum.nginx.org/read.php?2,1495,1496#msg-1496)
> > 
> > oh, I have posted this bug before you  
> > [Nginx-0.7.52 - NGINX - Ruby-Forum](http://www.ruby-forum.com/topic/184732#808203)  
> > [Nginx-0.7.52 - NGINX - Ruby-Forum](http://www.ruby-forum.com/topic/184732#808773)
> > 
> > I think worker\_processes set only 1 now
> 
> No, this is not workers problem, this is nginx’s bug.  
> Could anyone reproduce the bug with debug log ?

I have sent the letter to you.

---

<div class="post-metadata">

**Author:** ![diogin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7cd45c/32.png) [@diogin](https://www.ruby-forum.com/u/diogin)\
**Post date:** [April 28, 2009, 11:27am UTC](https://www.ruby-forum.com/t/nginx-0-7-53-windows-select-error-and-dead-loop/166659/5 "2009-04-28T11:27:55Z")

</div>

On Tue, Apr 28, 2009 at 11:10:17AM +0200, Chris Wan wrote:

> > Am I missing anything or is my nginx.conf misconfigured?
> > 
> > Posted at Nginx Forum:  
> > [http://forum.nginx.org/read.php?2,1495,1496#msg-1496](http://forum.nginx.org/read.php?2,1495,1496#msg-1496)
> 
> oh, I have posted this bug before you  
> [Nginx-0.7.52 - NGINX - Ruby-Forum](http://www.ruby-forum.com/topic/184732#808203)  
> [Nginx-0.7.52 - NGINX - Ruby-Forum](http://www.ruby-forum.com/topic/184732#808773)
> 
> I think worker\_processes set only 1 now

No, this is not workers problem, this is nginx’s bug.  
Could anyone reproduce the bug with debug log ?
