[Koha-devel] Deadlock issues when running the tests in parallel, and maybe not only in the tests?

Mason James mtj at kohaaloha.com
Wed May 26 02:37:50 CEST 2021


On 26/05/21 3:45 am, 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/run.sh#L213
>
> And this is the place where KOHA_PROVE_CPUS is set.
> https://gitlab.com/koha-community/koha-testing-docker/-/blob/master/files/run.sh#L155
> 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.

hi Victor

it is known behaviour with the test suite, i think its caused by the tests mocking database tables in parallel - which is something that would not happen during normal/production usage

you can see that all the database tests are forced to run sequentially...

    prove -j ${KOHA_PROVE_CPUS} --rules='seq=t/db_dependent/**.t'

https://gitlab.com/koha-community/koha-testing-docker/-/blob/master/files/run.sh#L213



More information about the Koha-devel mailing list