#1 2013-09-06 07:37:47

profh
Member
Registered: 2010-07-02
Posts: 159

CallBackPut crashed on windows 2008 server

the following call works fine on windows xp and win7, but it crashed on windows 2008 server:

    TSQLHttpClient(Client).CallBackPut('rpcname',RUTF8,rtnutf8); 

the actually position is in  TSQLRestClientURI.URI of mORMot.pas as follow:

......
DoRetry:
    if fSessionAuthentication=nil then
      Call.Url := url else
      Call.Url := fSessionAuthentication.ClientSessionSign(self,url);
    Call.Method := method;
    if SendData<>nil then
      Call.InBody := SendData^;
{$ifndef LVCL}
    if Assigned(fOnIdle) then begin
      if fBackgroundThread=nil then
        fBackgroundThread := TSynBackgroundThreadEvent.Create(OnIdle,OnBackgroundProcess);
      if not fBackgroundThread.AsynchRun(@Call) then
        Call.OutStatus := HTML_UNAVAILABLE;
    end else
{$endif}
    begin
      InternalURI(Call);              <<------------- crashed here
      if Call.OutStatus=HTML_NOTIMPLEMENTED then begin // InternalCheckOpen failed
        InternalClose;     // force recreate connection
        InternalURI(Call); // try request again
      end;
    end;
    result.Lo := Call.OutStatus;
    result.Hi := Call.OutInternalState;
    if Head<>nil then
      Head^ := Call.OutHead;
    if Resp<>nil then
      Resp^ := Call.OutBody;
    fLastErrorCode := Call.OutStatus;
    if (Call.OutStatus=HTML_TIMEOUT) and aRetryOnceOnTimeout then begin
      aRetryOnceOnTimeout := false;
{$ifdef WITHLOG}
      SQLite3Log.Add.Log(sllError,'% % returned "408 Request Timeout" -> RETRY',
        [method,url],self);
{$endif}
      goto DoRetry;
    end;
......

Offline

#2 2013-09-06 07:53:07

profh
Member
Registered: 2010-07-02
Posts: 159

Re: CallBackPut crashed on windows 2008 server

i just call it on windows 2003 server , it is ok.

Offline

#3 2013-09-06 08:55:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: CallBackPut crashed on windows 2008 server

Are you using the latest unstable version?

Is your Client instance really a TSQLHttpClient class?

Offline

#4 2013-09-06 10:45:08

profh
Member
Registered: 2010-07-02
Posts: 159

Re: CallBackPut crashed on windows 2008 server

yes, i am using the latest version, and the Client instance class is TSQLRestClientURI defined as follow:

    Client:TSQLRestClientURI;

Offline

#5 2013-09-06 11:23:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: CallBackPut crashed on windows 2008 server

So you should be able to write

Client.CallBackPut('rpcname',RUTF8,rtnutf8); 

I just run the regression tests on Windows Server 2008 R2, with no specific problem.,
They contain some CallBackPut() calls, AFAIK.

But I discovered some unexpected issues with the SynCrtSock.THttpServer socket-based server.
I fixed those, but I'm not expected that any problem occurs on client side.
See http://synopse.info/fossil/info/f643413f58
And this problem is also occurring on Windows Seven.
So it does not seem it is related to your issue.

What do you call a "crash"?
Which exception?
Stack trace?
Parameters values?
Please enable the logs, and send here some traces.

Which kind of server are your running?
http.sys? socket?
Run the server with administrator rights, to ensure it will use http.sys.
Or even better, register the URI explicitely - see the documentation about this.

Offline

#6 2013-09-06 13:32:15

profh
Member
Registered: 2010-07-02
Posts: 159

Re: CallBackPut crashed on windows 2008 server

thanks, after i recompile all units, it works now.

by the way, mORMots are really great, and do run fast...

thanks again.

Offline

#7 2013-09-06 14:20:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,205
Website

Re: CallBackPut crashed on windows 2008 server

Yes, full build is our friend.
smile

Thanks for the feedback and mORMot friendliness!

Offline

Board footer

Powered by FluxBB