View Issue Details

IDProjectCategoryView StatusLast Update
0003711unrealircdpublic2010-07-05 13:20
Reporterivanp Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionunable to duplicate 
Product Version3.2.7 
Summary0003711: Bad file descriptor crash
DescriptionWe've raised the number of file descriptors in freshly installed CentOS 4.6 from 1024 to 10000.

Then compiled UnrealIRCd with the same (10000) file descriptors limit.

After 1024 connections it always crashes, reporting in ircd.log:

select ...[127.0.0.1]:Bad file descriptor

When we compile the same UnrealIRCd with 9500 fd limit in Config, everything is working just fine, with more than 1024 connections and without crash.

Obviously there is some problem when compiled fd number == OS fd number.
3rd party modules

Activities

syzop

2008-08-08 09:41

administrator   ~0015347

Did you follow the instructions in http://www.vulnscan.org/UnrealIRCd/faq/46 ?
On Linux you have to (or had to) edit a header file...

ivanp

2008-08-08 10:03

reporter   ~0015348

Yes, did everything.

syzop

2008-08-09 15:00

administrator   ~0015354

Ok, and.. as I read it.. you said that if you compile for 9500 it goes fine if you go beyond 1024 connected clients, but if you compile for 10000 it goes crazy if you have >1024 connected clients? That surely is odd..

Unfortunately I've some trouble with my server hardware, so I'm not sure how well I can test this myself. I can say, however, that I've in the past compiled and connected 10K clients on Debian/Linux.

nate

2008-08-09 23:34

reporter   ~0015357

Is it when it's exactly the same as the OS limit, or maybe just it being 10000?

What if you say lifted the system limit to 10010 and put Unreal back at 10000, check if it still crashes at 1024 maybe?

ivanp

2008-08-10 07:59

reporter   ~0015358

Nate, the server is in production environment, cannot test that scenario.

Why do you think figure 10000 has something to do with the problem?

We had hard couple of days banging our heads with this problem. Can you recheck part of the code that allocates new fd? Maybe it just uses 1 more fd than allowed, which results in crash.

syzop

2009-11-22 15:06

administrator   ~0015963

I'm unable to reproduce this problem.
system limit (header file & ulimit -n): 10000
unreal limit: 10000
I can succesfully connect 9992 clients, presumably the other fd's are taken by modules, port listeners, etc.
I get:
Cannot accept connections maintest.test.net[*.5667]:Too many open files
but other than that, no errors are logged, ircd does not crash.

Were you able to resolve this issue? Is there anything you think will help us to reproduce this issue ? I don't think we can blame a dist, kernel, or libc.. it should 'just work' IMHO.

syzop

2010-07-05 13:20

administrator   ~0016141

Unable to reproduce / No or insufficient feedback.

Issue History

Date Modified Username Field Change
2008-07-15 15:31 ivanp New Issue
2008-08-08 09:41 syzop Note Added: 0015347
2008-08-08 10:03 ivanp Note Added: 0015348
2008-08-09 15:00 syzop Note Added: 0015354
2008-08-09 23:34 nate Note Added: 0015357
2008-08-10 07:59 ivanp Note Added: 0015358
2009-11-22 15:06 syzop Note Added: 0015963
2009-11-22 15:06 syzop Status new => feedback
2010-07-05 13:20 syzop QA => Not touched yet by developer
2010-07-05 13:20 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2010-07-05 13:20 syzop Note Added: 0016141
2010-07-05 13:20 syzop Status feedback => closed
2010-07-05 13:20 syzop Resolution open => unable to duplicate