Title: Segmentation fault during the test__xxsubinterpreters test · Issue #100981 · python/cpython · GitHub
Open Graph Title: Segmentation fault during the test__xxsubinterpreters test · Issue #100981 · python/cpython
X Title: Segmentation fault during the test__xxsubinterpreters test · Issue #100981 · python/cpython
Description: Crash report When running the testsuite one test is intermittently failing with a segmentation fault. The test in question is test=test__xxsubinterpreters and the crash seems to be GIL related. I am able to consistently reproduce the cra...
Open Graph Description: Crash report When running the testsuite one test is intermittently failing with a segmentation fault. The test in question is test=test__xxsubinterpreters and the crash seems to be GIL related. I a...
X Description: Crash report When running the testsuite one test is intermittently failing with a segmentation fault. The test in question is test=test__xxsubinterpreters and the crash seems to be GIL related. I a...
Opengraph URL: https://github.com/python/cpython/issues/100981
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Segmentation fault during the test__xxsubinterpreters test","articleBody":"# Crash report\r\n\r\nWhen running the testsuite one test is intermittently failing with a segmentation fault. The test in question is test=test__xxsubinterpreters and the crash seems to be GIL related. I am able to consistently reproduce the crash on my environment where I am building Python inside a chroot (/proc, /sys, and /dev are \"mount --bind\"ed from the host system).\r\n\r\nOn a freshly built with GCC 12.2.0 Python 3.11 with the following configure options:\r\n```\r\nCFLAGS='-pipe -O2 -ggdb -fomit-frame-pointer'\r\nexport CFLAGS\r\nCXXFLAGS='-pipe -ggdb -O0'\r\nexport CXXFLAGS\r\nFFLAGS='-pipe -ggdb -O0 '\r\nexport FFLAGS\r\nFCFLAGS='-pipe -ggdb -O0 '\r\nexport FCFLAGS\r\nLDFLAGS=\r\nexport LDFLAGS\r\n/home/galaxy/rpm-work/BUILD/Python-3.11.1/configure \\\r\n --enable-ipv6 \\\r\n --with-computed-gotos \\\r\n --with-dbmliborder=gdbm:ndbm:bdb \\\r\n --with-system-expat \\\r\n --without-system-ffi \\\r\n --without-system-libmpdec \\\r\n --enable-loadable-sqlite-extensions \\\r\n --without-dtrace \\\r\n --with-lto \\\r\n --without-ensurepip \\\r\n --with-pkg-config=yes \\\r\n --without-static-libpython \\\r\n --with-tzpath=/usr/share/zoneinfo \\\r\n --with-openssl-rpath=no \\\r\n --with-ssl-default-suites=openssl \\\r\n --disable-optimizations \\\r\n --with-pydebug\r\n```\r\n\r\nThis is the testsuite output with just the test in question:\r\n```\r\ngalaxy@apollo:~/rpm-work/BUILD/Python-3.11.1 $ LD_LIBRARY_PATH=/home/galaxy/rpm-work/BUILD/Python-3.11.1/build/debug build/debug/python -m test -j4 --slowest --timeout=1800 -W -F test__xxsubinterpreters\r\n0:00:00 load avg: 0.05 Run tests in parallel using 4 child processes (timeout: 30 min, worker timeout: 35 min)\r\n0:00:08 load avg: 0.65 [ 1/1] test__xxsubinterpreters crashed (Exit code -11)\r\nFatal Python error: Segmentation fault\r\n\r\nThread 0x00007effcf9a2468 (most recent call first):\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/test__xxsubinterpreters.py\", line 283 in clean_up_interpreters\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/test__xxsubinterpreters.py\", line 299 in tearDown\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/case.py\", line 584 in _callTearDown\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/case.py\", line 626 in run\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/case.py\", line 678 in __call__\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 122 in run\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 84 in __call__\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 122 in run\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 84 in __call__\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 122 in run\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/suite.py\", line 84 in __call__\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/unittest/runner.py\", line 217 in run\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/support/__init__.py\", line 1095 in _run_suite\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/support/__init__.py\", line 1221 in run_unittest\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest.py\", line 276 in _test_module\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest.py\", line 312 in _runtest_inner2\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest.py\", line 355 in _runtest_inner\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest.py\", line 214 in _runtest\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest.py\", line 260 in runtest\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/runtest_mp.py\", line 90 in run_tests_worker\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/main.py\", line 722 in _main\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/main.py\", line 701 in main\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/libregrtest/main.py\", line 763 in main\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/regrtest.py\", line 43 in _main\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/test/regrtest.py\", line 47 in \u003cmodule\u003e\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/runpy.py\", line 88 in _run_code\r\n File \"/home/galaxy/rpm-work/BUILD/Python-3.11.1/Lib/runpy.py\", line 198 in _run_module_as_main\r\n\r\nExtension modules: _testcapi, _xxsubinterpreters (total: 2)\r\nKill \u003cTestWorkerProcess #2 running test=test__xxsubinterpreters pid=1282561 time=8.8 sec\u003e process group\r\nKill \u003cTestWorkerProcess #3 running test=test__xxsubinterpreters pid=1282560 time=8.8 sec\u003e process group\r\nKill \u003cTestWorkerProcess #4 running test=test__xxsubinterpreters pid=1282564 time=8.8 sec\u003e process group\r\n\r\n== Tests result: FAILURE ==\r\n\r\n10 slowest tests:\r\n\r\n1 test failed:\r\n test__xxsubinterpreters\r\n\r\nTotal duration: 9.0 sec\r\nTests result: FAILURE\r\ngalaxy@apollo:~/rpm-work/BUILD/Python-3.11.1 $\r\n```\r\n\r\n# Error messages\r\n\r\nI acquired a core dump and under gdb it looks as follows:\r\n```\r\nReading symbols from python...\r\n[New LWP 1282606]\r\n[New LWP 1282563]\r\n[New LWP 1282568]\r\nCore was generated by `/home/galaxy/rpm-work/BUILD/Python-3.11.1/build/debug/python -u -m test.regrtes'.\r\nProgram terminated with signal SIGSEGV, Segmentation fault.\r\n#0 0x00007effcf93b6a5 in __syscall4 (n=14, a1=2, a2=139637136696304, a3=0, a4=8)\r\n at ./arch/x86_64/syscall_arch.h:38\r\n38\t\t__asm__ __volatile__ (\"syscall\" : \"=a\"(ret) : \"a\"(n), \"D\"(a1), \"S\"(a2),\r\n[Current thread is 1 (LWP 1282606)]\r\n(gdb) info threads\r\n Id Target Id Frame\r\n* 1 LWP 1282606 0x00007effcf93b6a5 in __syscall4 (n=14, a1=2, a2=139637136696304, a3=0, a4=8)\r\n at ./arch/x86_64/syscall_arch.h:38\r\n 2 LWP 1282563 0x00007effcf545221 in validate_list (head=0x7effce211d10,\r\n flags=collecting_clear_unreachable_clear)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Modules/gcmodule.c:397\r\n 3 LWP 1282568 __cp_end () at src/thread/x86_64/syscall_cp.s:29\r\n(gdb) bt\r\n#0 0x00007effcf93b6a5 in __syscall4 (n=14, a1=2, a2=139637136696304, a3=0, a4=8)\r\n at ./arch/x86_64/syscall_arch.h:38\r\n#1 0x00007effcf93b74c in __restore_sigs (set=0x7effcdee23f0) at src/signal/block.c:43\r\n#2 0x00007effcf93ba59 in raise (sig=11) at src/signal/raise.c:11\r\n#3 0x00007effcf54a6fd in faulthandler_fatal_error (signum=11)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Modules/faulthandler.c:385\r\n#4 \u003csignal handler called\u003e\r\n#5 0x00007effcf47e945 in drop_gil (ceval=0x7effcf855060 \u003c_PyRuntime+352\u003e, ceval2=0x7effce07a1c0,\r\n tstate=0x7effce3ddaa0) at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Python/ceval_gil.h:169\r\n#6 0x00007effcf47f3a3 in _PyEval_ReleaseLock (tstate=0x7effce3ddaa0)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Python/ceval.c:448\r\n#7 0x00007effcf50d4ef in _PyThreadState_DeleteCurrent (tstate=0x7effce3ddaa0)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Python/pystate.c:1126\r\n#8 0x00007effcf5c95df in thread_run (boot_raw=0x7effcdf8e750)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Modules/_threadmodule.c:1098\r\n#9 0x00007effcf52cee7 in pythread_wrapper (arg=0x7effce3dd380)\r\n at /home/galaxy/rpm-work/BUILD/Python-3.11.1/Python/thread_pthread.h:241\r\n#10 0x00007effcf957277 in start (p=0x7effcdee2b00) at src/thread/pthread_create.c:207\r\n#11 0x00007effcf95bffe in __clone () at src/thread/x86_64/clone.s:22\r\nBacktrace stopped: frame did not save the PC\r\n(gdb)\r\n```\r\n\r\n# Your environment\r\n\r\n- CPython versions tested on: 3.11.1 (3.10 works and I cannot trigger the crash doing the exactly same steps)\r\n- Operating system and architecture: ALT Linux x86_64 (kernel 5.15.50, glibc 2.35.0.6) -\u003e chroot with musl 1.2.3\r\n- The host machine is Intel(R) Core(TM) i3 CPU 530 @ 2.93GHz with 8GB of RAM\r\n","author":{"url":"https://github.com/galaxy4public","@type":"Person","name":"galaxy4public"},"datePublished":"2023-01-12T11:39:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/100981/cpython/issues/100981"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:40f82db9-a369-0760-d58a-9b37589f8013 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 995C:E3F0D:2C03D79:397BBAF:696B723A |
| html-safe-nonce | eee55d22106cdf368e7910af3778ff8deb09ca90a51a46532d3681366cc86a09 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTVDOkUzRjBEOjJDMDNENzk6Mzk3QkJBRjo2OTZCNzIzQSIsInZpc2l0b3JfaWQiOiIzODk2ODY4MDM3NTI3ODI3MDAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b790a9268d1d262a5e17930656975487a304c195e36cd06f2a9114244a2dc043 |
| hovercard-subject-tag | issue:1530565551 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/100981/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58f4bee5cb737f84056a4c72cce38521008bf149beb48c9acd3ab5ac443461e3/python/cpython/issues/100981 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58f4bee5cb737f84056a4c72cce38521008bf149beb48c9acd3ab5ac443461e3/python/cpython/issues/100981 |
| og:image:alt | Crash report When running the testsuite one test is intermittently failing with a segmentation fault. The test in question is test=test__xxsubinterpreters and the crash seems to be GIL related. I a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | galaxy4public |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width