View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003238 | unreal | ircd | public | 2007-02-16 04:21 | 2007-02-16 08:18 |
Reporter | Le_Coyote | Assigned To | syzop | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | i686, x86_64 | OS | Linux | OS Version | 2.4.27, 2.6.18 |
Product Version | 3.2.6 | ||||
Fixed in Version | 3.2.6 | ||||
Summary | 0003238: rehash causes ircd to open new fd for modules | ||||
Description | At each rehash, ircd re-opens each module, causing the number of open files to increase and eventually reach whatever limit was set (1024 here), causing the ircd to refuse any further connections. | ||||
Steps To Reproduce | Rehash a running server | ||||
Additional Information | Reproduced on 4 different ircd's. Two on a 2.6.18 x86_64, one on a 2.4.27 i686, and one on a 2.6.10 i686. | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
hmm, so if you rehash a LOT of times it will eventually reach the limit ? |
|
Yeah, a lot. I came across an ircd that had rehashed 507 times. This network wanted a list of active channels in the motd updated every hour. Yes. Hourly rehash. Yuck. |
|
lol, well, they should use /rehash -motd to do it, but thats besides the point, this is definetly a big issue |
|
Does "/rehash -motd" reload all modules? I don't think so. Edit: I didn't see the post above... |
|
Strange nobody noticed this before, but I can confirm it on my machine. The odd thing is I've heard of people that rehash their ircd every 5 minutes (yeah crazy cronjob), hmm :P. Perhaps this is new in 3.2.6? |
|
Definitely agree that "/rehash -motd" should be used instead. However in this particular case, rehash was achieved via kill -HUP, since it was a cron job. |
|
int file_exists(char* file) { FILE *fd; fd = fopen(file, "r"); if (!fd) { return 0; } return 1; } AHEM *cough* |
|
Fixed in CVS (32* and 33*): - Fixed file descriptor leakage on rehash. This resulted in [number of modules loaded] file descriptors being leaked upon every /REHASH. So if you, for example, had 3 modules loaded and rehashed 30 times, it would cause the ircd to consume 90 useless file descriptors (which often means 90 less file descriptors being available to clients). Patch here: http://www.vulnscan.org/tmp/fd.leak.unreal326.patch Was indeed 3.2.6 only, cause was: "- loadmodule now reports proper errors when the actual file can't be found, instead of blaming it on the temp file, reported in 0003015. (aquanight backport)" |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-02-16 04:21 | Le_Coyote | New Issue | |
2007-02-16 05:35 | djGrrr | Note Added: 0013220 | |
2007-02-16 05:49 | Le_Coyote | Note Added: 0013221 | |
2007-02-16 06:37 | djGrrr | Note Added: 0013222 | |
2007-02-16 07:09 | Grunt | Note Added: 0013223 | |
2007-02-16 07:10 | Grunt | Note Edited: 0013223 | |
2007-02-16 07:57 | syzop | Status | new => confirmed |
2007-02-16 08:01 | syzop | Note Added: 0013224 | |
2007-02-16 08:04 | Le_Coyote | Note Added: 0013225 | |
2007-02-16 08:04 | syzop | Note Added: 0013226 | |
2007-02-16 08:18 | syzop | Status | confirmed => resolved |
2007-02-16 08:18 | syzop | Fixed in Version | => 3.2.6 |
2007-02-16 08:18 | syzop | Resolution | open => fixed |
2007-02-16 08:18 | syzop | Assigned To | => syzop |
2007-02-16 08:18 | syzop | Note Added: 0013227 |