[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-26 Thread tongxiaoge

tongxiaoge  added the comment:

We make SSL3 disappear to newly built dependencies, the test_ssl success. Refer 
to the modification of OpenSSL on fedoras (address: 
https://src.fedoraproject.org/rpms/openssl/tree/f34 )

```
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/*.dist
 
+# Next step of gradual disablement of SSL3.
+# Make SSL3 disappear to newly built dependencies.
+sed -i '/^\#ifndef OPENSSL_NO_SSL_TRACE/i\
+#ifndef OPENSSL_NO_SSL3\
+# define OPENSSL_NO_SSL3\
+#endif' $RPM_BUILD_ROOT/%{_prefix}/include/openssl/opensslconf.h
+
 %check
```

--
nosy: +sxt1001

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread Christian Heimes


Christian Heimes  added the comment:

You are using a OpenSSL build with custom, additional patches and your code is 
crashing somewhere in OpenSSL. It is likely that your patches are causing 
issue. I'm not going to provide free service for custom builds.

--
assignee: christian.heimes -> 
nosy: +christian.heimes
resolution:  -> third party
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


Change by tongxiaoge :


--
nosy:  -christian.heimes, sxt1001, thatiparthy, vstinner
Added file: https://bugs.python.org/file50512/python3.spec

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


tongxiaoge  added the comment:

I want to know whether this is an OpenSSL problem or a python 3 problem, and 
how to fix it? Thanks.
(The OpenSSL source package is large and has not been uploaded successfully. We 
can download it from the OpenSSL official website)

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50511/openssl-1.1.1-build.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


Change by tongxiaoge :


--
keywords: +patch
Added file: https://bugs.python.org/file50510/openssl-1.1.1-fips.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50509/openssl.spec

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50508/Makefile.certificate

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


tongxiaoge  added the comment:

Other information:
```
(gdb) f 2
#2  SSL_CTX_new (meth=0xe222cc30) at ssl/ssl_lib.c:3046
warning: Source file is more recent than executable.
3046ret->session_timeout = meth->get_timeout();
(gdb) l
3041ret->max_proto_version = 0;
3042ret->mode = SSL_MODE_AUTO_RETRY;
3043ret->session_cache_mode = SSL_SESS_CACHE_SERVER;
3044ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
3045/* We take the system default. */
3046ret->session_timeout = meth->get_timeout();
3047ret->references = 1;
3048ret->lock = CRYPTO_THREAD_lock_new();
3049if (ret->lock == NULL) {
3050SSLerr(SSL_F_SSL_CTX_NEW, ERR_R_MALLOC_FAILURE);
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-12-23 Thread tongxiaoge


tongxiaoge  added the comment:

Today, I upgraded my version of Python3 to 3.9.9. When running test_ ssl,It has 
a segment error again. The version of OpenSSL I use is 1.1.1l, here is part of 
the stack information (the complete one is too long):

```
(gdb) bt
#0  0x9e563830 in raise () from /lib64/libpthread.so.0
#1  
#2  SSL_CTX_new (meth=0x9076cc30) at ssl/ssl_lib.c:3046
#3  0x90799f38 in _ssl__SSLContext_impl () from 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/build/debug/build/lib.linux-aarch64-3.9-pydebug/_ssl.cpython-39d-aarch64-linux-gnu.so
#4  0x9079a3ac in _ssl__SSLContext () from 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/build/debug/build/lib.linux-aarch64-3.9-pydebug/_ssl.cpython-39d-aarch64-linux-gnu.so
#5  0x9e76d034 in tp_new_wrapper (self=0x907c0510 
, args=0x8ff4db90, kwds=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/typeobject.c:6247
#6  0x9e748ae8 in cfunction_call (func=0x907d60b0, args=, kwargs=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/methodobject.c:543
#7  0x9e6f18a8 in _PyObject_MakeTpCall 
(tstate=tstate@entry=0xaaadd8db33b0, callable=callable@entry=0x907d60b0, 
args=args@entry=0x8fcb45b0, nargs=nargs@entry=2, 
keywords=keywords@entry=0x0)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:191
#8  0x9e670fd8 in _PyObject_VectorcallTstate (kwnames=, 
nargsf=, args=, callable=, 
tstate=)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/cpython/abstract.h:116
#9  PyObject_Vectorcall (kwnames=, nargsf=, 
args=, callable=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/cpython/abstract.h:127
#10 call_function (tstate=0xaaadd8db33b0, pp_stack=0xc5ebf240, 
oparg=, kwnames=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Python/ceval.c:5075
#11 0x9e67a7e8 in _PyEval_EvalFrameDefault (tstate=, 
f=, throwflag=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Python/ceval.c:3487
#12 0x9e80c52c in _PyEval_EvalFrame (throwflag=0, f=0x8fcb4410, 
tstate=0x903e2050) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/internal/pycore_ceval.h:40
#13 _PyEval_EvalCode (tstate=0x903e2050, _co=0x908b3110, 
globals=, locals=locals@entry=0x0, args=, 
argcount=281473096927744, kwnames=0xaaadd8db33b0,
kwargs=0xc5ebf4a0, kwcount=281473343352832, kwstep=kwstep@entry=1, 
defs=0x903dd798, defcount=, kwdefs=0x0, closure=, name=, qualname=)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Python/ceval.c:4327
#14 0x9e6f13f0 in _PyFunction_Vectorcall (func=, 
stack=, nargsf=, kwnames=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:396
#15 0x9e6f1c5c in _PyObject_FastCallDictTstate 
(tstate=tstate@entry=0xaaadd8db33b0, callable=callable@entry=0x903e2050, 
args=args@entry=0xc5ebf4a0, nargsf=nargsf@entry=2,
kwargs=kwargs@entry=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:118
#16 0x9e6f2004 in _PyObject_Call_Prepend 
(tstate=tstate@entry=0xaaadd8db33b0, callable=callable@entry=0x903e2050, 
obj=obj@entry=0xaaadd8f8fe00, args=args@entry=0x8ff4ca00,
kwargs=kwargs@entry=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:489
#17 0x9e769960 in slot_tp_new (type=0xaaadd8f8fe00, 
args=0x8ff4ca00, kwds=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/typeobject.c:6994
#18 0x9e76d438 in type_call (type=0xaaadd8f8fe00, args=0x8ff4ca00, 
kwds=0x0) at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/typeobject.c:1014
#19 0x9e6f18a8 in _PyObject_MakeTpCall 
(tstate=tstate@entry=0xaaadd8db33b0, callable=callable@entry=0xaaadd8f8fe00, 
args=args@entry=0x8fcf7f08, nargs=nargs@entry=1, 
keywords=keywords@entry=0x0)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:191
#20 0x9e670fd8 in _PyObject_VectorcallTstate (kwnames=, 
nargsf=, args=, callable=, 
tstate=)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/cpython/abstract.h:116
#21 PyObject_Vectorcall (kwnames=, nargsf=, 
args=, callable=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/cpython/abstract.h:127
#22 call_function (tstate=0xaaadd8db33b0, pp_stack=0xc5ebf730, 
oparg=, kwnames=0x0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Python/ceval.c:5075
#23 0x9e67a7e8 in _PyEval_EvalFrameDefault (tstate=, 
f=, throwflag=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Python/ceval.c:3487
#24 0x9e66f024 in _PyEval_EvalFrame (throwflag=0, f=0x8fcf7d70, 
tstate=0xaaadd8db33b0) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/internal/pycore_ceval.h:40
#25 function_code_fastcall (tstate=0xaaadd8db33b0, co=, 
args=, nargs=1, globals=) at 
/home/abuild/rpmbuild/BUILD/Python-3.9.9/Objects/call.c:330
#26 0x9e6f55f0 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=1, 
args=0x8fcc6f48, callable=, tstate=)
at /home/abuild/rpmbuild/BUILD/Python-3.9.9/Include/cpython/abstract.h:118
#27 method_vectorcal

