GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Some python tests are crashing with segmentation fault when running on debug build · Issue #7941 · RustPython/RustPython

Some python tests are crashing with segmentation fault when running on debug build #7941

New issue
Copy link
New issue
Copy link
Open
#7986
Open
Some python tests are crashing with segmentation fault when running on debug build#7941
#7986
Copy link
Assignees
JamesClarke7283
Labels
C-bugSomething isn't workingSomething isn't working

Description

@im-0
im-0
opened on May 20, 2026
Issue body actions

Summary

$ cargo run -- -m test.test_ssl ThreadedTests.test_socketserver
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/rustpython -m test.test_ssl ThreadedTests.test_socketserver`
test_ssl: testing with 'OpenSSL 3.3.0 (rustls/0.23)' (3, 3, 0, 0, 15)
          under 'Linux-6.19.14-400.asahi.fc44.aarch64+16k-aarch64-with-glibc2.43'
          HAS_SNI = True
          OP_ALL = 0x     bfb
          OP_NO_TLSv1_1 = 0x10000000

 server (('127.0.0.1', 34577):34577 ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)):
   [20/May/2026 23:23:31] "GET /test_ssl.py HTTP/1.1" 200 -
Segmentation fault         (core dumped) RUST_BACKTRACE=1 cargo run -- -m test.test_ssl ThreadedTests.test_socketserver

Following patch circumvents this, so I believe it is a stack overflow really:

diff --git a/Lib/test/ssl_servers.py b/Lib/test/ssl_servers.py
index 15b071e04dda..8d9331c6705f 100644
--- a/Lib/test/ssl_servers.py
+++ b/Lib/test/ssl_servers.py
@@ -125,6 +125,7 @@ def __init__(self, context, host=HOST, handler_class=None):
                                   handler_class or RootedHTTPRequestHandler,
                                   context)
         self.port = self.server.server_port
+        threading.stack_size(1024 * 1024 * 128)
         threading.Thread.__init__(self)
         self.daemon = True

Expected

No segmentation fault.

Actual

Segmentation fault.

Python Documentation

N/A

Activity

  1. im-0
    added
    C-bugSomething isn't workingSomething isn't working
    on May 20, 2026
  2. fanninpm commented on May 20, 2026

    @fanninpm
    fanninpm
    on May 20, 2026
    Contributor
    More actions

    Do you believe this to be a bug in CPython?

  3. im-0 commented on May 20, 2026

    @im-0
    im-0
    on May 20, 2026
    ContributorAuthor
    More actions

    No, it is a RustPython bug. Patch for the test case is just to demonstrate that it is a stack overflow.

  4. JamesClarke7283 commented on May 27, 2026

    @JamesClarke7283
    JamesClarke7283
    on May 27, 2026
    Contributor
    More actions

    take

  5. github-actions
    assigned
    JamesClarke7283
    on May 27, 2026
  6. JamesClarke7283
    added a commit that references this issue on May 27, 2026

    Scope thread stack size override to debug builds only

    c8b134e
  7. JamesClarke7283
    added a commit that references this issue on Aug 9, 2026

    Add regression test for debug thread stack size

    54f5615
  8. youknowone
    added 3 commits that reference this issue on Sep 16, 2026

    Fix stack overflow segfault on debug builds for Python threads

    This issue will close once commit ea04e96 is merged into the 'main' branch.
    ea04e96

    Scope thread stack size override to debug builds only

    This issue will close once commit 42f519f is merged into the 'main' branch.
    42f519f

    Add regression test for debug thread stack size

    This issue will close once commit a5e5bc6 is merged into the 'main' branch.
    a5e5bc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @JamesClarke7283
    JamesClarke7283

Labels

C-bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.