rejetto forum

Testing build #218

rejetto · 28 · 23343

0 Members and 1 Guest are viewing this topic.

Kremlin

  • Guest
Well, i have a server thats shares over 3Tb to 180 people.  I've also experienced the memory bug and had the program always crashing over full memory usage, even being the server new and all. So finally i decided to backup to 214 and since then (2 months with only 2 or 3 reboots) no more problem. I also enforced some control over download accelerator but other than that 214 seems to work fine.


Offline TgwowgT

  • Occasional poster
  • *
    • Posts: 7
    • View Profile
Following the rejetto instructions, after test over the 216 and 217 i have done a regression at step of 10 (217->207->197->187). I have also tested the 192. All except the 187 are crashed after few days, also with d/l limitation and no more then 2-3 user active. Also the 187 have an huge memory occupation (50-100M) but no over this limits. With 2.2 version the memory occupation in the same condition is never more then 2-3M. The question is: what i can do to investigate about this catastrophic bug? May be is connected with the template ? (RAWR 0.11)


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
BIG BUG  utilib.pas

Quote
function removeArray(var src:TstringDynArray; toRemove:array of string):integer;
var
  i, l, ofs: integer;
  b: boolean;
begin
l:=length(src);
i:=0;                  //mars bug with i:=1
ofs:=0;
while i+ofs < l do     //mars bug with i+ofs <= l
//limits of src are [0..l-1] but not [1..l]
  begin
  b:=stringExists(src[i+ofs], toRemove);
  if b then inc(ofs);
  if i+ofs > l then break;
  if ofs > 0 then src:=src[i+ofs];
  if not b then inc(i);
  end;
setLength(src, l-ofs);
result:=ofs;
end; // removeArray


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
bug or not bug, it is necessary in main.pas to modif setitem() as

Quote
  procedure setItem();
  var
    f: Tfile;
    cmd: string;
    act: TfileAction;
    a:TStringDynArray;         //add by mars
   
    function get(prefix:string):TStringDynArray;
    begin result:=onlyExistentAccounts(split(';', parEx(prefix+FILEACTION2STR[act]))) end;

  begin
  result:='';
  f:=mainfrm.findFileByURL(p);
  if assigned(f) and f.isTemp() then freeAndNIL(f); // makes no sense to work in it
  if f = NIL then exit;
  cmd:=par(1);
  if cmd = 'hide' then
    include(f.flags, FA_HIDDEN);
  if cmd = 'hide tree' then
    include(f.flags, FA_HIDDENTREE);
  if cmd = 'no log' then
    include(f.flags, FA_DONT_LOG);
  if cmd = 'not as download' then
    if f.isFile() then include(f.flags, FA_DONT_COUNT_AS_DL)
    else f.dontCountAsDownloadMask:=or_(par(2), '*');
  for act:=low(act) to high(act) do           //mod by mars
    begin
    try
      a:=get('');
      if join(';',a) >'' then f.accounts[act]:=a;

    except end;
    try
      a:=get('add ');
      if join(';',a) >'' then adduniqueArray(f.accounts[act], a);

    except end;
    try
      a:=get('remove ');
      if join(';',a) >'' then removeArray(f.accounts[act], a);

    except end;
    try
      uniqueStrings(f.accounts[act]);
    except end;

    end;
  VFSmodified:=TRUE;
  mainfrm.filesBox.repaint();
  end; // setItem

a good syntax to the set item macro is

Quote
{.set item|folder
             |action=accounts list;
             |add action=accounts list;
             |remove action=accounts list;
.}

Not to forget to add a semicolon at the end of list otherwise the last account is not treated  in the action


Offline chthonic

  • Tireless poster
  • ****
    • Posts: 121
  • I own the copyright to this image... "Back Off!"
    • View Profile
BUG!!!!!! AHOY!!!!!!!!!!!!!!! seems the block spiders option is NOT working.. googlebots.com has been querying my port 443 all day and has been getting results!


