Contributor
This could potentially close #6709 but on the other hand it might result in truncated reports again. This would happen if the accumulated runtime of the registered shutdown functions in c3.php exceeds 10 * 0.25 = 2.5 sec which seems possible.
Maybe a bigger value for retries is necessary.
Merged
Member
I have no idea if 2.5s is enough, but it is quite low, raising it to 10s should be fine.
Maybe even to 30s, but if it happens every time, then it is an indication that your file locking is not working as expected.
Have you got any idea what's causing infinite loop?
Contributor Author
It runs fine for our tests at https://github.com/elabftw/elabftw, no infinite loops.
However, I tried to enable path coverage and ran out of memory during (un)serializing in the registered shutdown function in c3.php. In this case, there was an infinite loop because the shutdown function did not finish, resulting in "unfinished" tests. Hence, blocked reports.
I would argue that in this case, it is good to realize there is a problem. Even when it is not caused by the code that is tested.
Member
@MarcelBolten Your pull requests are marked as Draft.
Do you want me to merge and release them?
Contributor Author
Let me change $retries so the loop runs for 30s.
I will push it later today.
Contributor Author
Wait period is set to 30s ($retries = 120;).
Also, a Notification::warning() is added and will be shown when 30s are reached.
tests/data/claypit/c3.php is updated to version 2.9.0
| usleep(250_000); // 0.25 sec | ||
| } | ||
| if (file_get_contents($blockfilename) !== '0' && $retries === -1) { | ||
| Notification::warning( |
Contributor Author
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a RuntimeException() should/could be thrown.