#1 2021-10-07 13:11:53

HollosCs
Member
Registered: 2015-12-08
Posts: 56

mORMot 2 test stop

mormot.net.http missing in uses (test.orm.threads) and pboNoLocalHostEncrypt not found.


In running  (without debug Shift-Ctrl-F9) after this point the test program frozen:
3.3. Bidirectional remote connection:
  - Websockets protocols: 30,000 assertions passed  3.27ms


When I running it with debug (F9) go to end
2.8. Multi thread process:
  - Create thread pool: 1 assertion passed  1.43s
  - TRestServerDB: 7,302 assertions passed  452.60ms
     1=5722/s  2=24326/s  5=18965/s  10=9805/s  30=9738/s  50=12958/s
  - TRestClientDB: 7,301 assertions passed  564.82ms
     1=55550/s  2=27072/s  5=3885/s  10=3159/s  30=7907/s  50=5528/s
  - TCP sockets: 7,302 assertions passed  16.82s
     1=1796/s  2=1303/s  5=758/s  10=441/s  30=151/s  50=86/s
  - Windows API: 7,295 assertions passed  4.63s
     1=1407/s  2=1873/s  5=3604/s  10=5892/s  30=1568/s  50=1707/s
!  - Websockets: 69 / 6,892 FAILED  1m00
     1=3374/s  2=2111/s  5=887/s  10=464/s  30=129/s  50=20/s
  - Locked: 7,302 assertions passed  651.23ms
     1=63224/s  2=7978/s  5=3521/s  10=2549/s  30=6265/s  50=9674/s
  - Unlocked: 7,299 assertions passed  265.28ms
     1=55106/s  2=57864/s  5=11116/s  10=12996/s  30=9533/s  50=7720/s
  - Main thread: 7,301 assertions passed  323.05ms
     1=21400/s  2=13071/s  5=12652/s  10=9665/s  30=9987/s  50=7845/s
  - Background thread: 7,302 assertions passed  318.27ms
     1=7923/s  2=52069/s  5=15599/s  10=20035/s  30=9789/s  50=9435/s
  Total failed: 69 / 65,297  - Multi thread process FAILED  1m27


3.3. Bidirectional remote connection:
  - Websockets protocols: 30,000 assertions passed  3.32ms
  - Run http server: 2 assertions passed  1.40s
  - Soa callback on server side: 4,580 assertions passed  623us
  - Soa callback via json websockets: 6,898 assertions passed  892.52ms
  - Soa callback via binary websockets: 6,898 assertions passed  763.81ms
  - Relay start: 4 assertions passed  388.33ms
  - Relay soa callback via json websockets: 6,899 assertions passed  2.16s
  - Relay connection recreate: 1 assertion passed  164.30ms
  - Relay soa callback via binary websockets: 6,899 assertions passed  2.14s
  - Relay shutdown: 2 assertions passed  471.50ms
  - TRecordVersion: 20,068 assertions passed  311.47ms
  Total failed: 0 / 82,251  - Bidirectional remote connection PASSED  9.43s

Delphi 11, Windows 10 32

Last edited by HollosCs (2021-10-07 13:36:15)

Offline

#2 2021-10-07 15:50:07

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

Re: mORMot 2 test stop

Please retry with the latest version of the trunk.

And also please follow the forum rules, and post the console output into a gist, not directly in the forum.

Offline

#3 2021-10-07 19:16:32

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

Sorry for many code lines.

- Compile OK

- F9: Run to end with assertion error

!  - Websockets: 28 / 7,194 FAILED  40.27s
     1=3606/s  2=2284/s  5=1009/s  10=449/s  30=150/s  50=35/s

- Sfift-Ctrl-F9: Stop and froze (Ctrl-C to quit), but not assertion error. This is the last line that write:

 3.3. Bidirectional remote connection:
  - Websockets protocols: 30,000 assertions passed  2.54ms

Last edited by HollosCs (2021-10-07 19:16:53)

Offline

#4 2021-10-08 06:37:42

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

Re: mORMot 2 test stop

Which assertion?
I am not able to reproduce it here.

Sometimes, the Delphi IDE is not able to run the tests because its debugger reduces the multi-thread ability of the process it is debugging.
So running as stand-alone application is the way to go.

Please check the logs to see if there is an exception.

Offline

#5 2021-10-08 13:29:19

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

'Which assertion?'

!  - Websockets: 28 / 7,194 FAILED  40.27s
     1=3606/s  2=2284/s  5=1009/s  10=449/s  30=150/s  50=35/s

Maybe the first error not able write the ssreen.
In the log I found that:

EHttpServer {Message:"TWebSocketAsyncServerRest.WaitStarted timeout after 30 seconds []"}
 [Main] at 84851c mormot.net.server.pas THttpServerSocketGeneric.WaitStarted (1568)
  mormot.net.server.pas THttpServerSocketGeneric.WaitStarted (1568)
 mormot.rest.http.server.pas TRestHttpServer.Create (731)
 test.soa.network.pas TTestBidirectionalRemoteConnection.RunHttpServer (337)
...

Offline

#6 2021-10-09 08:12:20

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

Re: mORMot 2 test stop

There were two weird bugs, which occurred on some systems only:
1. the lock was not released when an exception was raised and ignored early.
2. the execution state of the HTTP server was not properly propagated.

Please report with the latest change.
There should be not lock, nor any exception raised during process.

Also ensure you have run the regression tests at least once with administrator rights to register the http.sys URIs.

Offline

#7 2021-10-09 11:37:34

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

Thanks your excellent job!
Test not freeze at all (nor F9, nor Shift-Ctrl-F9, nor debug, nor release).

Error in IDE:
!  - Mustache renderer: 1 / 156 FAILED  4.46ms

0000000000000000  ! fail  #102 Non-false sections have their value at the top of context, accessible as {{.}} or through the parent context. This gives a simple way to display content conditionally if a variable exists.  

and  '2.8. Multi thread process' section (couple of line)

0000000004A8F3FA  . fail  #6923 Rest.Add 
...
0000000004BE7C1A  ! fail  #7051 Duplicate ID 1591 for thread 39 and 2 
0000000004D7AD42  ! fail  #7052 Duplicate ID 1627 for thread 45 and 2 
...

Error in standalon only Mustache.

Offline

#8 2021-10-09 12:18:28

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

Re: mORMot 2 test stop

I am not able to reproduce it.
https://gist.github.com/synopse/e9d377c … 6be109db6a

What appears in the log?
I guess there is an exception on your system, for a non-obvious reason.

Did you run the tests once as Administrator, as I proposed?

Offline

#9 2021-10-10 11:56:36

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

Run test with latest version:

Standalone:

0000000000000001  ! fail  #102 Non-false sections have their value at the top of context, accessible as {{.}} or through the parent context. This gives a simple way to display content conditionally if a variable exists.
 test.core.data.pas TTestCoreProcess.MustacheRenderer (782)

inside Ide + error (maybe this is IDE limitation):

0000000003392DC0  " fail  #6944 Rest.Add 
 test.orm.threads.pas TTestMultiThreadProcessThread.Execute (268) 
...
00000000042B4BCB  ! fail  #6990 Duplicate ID 1687 for thread 44 and 4
 test.orm.threads.pas TTestMultiThreadProcess.Test (515) 
 test.orm.threads.pas TTestMultiThreadProcess.Websockets (593)

Offline

#10 2021-10-10 15:47:01

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

Re: mORMot 2 test stop

About the mustache problem, I am not able to reproduce the issue.
The test involved is the following:

    {
      "name": "Variable test",
      "desc": "Non-false sections have their value at the top of context,\naccessible as {{.}} or through the parent context. This gives\na simple way to display content conditionally if a variable exists.\n",
      "data": {
        "foo": "bar"
      },
      "template": "\"{{#foo}}{{.}} is {{foo}}{{/foo}}\"",
      "expected": "\"bar is bar\""
    },

Here it passes with no problem on FPC and all versions of Delphi I have. But I don't have Delphi 11...

I have enhanced the test loop to put the computed and expected values in the logs, to see what is wrong.

Offline

#11 2021-10-10 17:59:14

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

Run it again with latest (space different):

0000000000000001  ! fail  #102 " bar is bar "<>"bar is bar" 
Non-false sections have their value at the top of context, accessible as {{.}} or through the parent context. This gives a simple way to display content conditionally if a variable exists. 
...
 mormot.core.test.pas TSynTestCase.CheckUtf8 (752)
 test.core.data.pas TTestCoreProcess.MustacheRenderer (781)
...

Windows 10 64bit (10.0.19043) (cp 1252)
  12 x Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (x86)
Using mORMot 2.0.1
    TSqlite3LibraryStatic 3.36.0 with internal MM
Generated with: Delphi 11 Alexandria 32 bit Win compiler

Offline

#12 2021-10-11 09:08:42

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

Re: mORMot 2 test stop

I am not to reproduce the issue here with any version of Delphi I have (from Delphi 6 to 10.4.2).
Please delete all *.json files in the \data sub-folder of the tests and try again.

Offline

#13 2021-10-11 10:51:59

HollosCs
Member
Registered: 2015-12-08
Posts: 56

Re: mORMot 2 test stop

Nice catch, bingo! Error is gone!
Thanks, and sorry for your times!

Offline

#14 2021-10-11 15:59:19

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

Re: mORMot 2 test stop

So the reference json used on github as reference for the mORMot tests may have been broken when you downloaded it... sad

Offline

Board footer

Powered by FluxBB