[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-09-22 Thread tongxiaoge


tongxiaoge  added the comment:

I installed OpenSSL version 1.1.1l and tested it again. The problem 
disappeared. It should be the reason why the OpenSSL version I used before is 
too low. The current issue is closed

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-09-16 Thread tongxiaoge


tongxiaoge  added the comment:

I'm sorry I haven't replied for a long time. I found that the OpenSSL version I 
use is 1.1.1f, which is probably caused by this. Today, I tried to upgrade 
Python 3 to 3.8.12, and the same problem occurred. I'll try again after 
upgrading the OpenSSL version tomorrow. If there are still problems, I'll give 
a reply at that time.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-08-09 Thread STINNER Victor


STINNER Victor  added the comment:

tongxiaoge: Without more information, we cannot help you. See Christian's 
questions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-19 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

ran on 3.9.6 branch with OpenSSL 1.1.1k  25 Mar 2021. I see this warning in the 
console. Please also see the attached log for full details.


/Users/srini/workspace/consulting/cpython/Lib/test/support/__init__.py:3105: 
ResourceWarning: unclosed 
  del self.thread
ResourceWarning: Enable tracemalloc to get the object allocation traceback

--
nosy: +thatiparthy
Added file: https://bugs.python.org/file50159/log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-11 Thread Christian Heimes


Christian Heimes  added the comment:

Python 3.9.5 and OpenSSL 1.1.1f are both outdated. Can you reproduce the 
problem with 3.9.6 and 1.1.1k?

Can you tel us more about your system (distribution, CPU arch, compiler) and 
provide a C stacktrace with debug symbols?

--
nosy:  -Guido.van.Rossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44598] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: Segmentation fault

