View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Infinite loop and eventual crash - Page 2 - ProjeQtOr
 
 

Infinite loop and eventual crash

More
22 Oct 2023 15:30 #7 by grin

babynus post=36091 wrote: Hi,
cannot examine your dump.
 

Why is that? Were you able to download? To unpack? The first line is a json, direct result of PHP's stack_dump(), if you remove the variable from the beginning and the closing quote and semicolon at the end. It contains all the calls with all the parameters, in order. I would think everything is there what you could possibly need.

Please remove all other traces and keep only advised one.\

I do not understand. What should I remove, from where? What is "advised" and where? What are "traces"?
If you tell me, step by step, what would you like me to do I could do that, but I am not familiar with "traces", neither in projeqtor nor in php.

Possible, if you use debugLog for other traces, use traceLog for this one and set logging level to trace.

I will try to figure out how to set the logging level....

 

Please Log in or Create an account to join the conversation.

More
23 Oct 2023 18:34 #8 by babynus
If you post some logs, please post textual file.
Not code or weird method...

There are too many lines, I cannot read that logs.
I guess these are not projeqtor log traces...
Just change log level in administration page to debug, add debig trace as requested and sen us projeqtor log file.
 

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
25 Oct 2023 11:51 #9 by grin
I feel there is a language barrier.
First: when I set the log level in Administration >> Log files maintenance to either Debug or Trace, nothing gets logged.
Second: what I sent to you is the fulles possible trace of a PHP calling stack. Let me expand one entry from it.
STACK: 46:/home/projeqtor/projeqtor/model/PlannedWork.php 2282; PlannedWork::reverse
This is the 46th call on the stack of the recursive function PlannedWork::reverse, which is at the 2282nd line of model/PlannedWork.php.

Following is the arguments of the reverse() function:
string(3) "E#6"
This is the first argument, called $nodeId.

