View Issue Details

IDProjectCategoryView StatusLast Update
0002999unrealircdpublic2007-07-20 13:02
ReporterBock Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformallOSlinuxOS Version2.4.27
Product Version3.2.5 
Summary0002999: Incorrect work with remote including.
DescriptionIf we using remote include and on start ircd remote host didn't accesible, the ircd creates empty files. But on rehash it didn't check size of files and didn't download new or old, but not empty files of configuration.
Steps To ReproduceIn config:

include "ftp://solo.bynets.org/configs/unreal/help.ru.conf";
include "ftp://solo.bynets.org/configs/unreal/badwords.all.conf";
include "ftp://solo.bynets.org/configs/unreal/spamfilter.conf";


After start ircd, but if ftp server not avaliable (network troubles, etc):
root@ircserv:~(/etc/ircd-unreal/tmp)> ls -al
drwxrw---- 2 irc irc 336 2006-07-14 06:25 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rw------- 1 irc irc 0 2006-02-10 11:08 68C8096A.badwords.all.conf
-rw------- 1 irc irc 0 2006-02-04 15:38 A63CB2E0.spamfilter.conf
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rw------- 1 irc irc 0 2006-06-19 09:17 CB9E1194.help.ru.conf
-rwx------ 2 irc irc 99583 2006-06-24 23:12 E3C4B850.cloak.so
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 F81049C6.commands.so

After rehash:
21:20 -!- Mode change [+oghaAsNW] for user [][]
21:20 -!- Server notice mask (+kfjveGqSso)
21:20 -!- You are now an IRC Operator
21:20 !n-o-l.bynets.org *** Notice -- [][] is rehashing server config file
21:20 -!- unrealircd.conf Rehashing
21:20 !n-o-l.bynets.org *** Notice -- Loading IRCd configuration ..
21:20 !n-o-l.bynets.org *** Notice -- Configuration loaded without any problems ..
but files is still empty.

If delete this files:
ls -alrcserv:~(/etc/ircd-unreal/tmp)>
drwxrw---- 2 irc irc 208 2006-07-15 21:21 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 5B3BCC99.commands.so
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rwx------ 2 irc irc 99583 2006-06-24 23:12 D77107EF.cloak.so

and do rehash:
root@ircserv:~(/etc/ircd-unreal/tmp)> ls -al
итого 6326
drwxrw---- 2 irc irc 336 2006-07-15 21:22 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 246AEFD8.commands.so
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rw------- 1 irc irc 11009 2006-02-10 11:08 5FDFD012.badwords.all.conf
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rw------- 1 irc irc 53916 2006-06-19 09:17 D795FE83.help.ru.conf
-rwx------ 2 irc irc 99583 2006-06-24 23:12 FBAC0F3C.cloak.so
-rw------- 1 irc irc 6094 2006-02-04 15:38 FF36D43.spamfilter.conf
Additional InformationI think, that unreal must check size of files for remote include or (and) delete emtpy files on rehash.
TagsNo tags attached.
Attached Files
remoteincl.txt (9,867 bytes)
url.c.diff (400 bytes)
3rd party modules

Relationships

child of 0003111 closed 3.2.7 Release 

Activities

Bock

2006-07-15 13:24

reporter   ~0012069

Last edited: 2006-07-15 13:26

In config:

include "ftp://solo.bynets.org/configs/unreal/help.ru.conf";
include "ftp://solo.bynets.org/configs/unreal/badwords.all.conf";
include "ftp://solo.bynets.org/configs/unreal/spamfilter.conf";


After start ircd, but if ftp server not avaliable (network troubles, etc):
root@ircserv:~(/etc/ircd-unreal/tmp)> ls -al
drwxrw---- 2 irc irc 336 2006-07-14 06:25 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rw------- 1 irc irc 0 2006-02-10 11:08 68C8096A.badwords.all.conf
-rw------- 1 irc irc 0 2006-02-04 15:38 A63CB2E0.spamfilter.conf
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rw------- 1 irc irc 0 2006-06-19 09:17 CB9E1194.help.ru.conf
-rwx------ 2 irc irc 99583 2006-06-24 23:12 E3C4B850.cloak.so
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 F81049C6.commands.so

After rehash:
21:20 -!- Mode change [+oghaAsNW] for user [][]
21:20 -!- Server notice mask (+kfjveGqSso)
21:20 -!- You are now an IRC Operator
21:20 !n-o-l.bynets.org *** Notice -- [][] is rehashing server config file
21:20 -!- unrealircd.conf Rehashing
21:20 !n-o-l.bynets.org *** Notice -- Loading IRCd configuration ..
21:20 !n-o-l.bynets.org *** Notice -- Configuration loaded without any problems ..
but files is still empty.

If delete this files:
ls -alrcserv:~(/etc/ircd-unreal/tmp)>
drwxrw---- 2 irc irc 208 2006-07-15 21:21 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 5B3BCC99.commands.so
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rwx------ 2 irc irc 99583 2006-06-24 23:12 D77107EF.cloak.so

