#1 Re: mORMot 1 » THttpServer gives 'WSAETIMEDOUT' error when called from Chrome » 2019-09-17 10:29:27

My fault, after doin the tests you mention, I realiced that the exception was catched and only shows in debug or vervose_log. (data was returned ok even in the browser)
Maybe is the normal behabiour, just a little weird that only appears when accessing from web browser.


I write done the test you said anyway:

sample "04 - HTTP Client-Server" with client and server exe run ok, accessing via web browser shows security:
{
"errorCode":403,
"errorText":"Authentication Failed: Invalid signature (0)"
}

The regresion test failed till I disabled kaspersky antivirus, but the problem with the exception remains after disabling kaspersky even after disabling windows firewall.

Windows 10 64bit (10.0.15063) (cp1252)
    2 x Intel(R) Core(TM) i7-6820EQ CPU @ 2.80GHz (x86)
Using mORMot 1.18.5334
    TSQLite3LibraryStatic 3.29.0 with internal MM
Generated with: Delphi 10.3 Rio 32 bit compiler

Time elapsed for all tests: 2m32
Performed 2019-09-17 11:23:28 by admin on WIN10-POR104

Total assertions failed for all test suits:  0 / 41,844,695
! All tests passed successfully.


I've also tryed to set timeout and call to WebSocketsEnable like sample 31:
    TWebSocketServerRest(HttpServer).ServerKeepAliveTimeOut := 3000;
    { WebSocketServerRest := } HttpServer.WebSocketsEnable(ServerDB, '', False, False);

#2 Re: mORMot 1 » THttpServer gives 'WSAETIMEDOUT' error when called from Chrome » 2019-09-12 13:51:46

I'm facing the same exception on windows 10 whith last mormot, compiled with delph 10.3.:
ECrtSocket ("SockRecvLn [10060 WSAETIMEDOUT
When opening any web browser calling a server defined as useBidirSocket, for example:
    HttpServer := TSQLHttpServer.Create('8080',[ServerDB],'+',useBidirSocket);
If I open it from a client aplication or define it "HttpServer := TSQLHttpServer.Create('8080', [ServerDB])" it works ok.


Am I doing anything wrong or mising something?
Any Clue?

Thanks in advance.

#3 Re: mORMot 1 » 'External: SIGSEGV' sample "14 - Interface based services" » 2018-10-29 11:33:50

Lazarus 2.1.0 r59308 FPC 3.3.1 x86_64-win64-win32/win64
Free Pascal Compiler version 3.3.1-r39946 [2018/10/16] for x86_64
and
Newpacal:
Lazarus 1.9.0 re61a6e98658a657348e26974b930483b8f2b87c2 FPC 3.1.1 x86_64-win64-win32/win64
Free Pascal Compiler version 3.1.1-r18972f561935ea1317692f81bbc5f476a8852a3f [2018/08/13] for x86_64

I isntalled them via fpcupdeluxe
In both cases I got the same exception.

#4 mORMot 1 » Solve Generics Error compiling ThirdPartyDemos\George\REST-tester » 2018-10-26 09:07:30

fravemel
Replies: 2

Just in case it could help someone:

In windows 7 and windows 10 (NewPacal and Lazarus 2.1rc1 fpc 3.3.1) both and Mormot 1.8.
If you compile Samples\ThirdPartyDemos\George\REST-tester and get generics.collections.pas(506,51) Error: Generics without specialization cannot be used as a type for a variable .
Just replace generics-collections\src whit the one from https://github.com/maciej-izak/generics.collections and voila problem solved.

My sincere thansk an admiration to ab and mormot community.

#5 mORMot 1 » 'External: SIGSEGV' sample "14 - Interface based services" » 2018-10-26 08:37:10

fravemel
Replies: 3

First of all, to say that altoug I've never use Mormot nor lazarus in production it looks great, my sincere thanks an admiration to ab and mormot community.

Im begining with mormot and Lazarus and I'm trying to run the sample project "14 - Interface based services" under windows 7 and windows 10 (NewPacal and Lazarus 2.1rc1 fpc 3.3.1) both tested and Mormot 1.8,
the project option TargetOS was specified linux processor x86_64 I change both to default and it seems to run
fine but when i close server pressing enter I get the exception 'External: SIGSEGV'
in line 1064 of mORMotHttpServer.pas.

procedure TSQLHttpServer.HttpThreadTerminate(Sender: TThread);
var i: integer;
begin
  if self=nil then
    exit;
  fDBServersSafe.Enter;
  try
    for i := 0 to high(fDBServers) do
      fDBServers[i].Server.EndCurrentThread(Sender);
  finally
    fDBServersSafe.Leave;
  end;
end;   

   

As In SynCommons  IAutoLocker  interface line 16509 says
      // - warning: under FPC, you should assign its result to a local variable -
      // see bug http://bugs.freepascal.org/view.php?id=26602   
it seems this bug only affects IAutolocker.ProtectMethod but when if I replace de previos method for:

   
var i: integer;
    Lock: IAutoLocker;
begin
  if self=nil then
    exit;
  Lock:= fDBServersSafe;
  Lock.Enter;
  try
    for i := 0 to high(fDBServers) do
      fDBServers[i].Server.EndCurrentThread(Sender);
  finally
    Lock.Leave;
  end;
end;  

   

The exceptions disappears.

I'm I wrong or this bug is affecting  IAutoLocker.Leave?
Should this be done in every occurrence of fDBServersSafe in TSQLHttpServer?
pardon my ignorance, but Is it advisable to use mormot/lazarus on windows in production or it should be use with delphi or under linux?

Thanks in advance.

Board footer

Powered by FluxBB