Giter VIP home page Giter VIP logo

Comments (3)

jsirois avatar jsirois commented on August 13, 2024

Light is starting to dawn on the real issue here: pantsbuild/pants#20467 (comment)

I'll add more info or link to it to close this issue out as truly understood and not just papered over.

from pex.

jsirois avatar jsirois commented on August 13, 2024

Ok, #2358 contains a code comment that buttons this up and the issue can remain closed in good conscience.

from pex.

jsirois avatar jsirois commented on August 13, 2024

For posterity, the test rig used inside a gdb python/install/bin/python3.9 session in thread and no thread modes to suss all this out:

import ssl
import sys
import threading


def create_ssl_context():
    return ssl.create_default_context()


SSL_CONTEXT = None


def store_ssl_context():
    global SSL_CONTEXT
    SSL_CONTEXT = create_ssl_context()


def get_ssl_context():
    global SSL_CONTEXT
    return SSL_CONTEXT


def main():
    args = sys.argv[1:]
    if args and args[0] == "--no-thread":
        print(create_ssl_context())
    else:
        thread = threading.Thread(target=store_ssl_context)
        thread.daemon = True
        thread.start()
        thread.join()
        print(get_ssl_context())


if __name__ == "__main__":
    sys.exit(main())

The only other trick was using a custom debug build of PBS with the patch:

diff --git a/cpython-unix/build-openssl-3.0.sh b/cpython-unix/build-openssl-3.0.sh
index 1d1f913..cd88a0a 100755
--- a/cpython-unix/build-openssl-3.0.sh
+++ b/cpython-unix/build-openssl-3.0.sh
@@ -40,6 +40,7 @@ EXTRA_FLAGS="${EXTRA_FLAGS} ${EXTRA_TARGET_CFLAGS}"
 /usr/bin/perl ./Configure \
   --prefix=/tools/deps \
   --libdir=lib \
+  --debug \
   ${OPENSSL_TARGET} \
   no-legacy \
   no-shared \

And built via ./build-linux.py --optimizations debug --python cpython-3.9.

from pex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.