This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Fomalhaut Weisszwerg
Recipients Fomalhaut Weisszwerg, christian.heimes, cstratak, rdecker, vstinner
Date 2017-11-30.09:31:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512034279.23.0.213398074469.issue31705@psf.upfronthosting.co.za>
In-reply-to
Content
I've got the same error on CentOS 7.4 on x86_64.

---
$ cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 
$ uname -a
Linux localhost.localdomain 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ strace -V
strace -- version 4.20
Copyright (c) 1991-2017 The strace developers <https://strace.io>.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Optional features enabled: (none)
$ cd Python-3.7.0a2
$ strace -v -s 128 -e trace=%network -o strace_py3_7_0a2_test_sha256.log ./python -m test -v test_socket -m test_sha256
== CPython 3.7.0a2 (default, Nov 28 2017, 16:16:49) [GCC 6.4.0]
== Linux-3.10.0-693.5.2.el7.x86_64-x86_64-with-centos-7.4.1708-Core little-endian
== cwd: /home/vagrant/sources/Python-3.7.0a2/build/test_python_10627
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_socket
test_sha256 (test.test_socket.LinuxKernelCryptoAPI) ... ERROR

======================================================================
ERROR: test_sha256 (test.test_socket.LinuxKernelCryptoAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vagrant/sources/Python-3.7.0a2/Lib/test/test_socket.py", line 5580, in test_sha256
    op.sendall(b"abc")
OSError: [Errno 126] Required key not available

----------------------------------------------------------------------
Ran 1 test in 0.006s

FAILED (errors=1)
test test_socket failed
test_socket failed

1 test failed:
    test_socket

Total duration: 98 ms
Tests result: FAILURE
$ cat strace_py3_7_0a2_test_sha256.log 
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=10628, si_uid=501, si_status=0, si_utime=0, si_stime=0} ---
socket(AF_CAN, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
socket(AF_CAN, SOCK_DGRAM|SOCK_CLOEXEC, 6) = -1 EPROTONOSUPPORT (Protocol not supported)
socket(AF_RDS, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = -1 EAFNOSUPPORT (Address family not supported by protocol)
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
bind(3, {sa_family=AF_ALG, sa_data="hash\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sha256\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 88) = 0
accept4(3, NULL, NULL, SOCK_CLOEXEC)    = 4
sendto(4, "abc", 3, 0, NULL, 0)         = -1 ENOKEY (Required key not available)
+++ exited with 2 +++
---


By contrast, I can get a expected result on Debian:

---
$ uname -a
Linux debian-server 4.13.0-1-amd64 #1 SMP Debian 4.13.13-1 (2017-11-16) x86_64 GNU/Linux
$ cd Python-3.7.0a2
$ strace -v -s 128 -e trace=%network -o strace.log ./python -m test -v test_socket -m test_sha256
== CPython 3.7.0a2 (default, Nov 29 2017, 18:47:33) [GCC 7.2.0]
== Linux-4.13.0-1-amd64-x86_64-with-debian-buster-sid little-endian
== cwd: /home/working/Python-3.7.0a2/build/test_python_21000
== CPU count: 24
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.07 [1/1] test_socket
test_sha256 (test.test_socket.LinuxKernelCryptoAPI) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK
1 test OK.

Total duration: 43 ms
Tests result: SUCCESS
$ cat strace.log
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21041, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
socket(AF_CAN, SOCK_RAW|SOCK_CLOEXEC, 1) = 3
socket(AF_CAN, SOCK_DGRAM|SOCK_CLOEXEC, 6) = -1 EPROTONOSUPPORT (Protocol not supported)
socket(AF_RDS, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = -1 EAFNOSUPPORT (Address family not supported by protocol)
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET6, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_SCTP) = 3
socket(AF_ALG, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
bind(3, {sa_family=AF_ALG, sa_data="hash\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sha256\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 88) = 0
accept4(3, NULL, NULL, SOCK_CLOEXEC)    = 4
sendto(4, "abc", 3, 0, NULL, 0)         = 3
recvfrom(4, "\272x\26\277\217\1\317\352AA@\336]\256\"#\260\3a\243\226\27z\234\264\20\377a\362\0\25\255", 512, 0, NULL, NULL) = 32
accept4(3, NULL, NULL, SOCK_CLOEXEC)    = 4
sendto(4, "a", 1, MSG_MORE, NULL, 0)    = 1
sendto(4, "b", 1, MSG_MORE, NULL, 0)    = 1
sendto(4, "c", 1, MSG_MORE, NULL, 0)    = 1
sendto(4, "", 0, 0, NULL, 0)            = 0
recvfrom(4, "\272x\26\277\217\1\317\352AA@\336]\256\"#\260\3a\243\226\27z\234\264\20\377a\362\0\25\255", 512, 0, NULL, NULL) = 32
+++ exited with 0 +++
---
History
Date User Action Args
2017-11-30 09:31:19Fomalhaut Weisszwergsetrecipients: + Fomalhaut Weisszwerg, vstinner, christian.heimes, cstratak, rdecker
2017-11-30 09:31:19Fomalhaut Weisszwergsetmessageid: <1512034279.23.0.213398074469.issue31705@psf.upfronthosting.co.za>
2017-11-30 09:31:19Fomalhaut Weisszwerglinkissue31705 messages
2017-11-30 09:31:18Fomalhaut Weisszwergcreate