FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.22k stars 213 forks source link

[Firebird 3.0] [Trace] fbtracemgr.exe doesn't trace changes #7518

Open wryczko opened 1 year ago

wryczko commented 1 year ago

Steps to reproduce:

Given:

Firebird 3.0 database setup:

When

Then

Expected behaviour:

Current behaviour:

Additional info

hvlad commented 1 year ago

When you run tracemgr not using remote protocol prefix, it runs in embedded mode (since Firebird 3). Also, note, it runs by interactive user account and in corresponding user Windows Session. Firebird server runs as service, I assume, thus it runs in system Windows Session (Session 0). Shared memory used by trace services uses different memory mappings in different Windows Sessions. Therefore trace manager from embedded process can't see events generated by attachments in Firebird service process, and vice versa. Simple workaround is to use remote protocol when attaching to the services manager when you need to trace attacments served by Firebird running as a service.

'local' connections works in Firebird 2.5 at it was not embedded, but uses XNET implicitly

It should be fixed by #7213

wryczko commented 1 year ago

Thank you @hvlad for a quick response! That makes sense. Do you think this might be the reason why FirebirdSql.Data.FirebirdClient has an issue with tracing? I explained it in more detail on another ticket https://github.com/FirebirdSQL/NETProvider/issues/1098

hvlad commented 1 year ago

Do you think this might be the reason why .NETProvider has an issue with tracing? I explained it in more detail on another ticket FirebirdSQL/NETProvider#1098

I'm not too familiar with .NETProvider, sorry. Try to run Firebird as application, not as a service and, if your application will be able to see traced events, then it is the same reason, else problem is elsewhere and needs additional investigation.