Closed juarezr closed 4 years ago
This error is occurring when a test tries to create / drop the same table at the same time as another one.
I've added a atomic counter to the tests in the ~connection
~ statements
module, but it seems i've missed the need to add the same in the tests::params
module.
This is only a problem when running the tests of multiple implementations at the same time. The dynamic_linking
tests in the ci are actually running the linking
tests too because the linking
feature is in the default feature set. This can be fixed by adding --no-default-features
to the tests while i fix the deadlock to allow testing all features at the same time.
Edit: It was the statements
module, not connections
Great!
Just some considerations:
--no-default-features
may not work because --features
is given to cargo test
. Anyway `-- --test-threads 1
should work.For solving this we can temporarily workaround cargo test
as you suggested and revert latter after the test cases are improved.
After trying to fix the tests, it seems the problem is actually a deadlock when trying to create or delete a table at the same time another thread is trying to create or delete any other table, not only the same table, so the atomic fix did not work. With this in mind i think the only way to make it work is with the -- --test-threads 1
.
I had the ci set to use this before, but the cargo tarpaulin
was not working because of that, but it seems to work now.
After trying to fix the tests, it seems the problem is actually a deadlock when trying to create or delete a table at the same time another thread is trying to create or delete any other table, not only the same table, so the atomic fix did not work. With this in mind i think the only way to make it work is with the
-- --test-threads 1
.
FirebirdSQL restricts this kind of concurrent table creation?
I had the ci set to use this before, but the
cargo tarpaulin
was not working because of that, but it seems to work now.
Yes. Last run run test in sequence and it was successful.
@jairinhohw @fernandobatels ,
I need some help to figure out how to build rsfbclient
on Windows.
What I need to do for fixing this failure?
note: LINK : fatal error LNK1181: cannot open input file 'fbclient.lib'
@jairinhohw @fernandobatels ,
I need some help to figure out how to build
rsfbclient
on Windows.What I need to do for fixing this failure?
note: LINK : fatal error LNK1181: cannot open input file 'fbclient.lib'
I windows you need provide the fbclient.dll. You have installed all the firebird tool kit? I think this is a problem with the PATH env variable.
I have installed FirebirdSQL
v3.0.5 in a Github Windows server with the command:
choco install firebird -params '/SuperClassic /ClientAndDevTools'
Any guidance from here?
Not worked copying fbclient.lib
to build dir:
Coying C:\Program Files\Firebird\Firebird_3_0\lib\fbclient_ms.lib to D:\a\rsfbclient\rsfbclient\target\debug\deps\fbclient.lib
Coying C:\windows\system32\fbclient.dll to D:\a\rsfbclient\rsfbclient\target\debug\deps\fbclient.dll
= note: LINK : fatal error LNK1181: cannot open input file 'fbclient.lib'
https://github.com/juarezr/rsfbclient/runs/983032932?check_suite_focus=true
Our CI is working now with Windows. I think we can close this issue.
While building the CI in PR #31 a deadlock error occurred randomly.
It happened either while running cargo test or with
cargo tarpaulin
that triggerscargo test
for creating coverage.The backtrace is:
I can easily reproduce the problem in my local computer by running:
However, the error goes away when restricting parallel test execution to 1 thread by adding
--test-threads 1
tocargo test
throughtcargo tarpaulin
:Also I saw in the Github Action log that simply using
cargo test
can trigger the bug:I have concluded that is a deadlock bug because:
deadlock\nupdate conflicts with concurrent update
fbclient
wasn't thread safe sometime ago. I don't know the current status.I don't know what is the resolution that should be taken in this context. Maybe: