[odb-users] Mutex may not be released Re: It was blocked by odb::sqlite::connection_pool_factory::create()

Sunny Sun sunny.sun at ringcentral.com
Thu Jul 25 05:04:40 EDT 2024


Hi,a bad news is the same issue happened again(odb 2.4).

I downloaded the source code here: https://git.codesynthesis.com/cgit/odb/odb/   and tried to understand:
In 2.5.0 we have
switched to C++11 threading API so maybe that will help.

But from the code I didn’t find out the exact change.
What apis/interfaces does odb switched?


Also, we found that once a win32 error is caught, subsequent attempts to create a connection will be blocked. There may be some causal relationship. Could you help analyze it?

Thank you in advance.



On Jul 2, 2024, at 20:55, Boris Kolpackov <boris at codesynthesis.com> wrote:


[EXTERNAL]


Sunny Sun <sunny.sun at ringcentral.com> writes:

Yes, we really got win32_exception() when call odb::sqlite::connection().

[...]

The above code throw win32_exception(), but not sure which line throw it.
We got 2 times win32_exception().

[...]

This issue only happened once, and we did not find out the root cause.

We only find this issue same began with the win32_exception().

It's hard to know what could be causing this without at least knowing
where the exception is thrown. I looked at all the throw sites and all
of them related to the Win32 thread synchronization primitives so it
is very strange.

One thing you can try is to update to the latest 2.5.0 pre-release
(which is currently at the release candidate stage). In 2.5.0 we have
switched to C++11 threading API so maybe that will help. For
instructions on how to build ODB 2.5.0, see:

https://urldefense.com/v3/__https://codesynthesis.com/products/odb/doc/install-build2.xhtml__;!!J-1DKIBqn-Pi!CBzDrRJmfUVqDFgoq0eBZiTxdmFt_Vcd-u9IPaxRRiHVrPPPWI76WWj2sds0sTtPkPjNvWGISba3n2uEtK_Q1A$

The latest status update for this release is here:

https://urldefense.com/v3/__https://codesynthesis.com/pipermail/odb-users/2024-June/005009.html__;!!J-1DKIBqn-Pi!CBzDrRJmfUVqDFgoq0eBZiTxdmFt_Vcd-u9IPaxRRiHVrPPPWI76WWj2sds0sTtPkPjNvWGISba3n2vwnoy1xg$



More information about the odb-users mailing list