Open ghost opened 3 years ago
I see no firebird.exe anywhere in stack and by offsets I'm jugging that symbols in OdbcFb.dll were resolved wrongly. Besides the stack ends up in "Wait" functions that hardly can consume CPU.
This is the first time I've used procexp64.exe to resolve symbols on a stack dump and pdb was converted from a delphi map file so it's possible they aren't matching up but they look like they resolved correctly for our code (PC4LicSvc.exe) I also would have thought the wait would have been low cpu usage but saw that issue 5485 had a similar issue with cpu usage
What is taking much CPU, your application or Firebird server? If Firebird is taking a lot of CPU, then you have dumped the stack of the wrong process (i.e. your application instead of Firebird).
It's showing in our app so maybe I need to log this with fbodbc project (assuming stack dump is correct). Hopefully I'll also get a chance again soon to get more stack dumps to see if they all show exactly the same thing.
If anyone is interested. After downloading the source for fbodbc I'm hoping that the problem is the locking in the FB ODBC connect and that it is safe to simply add SafeConnect=N to the connection string to disable the critical section locking it's doing. We never share connections per thread so hopefully that'll sort the problem out.
This has occurred intermittently on several client sites and today was the first time I managed to get online to one and see what was happening.
Server was running Firebird 3.0.7. I do not know reproduction steps yet. The server was upgraded from 3.0.3 to 3.0.7 on 2021-11-11 and I do not know how many times they've experienced this high cpu usage scenario since then, today was first time in a week. I suspect the problem didn't happen under 3.0.3 as I don't think we had been told about it prior to that.
Using procexp64.exe I can see 2 threads running high cpu and both show the same stack dump which is as follows