this isnt supposed to happen! and yes I have the site passworded etc... using tog 3.0 with login page... is it possible to modify that option to auto-generate a robots.txt file?

[hmmm nope.. just noticed.. build 218 isnt always saving the options.. half the time it does.. half the time it doesnt. the template page keeps reverting back to the default.]

*****
hmmmmmmmmm???

how about an option to not only save options to a file but to load them as welll.. just live the vfs file.. that way if we ahve a system crash we dont ahve to reload all the settings manually... otherwise just save al teh options to the vfs as well.
« Last Edit: January 09, 2009, 11:45:50 PM by chthonic »


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
Huh? Do you mean the settings? I never need to load the settings manually, they always autoload for me, everytime.

Are you using Vista (UAC)?
http://worldipv6launch.org - The world is different now.


Offline chthonic

  • Tireless poster
  • ****
    • Posts: 121
  • I own the copyright to this image... "Back Off!"
    • View Profile
Huh? Do you mean the settings? I never need to load the settings manually, they always autoload for me, everytime.

Are you using Vista (UAC)?

"after" a system crash. the settings seem to reset themselves to default... I have always had that problem .. but its more noticeable with build 218. It seems as tho its saving the settings to registry instead of to a file even tho I told it to save to file.

what would be really useful is being able to store those settings to a "user chosen" location.... right now they get stored to a default location which is the HFS directory... its better to be able to save a backup copy in a specific location or to make it save settings as part of the VFS file rather than a separate INI file.

that way when I restore I only have to load "one" file. ... that file would remember the template etc...


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
chthonic

From your comments it seems as if you have frequent system crashes.  If this is the case I think you may have other problems with your system.

A simple way to ensure your settings and critical files are backed up is to simply create a folder, in a location of your choice, and copy into it your current vfs, tpl, and hfs.ini.  Update these files as needed.  They are now available when needed.

As MarkV, I don't have to manually re-load settings either.  Maybe you are using a buggy template that is causing you some problems or maybe your HFS isn't configured to save your settings at logoff and reload the settings and template your were using at logoff when you logon again.

As for the robots.txt file, I just created one (years ago) and added it to the root of my vfs.  No problems whatsoever.  Spiders can come knocking, and it's logged when they do,  but they don't get in.  There is also a stop spiders option in the HFS menu.
maverick


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
bug or not bug, it is necessary in main.pas to modif setitem() as
      a:=get('');
      if join(';',a) >'' then f.accounts[act]:=a;


if you make such change, people won't be able to set NO permission.
what's the reason why you suggest it?

instead, for the add/remove, adding and removing an empty set is just a null action. no reason to prevent it.

Quote
{.set item|folder
             |action=accounts list;
             |add action=accounts list;
             |remove action=accounts list;
.}

Not to forget to add a semicolon at the end of list otherwise the last account is not treated  in the action

ah, this is a bug.
fixed in next build.
final semicolon no more needed.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
BUG!!!!!! AHOY!!!!!!!!!!!!!!! seems the block spiders option is NOT working.. googlebots.com has been querying my port 443 all day and has been getting results!

so, as far as i got, this bug report is canceled, because your settings were lost, and so was the "stop spiders" option. right?

"after" a system crash. the settings seem to reset themselves to default...

with a crash, HFS should not save latest option changes, but keep the previous one.
So, if you started from a default position, made all the changes, and you got a crash, that's normal.
What you can do to avoid this situation is to manually save the options by the menu.

if instead you started HFS already configured, and then the crash reset your configuration, this is not normal.
It would be useful to know if the crash is only related to HFS or is system-wide.

Quote
I have always had that problem .. but its more noticeable with build 218.

consider most people don't have this problem, so we must try to find what makes your HFS working bad.

Quote
It seems as tho its saving the settings to registry instead of to a file even tho I told it to save to file.

HFS saves to registry by default, so if you lost your whole configuration and are back to the default, that's normal, just a consequence of the other problem.

Quote
what would be really useful is being able to store those settings to a "user chosen" location.... right now they get stored to a default location which is the HFS directory... its better to be able to save a backup copy in a specific location or to make it save settings as part of the VFS file rather than a separate INI file.

