View Issue Details

IDProjectCategoryView StatusLast Update
0001751unrealircdpublic2004-04-23 19:06
ReporterRon2K Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version3.2-RC2 
Summary0001751: remote includes hanging ircd if remote server is down
DescriptionOK. I was playing around with the IRCd last night (I'm using remote includes) and wondered: "What happens if you rehash when the remote server is down?" (I was mainly wondering this because I've got an idea for a remote include feature, which I'll post just now.) So, I switched off the remote server (which runs on the same machine) and rehashed. It gave me "Ron2K is rehashing config file"... and then just sat there. And sat there. I came back two hours later and it was _still_ sitting there. It wasn't responding to ANY commands - in short, the IRCd had completely hung. I eventually had to shut it down via the task manager.

Incidentally, /restart doesn't have the same problem, as service.log reports "unable to download file XXXX" and the ircd aborts in the usual manner. Seems to only be /rehash.

The above was tested with Unreal3.2-RC2fix running on Windows XP Pro. The remote server used was Apache 1.3.28.
Steps To ReproduceJust switch off the remote server and rehash the ircd.
Attached Files
remoteinc.diff (4,302 bytes)
3rd party modules

Activities

syzop

2004-04-21 11:40

administrator   ~0005903

We use cache and we have a whole asynchronous-/rehash system, however... it indeed doesn't seem to be working correctly...
* I booted up with an 'include "http://192.168.5.221/blah.conf";' (with just a ban nick block), went fine...
* rehashed, went fine.
* Then I firewalled the host and /rehash'ed
* Now it seems to 'hang'.

(for codemastr:)
it seems to "hang" in url_do_transfers_async(), in the while(cont) loop to be exact:
Breakpoint 1, url_do_transfers_async () at url.c:281
281 CURLMsg *msg;
(gdb) n
282 while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(multihandle, &cont))
(gdb)
285 while(cont) {
(gdb)
291 FD_ZERO(&fdread);
(gdb)
292 FD_ZERO(&fdwrite);
(gdb)
293 FD_ZERO(&fdexcep);
(gdb)
294 timeout.tv_sec = 1;
(gdb)
295 timeout.tv_usec = 0;
(gdb)
297 curl_multi_fdset(multihandle, &fdread, &fdwrite, &fdexcep, &maxfd);
(gdb)
299 rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
[*1 sec delay*]
(gdb)
301 switch(rc) {
(gdb)
304 break;
(gdb) p rc
$1 = 0
(gdb) n
285 while(cont) {
(gdb)
291 FD_ZERO(&fdread);
(gdb)
292 FD_ZERO(&fdwrite);
(gdb)
293 FD_ZERO(&fdexcep);
(gdb)
294 timeout.tv_sec = 1;
(gdb)
295 timeout.tv_usec = 0;
(gdb)
297 curl_multi_fdset(multihandle, &fdread, &fdwrite, &fdexcep, &maxfd);
(gdb)
299 rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
[*1 sec delay*]
(gdb)
301 switch(rc) {
(gdb)
304 break;
(gdb)
[and this continues forever]

I'm using curl 7.11.1 w/c-ares 1.2.0.

syzop

2004-04-21 20:28

administrator   ~0005906

(we are looking at it at the moment / tomorrow..)

syzop

2004-04-23 19:06

administrator   ~0005919

This should be fixed in current CVS. You can also get 'pre2' from www.vulnscan.org/UnrealIrcd/Unreal3.2-pre2.tar.gz

If you find any issues/bugs let us know ASAP (since we are preparing for release).

Issue History

Date Modified Username Field Change
2004-04-21 01:39 Ron2K New Issue
2004-04-21 11:40 syzop Note Added: 0005903
2004-04-21 20:28 syzop Note Added: 0005906
2004-04-21 20:28 syzop Status new => confirmed
2004-04-23 17:39 syzop File Added: remoteinc.diff
2004-04-23 19:06 syzop Status confirmed => closed
2004-04-23 19:06 syzop Note Added: 0005919