Re: [openssl-users] openssl-1.1.1 make test error on Red Hat Enterprise Linux 6.1.

2018-08-01 Thread Viktor Dukhovni



> On Aug 1, 2018, at 4:42 AM, Matt Caswell  wrote:
> 
> Please can you submit this problem as a github issue:
> 
> https://github.com/openssl/openssl/issues

We certainly need to raise the buffer size, for example on MacOS/X
and FreeBSD errno 47 has a (coincidentally) 47-byte long error message:

  $ perl -le '
for ($i = 0; $i < 256; ++$i) {
  $! = $i; $l = length("$!");
  if ($l > $m) { $m = $l; $n = $i; }
  last if ($i eq "$!");
}
$! = $n; print "$i: $n: $m: $!";
' 
  97[*]: 47: 47: Address family not supported by protocol family

This will also be affected by the locale.  I'd set the limit
generously at 128 bytes.

-- 
-- 
Viktor.

[*] FreeBSD has 96 error strings, while running the same Perl script on
MacOS/X demonstrates 106 error strings.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


Re: [openssl-users] openssl-1.1.1 make test error on Red Hat Enterprise Linux 6.1.

2018-08-01 Thread Matt Caswell
Please can you submit this problem as a github issue:

https://github.com/openssl/openssl/issues

Thanks

Matt

On 01/08/18 09:14, 市來敏 / ICHIKI,BIN wrote:
> Hello, everyone. My name is Bin Ichiki.
> 
> I'm trying to install openssl-1.1.1-pre8 on Red Hat Enterprise Linux 
> 6.1(RHEL6.1).
> 
> But when I ran “make test”, test failed as following log:
> 
> Test Summary Report
> ---
> ../test/recipes/04-test_err.t(Wstat: 256 Tests: 1 Failed: 
> 1)
>   Failed test:  1
>   Non-zero exit status: 1
> Files=148, Tests=1340, 270 wallclock secs ( 1.70 usr  0.17 sys + 239.19 cusr 
> 20.62 csys = 261.68 CPU)
> Result: FAIL
> 
> 
> I think, if an errno is changed other than EINVAL after the function 
> ERR_get_error was executed, this test will fail.
> 
> Therefore I investigated the place where an errno is changed.
> 
> The follows are back trace from the processes that changed the errno.
> 
> 
> (gdb) bt
> #0  0x0081b505 in __xpg_strerror_r () from /lib/libc.so.6
> #1  0x002e2ec0 in openssl_strerror_r (errnum=11, buf=0x3d4d00 "", buflen=32) 
> at crypto/o_str.c:234
> #2  0x002b0460 in build_SYS_str_reasons () at crypto/err/err.c:217
> #3  0x002b07a5 in ERR_load_ERR_strings () at crypto/err/err.c:327
> #4  0x002b1ba3 in err_load_crypto_strings_int () at crypto/err/err_all.c:46
> #5  0x002d2fcc in ossl_init_load_crypto_strings () at crypto/init.c:182
> #6  0x002d2fa2 in ossl_init_load_crypto_strings_ossl_ () at crypto/init.c:170
> #7  0x003e3920 in pthread_once () from /lib/libpthread.so.0
> #8  0x0033597b in CRYPTO_THREAD_run_once (once=0x3d5cc4, init=0x2d2f8b 
> ) at crypto/threads_pthread.c:113
> #9  0x002d36b6 in OPENSSL_init_crypto (opts=2, settings=0x0) at 
> crypto/init.c:584
> #10 0x002b156b in ERR_get_state () at crypto/err/err.c:702
> #11 0x002b0d95 in get_error_values (inc=1, top=0, file=0x0, line=0x0, 
> data=0x0, flags=0x0) at crypto/err/err.c:483
> #12 0x002b0ba7 in ERR_get_error () at crypto/err/err.c:429
> 
> 
> A version of glibc in RHEL6 is 2.12.
> 
> The strerror_r function (XSI-compliant) in glibc 2.12 changes errno.
> 
> When errnum parameter is 11, the error description string is "Resource 
> temporarily unavailable".
> 
> The area size for this string is 33. but buflen parameter is 32. The buffer 
> area is insufficient.
> 
> So errno is set to ERANGE and  04-test_err.t fails.
> 
> Will be this problem fixed until OpenSSL 1.1.1 is released?
> 
> 
> Thank you.
> 
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users


[openssl-users] openssl-1.1.1 make test error on Red Hat Enterprise Linux 6.1.

2018-08-01 Thread 市來敏 / ICHIKI,BIN
Hello, everyone. My name is Bin Ichiki.

I'm trying to install openssl-1.1.1-pre8 on Red Hat Enterprise Linux 
6.1(RHEL6.1).

But when I ran “make test”, test failed as following log:

Test Summary Report
---
../test/recipes/04-test_err.t(Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=148, Tests=1340, 270 wallclock secs ( 1.70 usr  0.17 sys + 239.19 cusr 
20.62 csys = 261.68 CPU)
Result: FAIL


I think, if an errno is changed other than EINVAL after the function 
ERR_get_error was executed, this test will fail.

Therefore I investigated the place where an errno is changed.

The follows are back trace from the processes that changed the errno.


(gdb) bt
#0  0x0081b505 in __xpg_strerror_r () from /lib/libc.so.6
#1  0x002e2ec0 in openssl_strerror_r (errnum=11, buf=0x3d4d00 "", buflen=32) at 
crypto/o_str.c:234
#2  0x002b0460 in build_SYS_str_reasons () at crypto/err/err.c:217
#3  0x002b07a5 in ERR_load_ERR_strings () at crypto/err/err.c:327
#4  0x002b1ba3 in err_load_crypto_strings_int () at crypto/err/err_all.c:46
#5  0x002d2fcc in ossl_init_load_crypto_strings () at crypto/init.c:182
#6  0x002d2fa2 in ossl_init_load_crypto_strings_ossl_ () at crypto/init.c:170
#7  0x003e3920 in pthread_once () from /lib/libpthread.so.0
#8  0x0033597b in CRYPTO_THREAD_run_once (once=0x3d5cc4, init=0x2d2f8b 
) at crypto/threads_pthread.c:113
#9  0x002d36b6 in OPENSSL_init_crypto (opts=2, settings=0x0) at 
crypto/init.c:584
#10 0x002b156b in ERR_get_state () at crypto/err/err.c:702
#11 0x002b0d95 in get_error_values (inc=1, top=0, file=0x0, line=0x0, data=0x0, 
flags=0x0) at crypto/err/err.c:483
#12 0x002b0ba7 in ERR_get_error () at crypto/err/err.c:429


A version of glibc in RHEL6 is 2.12.

The strerror_r function (XSI-compliant) in glibc 2.12 changes errno.

When errnum parameter is 11, the error description string is "Resource 
temporarily unavailable".

The area size for this string is 33. but buflen parameter is 32. The buffer 
area is insufficient.

So errno is set to ERANGE and  04-test_err.t fails.

Will be this problem fixed until OpenSSL 1.1.1 is released?


Thank you.

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users