oh, event scripts are very nice feature :)
put this in your events file

[quit]
{.copy|hfs.ini|hfs.ini.bak.}


nice, but untested. let us know :)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
The bug can be easily reproducible,  simply leave the program run for some days, then download a file (in my case from 300 to 4000 M) with a dl accelerator (i use downthemall in firefox) and/or more then one file.
The memory size of HFS, mesured with Task Manager, grow to full the memory (> 500M, then the system hangs....).

can someone confirm this is enough to reproduce the bug?
or, can someone report the opposite, that you are in the same situation but don't get the bug?


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Quote
Quote from: mars on 09 January 2009, 01:05:34
bug or not bug, it is necessary in main.pas to modif setitem() as
      a:=get('');
      if join(';',a) >'' then f.accounts[act]:=a;


if you make such change, people won't be able to set NO permission.
what's the reason why you suggest it?

instead, for the add/remove, adding and removing an empty set is just a null action. no reason to prevent it.

You are completely right, not need of modification as long as the alone action (no add or del) is not specified.

I had to make an error during the first tests by putting the action to be made in more without the accounts (|access =|Add access = 1;2;3;4;5|del acess =2;3;5) what falsified my judgment.

Since, I use the best formula which combines all the possible actions:

Quote
<form method=post action="/~accesschange">
<form name='usersform' method='post' action='/~passchanger'>
  <select name="action">
    <option value="">action?</option>
    <option value="access">access</option>
    <option value="upload">upload</option>
    <option value="delete">delete</option>
  </select>
  <table>
  <tr><td align=left><b><font size="4">Folder</font></b><td><b><font size="4">: &nbsp;</font></b><span style="background-color: #000000"><input name=folder style="font-size:10pt; font-weight:bold; border:1px solid #88f" size="20" ></span>
  <tr><td align=left><b><font size="4">Authorization only for Accounts in list</font></b><td><b><font size="4">: &nbsp;</font></b><span style="background-color: #000000"><input name=replaceaccounts style="font-size:10pt; font-weight:bold; border:1px solid #88f" size="20" ></span>
  <tr><td align=left><b><font size="4">Add Authorization for Accounts in list</font></b><td><b><font size="4">: &nbsp;</font></b><span style="background-color: #000000"><input name=addaccounts style="font-size:10pt; font-weight:bold; border:1px solid #88f" size="20" ></span>
  <tr><td align=left><b><font size="4">Remove Authorization for Accounts in list</font></b><td><b><font size="4">: &nbsp;</font></b><span style="background-color: #000000"><input name=deleteaccounts style="font-size:10pt; font-weight:bold; border:1px solid #88f" size="20" ></span>
  <tr><td><font size="4">Click <a href="/~adminpanel">here</a> to return to Admin Panel.</font><td align=center><input type=submit value="Change">
  </tr></table>
</form>

A form to be sent to combination  with a page of action to be realized

Quote
Action={.switch|{.postvar|action.}|,|access,add,delete|{.postvar|action.}|You selected NO ACTION.}<p>
{.set item|{.postvar|folder.}
          |{.if|{.postvar|replaceaccounts.}|{.postvar|action.}={.postvar|replaceaccounts.};/if.}
          |{.if|{.postvar|addaccounts.}    |add {.postvar|action.}={.postvar|addaccounts.};/if.}
          |{.if|{.postvar|deleteaccounts.} |remove {.postvar|action.}={.postvar|deleteaccounts.};/if.}
          .}

It is even possible to use an external file to define specific rights for an account and a precise directory, to authorize or not the access to the modifications by the form.

The method is simple, it is enough to use a file of this type:

Quote
;List of the accounts having the rights of administration for directories
[access]
folder/subfolder1=rejetto;mars;silentpliz
folder2=@anonymous

[delete]
folder/subfolder2=rejetto;mars;
folder/upload=rejetto;silentpliz

[upload]
folder/upload=rejetto;silentpliz