Weird deadlock issue inside data modules

unfortunately, TRORemotable doesn’t support sessions

Hello. I still cannot found the freeze problem.
Continuing my tests, I decrease the load of thread’s execution (now I start one requisition per second to my server). Unfortunately I get another situation: some of my requisitions receive the following server returns:
- An exception was raised on the server: Session {xxx-xxx} could not be found.
- No connection available.
Debugging Rem source’s, I arrive until the uROBaseSCHelpers unit and use the uROBaseSCHelpers_DEBUG directive, and realize that the following text has been entered when the server error occurs:

Log('=== isTimeoutError='+BoolToStr(FBaseSuperConnection.isTimeoutError,True));

There is a server project configuration that may be causing this “timeout error”?

this line just checks case when data should be present but nothing was read because channel contains no data
client should send data but didn’t do this by some reasons

We have also had this problem with the GlobalNameSpace that the VCL use for streaming of DFM. What we decided to do was to create or own custom service class as a descendant of TRoRemotable, and copies almost all the code from TRoRemoteDataModule into it. This is a pain to maintain on new releases and I would appreciate if you could refactor you code a bit, so that you implements a TROCustomService=Class(TRoRemotable,) with the code (or most of it) you have in TRoRemoteDataModule. The TRoRemoteDataModule must of course continue to descend from TComponent,and then just have a TRoCustomService instance as a member, with necessary published properties. This way those who wants to use components can continue with that, and others that want to use code will be happy as well.

1 Like

you can override Destroy and BeforeDestruction methods of TRORemoteDataModule and don’t call GlobalNameSpace.BeginWrite; or call it after components will be destroyed.

I agree, this would most convenient to have. Or maybe it is already there and I did not look carefully enough.

Hello, is there a solution for this problem? I am reproducing this error, I have a deadlock in TDataModule.Create when I try to do GlobalNameSpace.BeginWrite.
I will appreciate any help you can give me.

Hi,

Can you give a bit more details: what RO/DA components are you using in this datamodule?
is this a usual datamodule or service (i.e. _Impl) ?

The application is running as Windows Service. We are using TROIndyTCPServer, TROBinMessage and the datamodule is a TRODataSnapModule.
RemObjects SDK Version 9.7.115.1441
Delphi 10.4

Thanks

Hi,

have to do it manually?

can you show call-stack with deadlock issue, pls?