2021-07-11 Thread tongxiaoge

New submission from tongxiaoge :

I have reproduced this problem in the latest versions of Python 3.8.11 and 
3.9.6. Python 3.8.5 does not have this problem, other versions are not tested. 
The failure log is as follows:
[  613s] 0:02:27 load avg: 4.66 Re-running failed tests in verbose mode
[  613s] 0:02:27 load avg: 4.66 Re-running test_ssl in verbose mode
[  613s] test_ssl: testing with 'OpenSSL 1.1.1f  31 Mar 2020' (1, 1, 1, 6, 15)
[  613s]   under 'Linux-5.4.6-x86_64-with-glibc2.2.5'
[  613s]   HAS_SNI = True
[  613s]   OP_ALL = 0x8054
[  613s]   OP_NO_TLSv1_1 = 0x1000
[  613s] test__create_stdlib_context (test.test_ssl.ContextTests) ... ok
[  613s] test_cert_store_stats (test.test_ssl.ContextTests) ... ok
[  613s] test_check_hostname (test.test_ssl.ContextTests) ... ok
[  613s] test_ciphers (test.test_ssl.ContextTests) ... ok
[  613s] test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: 
Segmentation fault
[  613s] 
[  613s] Current thread 0x7ff433b90740 (most recent call first):
[  613s]   File "/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/ssl.py", line 
483 in __new__
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/test_ssl.py", line 1126 in 
test_constructor
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/case.py", line 650 in 
_callTestMethod
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/case.py", line 693 in 
run
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/case.py", line 753 in 
__call__
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/suite.py", line 122 in 
run
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/suite.py", line 84 in 
__call__
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/suite.py", line 122 in 
run
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/suite.py", line 84 in 
__call__
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/unittest/runner.py", line 176 in 
run
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/support/__init__.py", line 
2030 in _run_suite
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/support/__init__.py", line 
2152 in run_unittest
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/test_ssl.py", line 4848 in 
test_main
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/runtest.py", 
line 234 in _runtest_inner2
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/runtest.py", 
line 270 in _runtest_inner
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/runtest.py", 
line 153 in _runtest
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/runtest.py", 
line 193 in runtest
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/main.py", line 
318 in rerun_failed_tests
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/main.py", line 
694 in _main
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/main.py", line 
637 in main
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/libregrtest/main.py", line 
715 in main
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/regrtest.py", line 46 in 
_main
[  613s]   File 
"/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/test/regrtest.py", line 50 in 

[  613s]   File "/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/runpy.py", line 
87 in _run_code
[  613s]   File "/home/abuild/rpmbuild/BUILD/Python-3.8.11/Lib/runpy.py", line 
194 in _run_module_as_main
[  613s] /var/tmp/rpm-tmp.lFeeM8: line 50: 15891 Segmentation fault  
WITHIN_PYTHON_RPM_BUILD= LD_LIBRARY_PATH=$(pwd)/build/debug 
$(pwd)/build/debug/python -m test.regrtest -wW --slowest -j0 -x test_distutils 
-x test_bdist_rpm -x test_gdb -x test_socket -x test_asyncio
[  613s] error: Bad exit status from /var/tmp/rpm-tmp.lFeeM8 (%check)

What is the reason for this? and is there a plan to fix it?

--
assignee: christian.heimes
components: SSL, Tests
messages: 397254
nosy: Guido.van.Rossum, christian.heimes, sxt1001, vstinner
priority: normal
severity: normal
status: open
title: test_constructor (test.test_ssl.ContextTests) ... Fatal Python error: 
Segmentation fault
type: crash
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com