Issue 33701: test_datetime crashed (SIGSEGV) on Travis CI (original) (raw)

Created on 2018-05-30 22:34 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (10)
msg318216 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-30 22:34
https://travis-ci.org/python/cpython/jobs/385458840 0:00:11 load avg: 22.29 [ 23/415/1] test_datetime crashed (Exit code -11) Fatal Python error: Segmentation fault Current thread 0x00002b52f7326400 (most recent call first): File "/home/travis/build/python/cpython/Lib/test/datetimetester.py", line 4630 in test_check_arg_types File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 615 in run File "/home/travis/build/python/cpython/Lib/unittest/case.py", line 663 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 122 in run File "/home/travis/build/python/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/travis/build/python/cpython/Lib/unittest/runner.py", line 176 in run (...) Lib/test/datetimetester.py:4630: def test_check_arg_types(self): class Number: def __init__(self, value): self.value = value def __int__(self): return self.value for xx in [decimal.Decimal(10), <~~~ HERE decimal.Decimal('10.9'), Number(10)]: self.assertEqual(datetime(10, 10, 10, 10, 10, 10, 10), datetime(xx, xx, xx, xx, xx, xx, xx)) Hum, this bug looks like bpo-33627. Is it a bug in the _decimal module?
msg318273 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-05-31 09:10
On Wed, May 30, 2018 at 10:34:01PM +0000, STINNER Victor wrote: > Fatal Python error: Segmentation fault > Current thread 0x00002b52f7326400 (most recent call first): > > Is it a bug in the _decimal module? These kinds of errors are often completely random in the test suite: https://bugs.python.org/issue25276 https://bugs.python.org/issue25276#msg252113 One with test_decimal, one with test_email.
msg318274 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-05-31 09:23
How would #33627 support the theory that this is a bug in _decimal? As I read it, #33627 is in test_complex, which supports the "unrelated random" theory.
msg318307 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-31 13:26
> How would #33627 support the theory that this is a bug in _decimal? As I read it, #33627 is in test_complex, which supports the "unrelated random" theory. I'm not sure of anything. It's just a bet. I asked you to have a look, just in case you see something "obvious". My theory for bpo-33627: https://bugs.python.org/issue33627#msg318304 None of these bugs make any sense :-)
msg318311 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-31 13:52
> https://travis-ci.org/python/cpython/jobs/385458840 pythoninfo: Py_DEBUG: Yes (sys.gettotalrefcount() present) _decimal.__libmpdec_version__: 2.4.2 builtins.float.double_format: IEEE, little-endian builtins.float.float_format: IEEE, little-endian os.cpu_count: 48 os.environ[CC]: clang -pthread os.uname: posix.uname_result(sysname='Linux', nodename='travis-job-python-cpython-385458840.travisci.net', release='4.4.0-112-generic', version='#135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018', machine='x86_64') platform.architecture: 64bit ELF platform.platform: Linux-4.4.0-112-generic-x86_64-with-debian-jessie-sid sys.version: 3.7.0b4+ (heads/3.7:4f53e2a, May 30 2018, 00:26:26) [Clang 5.0.0 (tags/RELEASE_500/final)] sysconfig[CCSHARED]: -fPIC sysconfig[CC]: clang -pthread sysconfig[CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include -O3 sysconfig[CONFIG_ARGS]: '--with-pydebug' 'CC=clang' 'CFLAGS=-I/home/travis/multissl/openssl/1.1.0h/include -O3' 'LDFLAGS=-L/home/travis/multissl/openssl/1.1.0h/lib' sysconfig[HOST_GNU_TYPE]: x86_64-pc-linux-gnu sysconfig[OPT]: -g -O0 -Wall -Wstrict-prototypes sysconfig[PY_CFLAGS]: -Wno-unused-result -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include -O3 sysconfig[PY_CFLAGS_NODIST]: -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration sysconfig[PY_LDFLAGS]: -L/home/travis/multissl/openssl/1.1.0h/lib -L/home/travis/multissl/openssl/1.1.0h/lib sysconfig[Py_DEBUG]: 1 sysconfig[Py_ENABLE_SHARED]: 0
msg318312 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-31 13:54
> https://travis-ci.org/python/cpython/jobs/385458840 $ clang --version clang version 5.0.0 (tags/RELEASE_500/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/clang-5.0.0/bin ./configure --with-pydebug
msg318339 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-05-31 20:10
test_datetime passes here with nearly identical conditions as on the CI (Ubuntu 14.04, clang, same random seed): Using random seed 987845 Run tests in parallel using 4 child processes 0:00:01 load avg: 1.70 [ 1/415] test_html passed 0:00:01 load avg: 1.88 [ 2/415] test_unicode_file_functions passed 0:00:02 load avg: 1.88 [ 3/415] test_rlcompleter passed 0:00:03 load avg: 1.88 [ 4/415] test_xml_etree passed 0:00:03 load avg: 1.88 [ 5/415] test_codecencodings_kr passed 0:00:03 load avg: 1.88 [ 6/415] test_dummy_thread passed 0:00:04 load avg: 1.88 [ 7/415] test_source_encoding passed 0:00:05 load avg: 1.88 [ 8/415] test_code passed 0:00:05 load avg: 1.88 [ 9/415] test_curses passed 0:00:06 load avg: 1.88 [ 10/415] test_sys_setprofile passed 0:00:07 load avg: 2.05 [ 11/415] test_getopt passed 0:00:08 load avg: 2.05 [ 12/415] test_atexit passed 0:00:09 load avg: 2.05 [ 13/415] test_shlex passed 0:00:13 load avg: 2.13 [ 14/415] test_epoll passed 0:00:14 load avg: 2.13 [ 15/415] test_fileinput passed 0:00:26 load avg: 2.42 [ 16/415] test_embed passed 0:00:30 load avg: 2.54 [ 17/415] test_resource passed 0:00:31 load avg: 2.54 [ 18/415] test_augassign passed 0:00:36 load avg: 2.77 [ 19/415] test_gc passed -- running: test_io (33 sec) 0:00:38 load avg: 2.77 [ 20/415] test_multibytecodec passed -- running: test_io (35 sec) 0:00:38 load avg: 2.77 [ 21/415] test_contextlib passed -- running: test_io (35 sec) 0:00:39 load avg: 2.77 [ 22/415] test_code_module passed -- running: test_io (36 sec) 0:00:50 load avg: 2.80 [ 23/415] test_select passed -- running: test_unicodedata (36 sec), test_io (47 sec) 0:00:51 load avg: 2.90 [ 24/415] test_posixpath passed -- running: test_unicodedata (37 sec), test_io (48 sec) 0:01:05 load avg: 3.07 [ 25/415] test_capi passed -- running: test_unicodedata (50 sec), test_io (62 sec) 0:01:06 load avg: 3.07 [ 26/415] test_string passed -- running: test_unicodedata (52 sec), test_io (63 sec) 0:01:08 load avg: 3.06 [ 27/415] test_unicodedata passed (52 sec) -- running: test_io (65 sec) 0:01:09 load avg: 3.06 [ 28/415] test_iter passed -- running: test_io (66 sec) 0:01:09 load avg: 3.06 [ 29/415] test_largefile passed -- running: test_io (66 sec) 0:01:10 load avg: 3.06 [ 30/415] test_xxtestfuzz passed -- running: test_io (67 sec), test_datetime (30 sec) 0:01:10 load avg: 3.06 [ 31/415] test_pkg passed -- running: test_io (67 sec), test_datetime (31 sec) 0:01:11 load avg: 3.06 [ 32/415] test_datetime passed (30 sec) -- running: test_io (67 sec)
msg318340 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-31 20:17
> test_datetime passes here with nearly identical conditions as on the CI (Ubuntu 14.04, clang, same random seed): I tried to reproduce the issue on a Ubuntu Trusty *VM* using clang 5.0, using the same random seed: I failed to reproduce the bug. I ran test_numeric_tower with GCC USBAN, but there is no warning (I'm not sure that I enabled correctly USBAN!). I tested test_numeric_tower in Valgrind: no obvious memory error.
msg318343 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2018-05-31 20:44
A wild theory: Because of the new pervasive includes (-I/home/travis/multissl/openssl/1.1.0h/include -O3 -I/home/travis/multissl/openssl/1.1.0h/include) some module picks up a wrong header. But I just rebuilt https://travis-ci.org/python/cpython/jobs/385458840 and a different random seed is fine. If the includes are responsible, I'd expect the crash to be independent of the random seed.
msg321114 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-05 16:26
I didn't see the bug since at least one month. I close the issue.
History
Date User Action Args
2022-04-11 14:59:01 admin set github: 77882
2018-07-05 16:26:55 vstinner set status: open -> closedresolution: out of datemessages: + stage: resolved
2018-07-05 15:08:24 p-ganssle set nosy: + p-ganssle
2018-06-01 16:55:26 belopolsky set nosy: + belopolsky
2018-05-31 20:44:18 skrah set messages: +
2018-05-31 20:17:16 vstinner set messages: +
2018-05-31 20:10:57 skrah set messages: +
2018-05-31 13:54:19 vstinner set messages: +
2018-05-31 13:52:33 vstinner set messages: +
2018-05-31 13:26:35 vstinner set messages: +
2018-05-31 09:23:21 skrah set messages: +
2018-05-31 09:10:25 skrah set messages: +
2018-05-31 00:57:27 vstinner set versions: + Python 3.7, - Python 3.8
2018-05-30 22:34:01 vstinner create