The second argument is called &$cp (ref to $cp I guess), which is a large array of tasks(?) ordered reversed by end date(?). A sample:
  array(3) {
  ["node"]=>  array(40) {
    ["S"]=>    array(4) {
      ["early"]=>      string(10) "2023-01-09"
      ["late"]=>      NULL
      ["before"]=>      array(0) {      }
      ["after"]=>      array(10) {
        [0]=>        string(6) "S-S#20"
        [1]=>        string(5) "S-S#5"
        [2]=>        string(5) "S-S#9"
        [3]=>        string(6) "S-S#10"
        [4]=>        string(6) "S-S#11"
        [5]=>        string(6) "S-S#12"
        [6]=>        string(6) "S-S#16"
        [7]=>        string(6) "S-S#17"
        [8]=>        string(6) "S-S#19"
        [9]=>        string(6) "S-S#21"
      }
    }
    ["E"]=>    array(4) {
      ["early"]=>      string(10) "2023-11-01"
      ["late"]=>      string(10) "2023-11-01"
      ["before"]=>      array(7) {
        [0]=>        string(5) "E#8-E"
        [1]=>        string(5) "E#9-E"
        [2]=>        string(6) "E#10-E"
        [3]=>        string(6) "E#11-E"
        [4]=>        string(6) "E#12-E"
        [5]=>        string(6) "E#16-E"
        [6]=>        string(6) "E#17-E"
      }
      ["after"]=>      array(0) {      }
    }
    ["S#3"]=>    array(4) {
      ["early"]=>      string(10) "2023-08-01"
      ["late"]=>      string(10) "2023-07-14"
      ["before"]=>      array(1) {
        [0]=>        string(6) "#21-#3"
      }
      ["after"]=>      array(1) {
        [0]=>        string(2) "#3"
      }
    }
    ["E#3"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-16"
      ["late"]=>      string(10) "2023-09-28"
      ["before"]=>      array(1) {
        [0]=>        string(2) "#3"
      }
      ["after"]=>      array(1) {
        [0]=>        string(5) "#3-#4"
      }
    }
    ["E#21"]=>    array(4) {
      ["early"]=>      string(10) "2023-08-01"
      ["late"]=>      string(10) "2023-07-14"
      ["before"]=>      array(1) {
        [0]=>        string(3) "#21"
      }
      ["after"]=>      array(1) {
        [0]=>        string(6) "#21-#3"
      }
    }
    ["S#20"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-16"
      ["late"]=>      string(10) "2023-09-28"
      ["before"]=>      array(0) {
      }
      ["after"]=>      array(1) {
        [0]=>        string(3) "#20"
      }
    }
    ["E#20"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-16"
      ["late"]=>      string(10) "2023-09-28"
      ["before"]=>      array(1) {
        [0]=>        string(3) "#20"
      }
      ["after"]=>      array(1) {
        [0]=>        string(6) "#20-#4"
      }
    }
    ["S#4"]=>    array(4) {
      ["early"]=>      string(10) "2023-09-28"
      ["late"]=>      string(10) "2023-09-29"
      ["before"]=>      array(2) {
        [0]=>        string(5) "#3-#4"
        [1]=>        string(6) "#20-#4"
      }
      ["after"]=>      array(1) {
        [0]=>        string(2) "#4"
      }
    }
    ["E#4"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-30"
      ["late"]=>      string(10) "2023-10-31"
      ["before"]=>      array(1) {
        [0]=>        string(2) "#4"
      }
      ["after"]=>      array(1) {
        [0]=>        string(5) "#4-#8"
      }
    }
    ["S#5"]=>    array(4) {
      ["early"]=>      string(10) "2023-09-28"
      ["late"]=>      string(10) "2023-08-10"
      ["before"]=>      array(0) {      }
      ["after"]=>      array(1) {
        [0]=>        string(2) "#5"
      }
    }
    ["E#5"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-04"
      ["late"]=>      string(10) "2023-08-08"
      ["before"]=>      array(1) {
        [0]=>        string(2) "#5"
      }
      ["after"]=>      array(3) {
        [0]=>        string(5) "#5-#6"
        [1]=>        string(5) "#5-#8"
        [2]=>        string(6) "#5-#13"
      }
    }
    ["S#6"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-05"
      ["late"]=>      string(10) "2023-08-09"
      ["before"]=>      array(1) {
        [0]=>        string(5) "#5-#6"
      }
      ["after"]=>      array(1) {
        [0]=>        string(2) "#6"
      }
    }
    ["E#6"]=>    array(4) {
      ["early"]=>      string(10) "2023-10-08"
      ["late"]=>      string(10) "2023-08-11"
      ["before"]=>      array(2) {
        [0]=>        string(2) "#6"
        [1]=>        string(6) "#6-#19"
      }
      ["after"]=>      array(4) {
        [0]=>        string(6) "#6-#14"
        [1]=>        string(6) "#6-#18"
        [2]=>        string(5) "#6-#7"
        [3]=>        string(5) "#6-#8"
      }
    }

And the last argument is the $idProject:
  ["TEST"]=>
  string(2) "OK"
}
  int(2)

The file is a serialized output of standard php debug_print_backtrace(), and I appended the code to deserialize it for you. From then on you have a structured object of the dump, which you can freely display. I have added a simple code to dump only the calls, but above I have showed you that you have the full stack trace of the endless recursive call.

Unfortunately I do not know what you call "E#13" or "S#15", as they do not seem to correlate with Activity id's, but you can see all the args, all the relations the reverse planner tried to resolve and failed, and you may able to spot (unlike me) what could possibly the bug in reverse planner which tries to infinitely recourse the args.

I would guess a developer only need to check one step (probably one from the end, like the above mentioned call 46, which is quite late in the recursion) to see where is the loop, and how reverse() could detect and prevent that.

Again, I am not php programmer, so it would take me much more time to reverse engineer PlannedWork.php than a developer of ProjeQtOr, that's why I kindly ask you to show the stack trace to a developer to make it possible to see the problem.

I do not know why the log does not log anything during this process, neither in Debug nor in Trace settings (and I have restored the original state of my modified code parts; it logs, for example, trace log from consistency checking): I only have apache telling me that it have crashed:
[Wed Oct 25 09:11:34.955321 2023] [php:error] [pid 1375439] [client 10.73.8.1:52436] PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in /home/projeqtor/projeqtor/model/persistence/SqlElement.php on line 786, referer: https://projeqtor/view/main.php
 

Please Log in or Create an account to join the conversation.

More
26 Oct 2023 09:41 #10 by babynus
The $cp contains the "nodes" of a "PERT" chart.
S#20 stands for start node of planning element 20
E#20 stands for end node of planning element 20
The #20 is the id of the planningelement referencing the item (activity, project, meeting, ...), that means where refType='Activiy' and refId=id of the Activity (for an activity)

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.056 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.