Testing the latest swipl-devel

At this moment, testing the latest swipl-devel gives about 1 time in 2 the following failing test:

> 1/70 Test #70: ssl:ssl ..........................***Failed    4.15 sec
> % PL-Unit: ssl_options ....... done
> % PL-Unit: ssl_server Client error:
> ERROR: read_util:read_line_to_codes/2: Timeout in read from <stream>(0x563e7b405460)
> ERROR: Execution Aborted
> ERROR: /home/jdroo/github.com/SWI-Prolog/swipl-devel/packages/ssl/test_ssl.pl:242:
>         test server: failed
> 
>  done
> % PL-Unit: ssl_keys ..... done
> % PL-Unit: ssl_certificates ................................ done
> % PL-Unit: crypto_data_encrypt . done
> % 1 test failed
> % 45 tests passed
> ERROR: -g test_ssl: false
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe
> Warning: Socket error: Broken pipe

Never seen this. Platform details? OpenSSL version (we’ve seen new ssl versions breaking the interface several times)?

This was with

C:\Users\josde>wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         2
  Ubuntu-18.04    Stopped         1
$ uname -a
Linux LAPTOP-MSHQL1P6 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ openssl version
OpenSSL 1.1.1f  31 Mar 2020

Odd. Nothing SSL relevant has changed for quite a while and all installs and tests on Ubuntu work fine AFAIK. A firewall could make this happen, but then one would expect it to always fail. Some of the tests access public networking and may thus suffer from a poor network connection. These are by default disabled unless the environment variable SWIPL_PUBLIC_NETWORK_TESTS is set to true.

The way to get more detail is a little complicated for ssl. Starting from the build directory, run:

cd packages/ssl
../../src/swipl ../../../packages/ssl/test_ssl.pl
<banner>
?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: https_open . done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 47 tests passed
true.

At this moment the error doesn’t happen. It is only now and then that it happens and when it happens it is roughly one in two times.
What it currently gives is:

~/github.com/SWI-Prolog/swipl-devel/build/packages/ssl$ ../../src/swipl ../../../packages/ssl/test_ssl.pl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.28-27-g284ce507e)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

    CMake built from "/home/jdroo/github.com/SWI-Prolog/swipl-devel/build"

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 46 tests passed
true.

?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 46 tests passed
true.

?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 46 tests passed
true.

?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 46 tests passed
true.

?- test_ssl.
% PL-Unit: ssl_options ....... done
% PL-Unit: ssl_server . done
% PL-Unit: ssl_keys ..... done
% PL-Unit: ssl_certificates ................................ done
% PL-Unit: crypto_data_encrypt . done
% All 46 tests passed
true.

?- ^D
% halt
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning: Socket error: Broken pipe
Warning:Socket error: Broke n pipe
Warning: Socket error: Broken pipe

So there are only 46 tests instead of your 47 and when leaving with ^D it gives a lot of Socket error: Broke n pipe

I run the network test, so that explains the one more. I also get the Broken pipe messages. Guess the test needs to cleanup better, but otherwise this is harmless. Hard to tell. Might be something local. When it occurs you can run as above. That at least tells us precisely which tests fail.

1 Like

In the past 2 weeks the error did not occur.
There is however another error since the past few days:

 8/71 Test  #3: swipl:core ........................***Failed    5.60 sec
Running scripts from core ....................................................
ERROR: /home/jdroo/github.com/SWI-Prolog/swipl-devel/src/Tests/core/test_answer.pl:159:
        test hidden1: failed

ERROR: /home/jdroo/github.com/SWI-Prolog/swipl-devel/src/Tests/core/test_answer.pl:164:
        test hidden2: failed

ERROR: /home/jdroo/github.com/SWI-Prolog/swipl-devel/src/Tests/core/test_answer.pl:170:
        test hidden3: failed

Script /home/jdroo/github.com/SWI-Prolog/swipl-devel/src/Tests/core/test_answer.pl failed

I got the same. It is most probably the change in how free variables are printed on the toplevel. I am a bit surprised that no one else was seeing (and reporting) it.

Thanks for reporting. I’m traveling and working on a slow laptop, so I was too lazy to run the tests :frowning: Nothing wrong, but the test needed updating because singleton variables are now printed as _ and do not appear in the binding list produced by read_term/2.