Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB lock issue durring unit tests #26741

Closed
smuzaffar opened this issue May 10, 2019 · 12 comments
Closed

DB lock issue durring unit tests #26741

smuzaffar opened this issue May 10, 2019 · 12 comments

Comments

@smuzaffar
Copy link
Contributor

@ggovi , during PR tests of cms-data/RecoBTag-Combined#23 unit test testConditionDatabase_2 failed due to locking issue [a]. I think issue is that there are two tests ( https://github.com/cms-sw/cmssw/search?q=cms_conditions_3.db&unscoped_q=cms_conditions_3.db ) which are using cms_conditions_3.db file. Can you please provide a fix for this?

[a]

===== Test "testConditionDatabase_2" ====
> Connecting with db in sqlite_file:cms_conditions_3.db
CORAL/RelationalPlugins/sqlite Error SQLiteStatement::finalize 5 database is locked
CORAL/RelationalPlugins/sqlite Error SQLiteStatement::execute 5 database is locked
ERROR: database is locked ( CORAL : "SQLiteStatement::execute" from "CORAL/RelationalPlugins/sqlite" )

---> test testConditionDatabase_2 had ERRORS
 
^^^^ End Test testConditionDatabase_2 ^^^^
@cmsbuild
Copy link
Contributor

A new Issue was created by @smuzaffar Malik Shahzad Muzaffar.

@davidlange6, @Dr15Jones, @smuzaffar, @fabiocos, @kpedro88 can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor Author

assign db

@cmsbuild
Copy link
Contributor

New categories assigned: db

@ggovi you have been requested to review this Pull request/Issue and eventually sign? Thanks

@fabiocos
Copy link
Contributor

Any idea why is this appearing just now? This code seems untouched since a while...

@smuzaffar
Copy link
Contributor Author

This is just race condition. If both tests run on same time then there is a chance that there will be lock on the local db file.

@fabiocos
Copy link
Contributor

@smuzaffar yes, I understand that, the point is why it starts to systematically hit us now...

@smuzaffar
Copy link
Contributor Author

is it very frequent now?

@smuzaffar
Copy link
Contributor Author

the second test was added on Jan 23 this year ( #25722 )

@fabiocos
Copy link
Contributor

well I would say we are seeing it in several PR tests, while this was not the case until recently. But the IB looks clean from this point of view, are unit tests run there differently?

@smuzaffar
Copy link
Contributor Author

No, unit tests in IBs are run the same way. Only thing is that in IBs we run all tests that is why there is less chance of collision.

@smuzaffar
Copy link
Contributor Author

#26762 should fix this issue

@smuzaffar
Copy link
Contributor Author

this has been fixes via #26762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants