Hmm, based on the line https://gitlab.com/koha-community/koha-testing-docker/-/blob/master/files/ru... I would think the ENV variable is actually set so maybe it is not this. Any more info on the tables it locks on? Regards, Joonas On 25/05/2021 18:54, Joonas Kylmälä wrote:
Hey Victor,
can you please check whether the $ENV{KOHA_TESTING} variable is set correctly in your CI setup, and if it is not, does it fix the issue? Please see the code in C4::Circulation::SendCirculationAlert(), it is the only place where we do manual db locking as far as I know. It is something we should fix by re-architecturing the message_queue database table for digest messages. However, I'm interested in knowing if the deadlocks now happen because of this and whether it is unit test specific issue because at least based on the comments in SendCirculationAlert() it appears to be so.
Regards, Joonas
On 25/05/2021 18:45, Victor Grousset/tuxayo wrote:
Hi :)
IIUC this is where the CI calls "prove" to run the tests https://gitlab.com/koha-community/koha-testing-docker/-/blob/master/files/ru...
And this is the place where KOHA_PROVE_CPUS is set. https://gitlab.com/koha-community/koha-testing-docker/-/blob/master/files/ru...
It's not set in ".env" file so it should use "nproc" and this calls "prove" with more than one thread.
Is that really the case? I tried locally use to "prove -j 4" and I'm getting deadlocks with the database after a few minutes.
And do these deadlock in tests mean that Koha can hit them while running in production?
I expect the tests to fail due to messing up with each other data but a deadlock is something else.
Cheers,
-- Joonas Kylmälä Tietojärjestelmäasiantuntija Kansalliskirjasto Kirjastoverkkopalvelut PL 15 (Unioninkatu 36) 00014 Helsingin yliopisto