and do rehash:
root@ircserv:~(/etc/ircd-unreal/tmp)> ls -al
drwxrw---- 2 irc irc 336 2006-07-15 21:22 .
drwx------ 8 irc irc 1008 2006-07-06 19:03 ..
-rwx------ 2 irc irc 6098347 2006-06-24 23:12 246AEFD8.commands.so
-rwx------ 2 irc irc 91855 2006-06-24 23:12 31D447D3.textban.so
-rw------- 1 irc irc 11009 2006-02-10 11:08 5FDFD012.badwords.all.conf
-rwx------ 2 irc irc 101160 2006-06-24 23:12 A6746AC8.callerid.so
-rw------- 1 irc irc 53916 2006-06-19 09:17 D795FE83.help.ru.conf
-rwx------ 2 irc irc 99583 2006-06-24 23:12 FBAC0F3C.cloak.so
-rw------- 1 irc irc 6094 2006-02-04 15:38 FF36D43.spamfilter.conf


I think, that unreal must check size of files for remote include or (and) delete emtpy files on rehash.
Version:
-› Unreal3.2.5. n-o-l.bynets.org FhinXeOoZEmM3 [Linux ircserv 2.4.27-2-k6 #1 Wed Aug 17 11:01:34 UTC 2005 i586 GNU/Linux=2308]
-n-o-l.bynets.org- OpenSSL 0.9.7e 25 Oct 2004
-n-o-l.bynets.org- zlib 1.2.2
-n-o-l.bynets.org- libcurl/7.15.1 OpenSSL/0.9.7e zlib/1.2.2 c-ares/1.3.0

Bock

2006-11-04 12:46

reporter   ~0012583

Hmm. Probles is still actual. But it not for network troubles - it depends of rehash server.

I attached log:
shortly: if file im tmp dir and has size 0b, it don't replaced by downloaded file (and file not downloaded by curl).
It's or trouble curl (don't replace old files bewest) or trouble of unreal, if it not check sizeof included file and don't delete zero-length files from tmp dir.

syzop

2006-11-24 15:32

administrator   ~0012721

Perhaps next release, or someone else could check this out.. no time for this atm, but looks like something that needs to be fixed.. if it's always reproducable it probably shouldn't be too hard ;)

Bock

2007-04-16 04:48

reporter   ~0013449

*bump*

Bock

2007-07-02 08:42

reporter   ~0014435

unrealircd.conf:
include "ftp://wax.net1/Share/help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";

after first rehash all is ok: file downloaded and works fine. Make one rehash: file is empty. One more rehash - creates new file, old file with 0 lenght is present. Files after some rehashes:

 Directory of C:\Program Files\Unreal3.2\tmp

02.07.2007 16:40 <DIR> .
02.07.2007 16:40 <DIR> ..
28.06.2007 19:14 18 944 17F44614.cloak.dll
27.06.2007 20:12 53 485 C9B8C3D6.help.conf
27.06.2007 20:12 0 E2CE757E.help.conf
28.06.2007 19:11 507 904 F2A18E69.commands.dll
27.06.2007 20:12 0 FD30B404.help.conf
               5 File(s) 580 333 bytes

Bock

2007-07-06 07:32

reporter   ~0014449

Last edited: 2007-07-06 07:33

huh... 4 days for debugging... It's problem simple in "<="

It's closed prouble of unclosed handle (how much you de rehashes, rehashes / 2 - blocking handle of files (zero lenght and blocking until unreal restarted)).

Now works fine, downloaded new file if it changes on remote point or keeping old in other case.

Tested in windows, now gonna test in linux.

Bock

2007-07-06 08:02

reporter   ~0014450

in linux works perfectly too.. :P

Grunt

2007-07-08 04:32

reporter   ~0014455

Works.

Bock

2007-07-14 05:05

reporter   ~0014485

fixed? yes

Issue History

Date Modified Username Field Change
2006-07-15 13:23 Bock New Issue
2006-07-15 13:24 Bock Note Added: 0012069
2006-07-15 13:26 Bock Note Edited: 0012069
2006-11-04 12:46 Bock Note Added: 0012583
2006-11-04 12:46 Bock File Added: remoteincl.txt
2006-11-24 15:32 syzop Note Added: 0012721
2006-11-24 15:32 syzop Status new => acknowledged
2006-11-24 15:32 syzop Relationship added child of 0003111
2007-04-16 04:48 Bock Note Added: 0013449
2007-07-02 08:42 Bock Note Added: 0014435
2007-07-06 07:32 Bock Note Added: 0014449
2007-07-06 07:33 Bock File Added: url.c.diff
2007-07-06 07:33 Bock Note Edited: 0014449
2007-07-06 08:02 Bock Note Added: 0014450
2007-07-08 04:32 Grunt Note Added: 0014455
2007-07-14 05:05 Bock Note Added: 0014485
2007-07-20 13:02 stskeeps QA => Not touched yet by developer
2007-07-20 13:02 stskeeps U4: Need for upstream patch => No need for upstream InspIRCd patch
2007-07-20 13:02 stskeeps Status acknowledged => closed
2007-07-20 13:02 stskeeps Resolution open => fixed