Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest-memray segfaults where memray does not #138

Open
Clae224 opened this issue Dec 10, 2024 · 7 comments
Open

Pytest-memray segfaults where memray does not #138

Clae224 opened this issue Dec 10, 2024 · 7 comments

Comments

@Clae224
Copy link

Clae224 commented Dec 10, 2024

Hello, I am currently getting a segfault on a private codebase when using pytest-memray, but I am NOT getting the same segfault when using only memray without the pytest extension to profile python/pytest, i.e. running pytest --memray ... causes a segfault but memray run -m pytest ... does not.

I initially suspected pytest-memray was not activating greenlet support correctly compared to core memray, as we use the async engine in sqlalchemy and other users have reported segfaults without this support: bloomberg/memray#166. However, I have confirmed via logged warnings that greenlet support is active on both pytest-memray and memray core when running pytest for my codebase. Additionally, the stack trace from the coredump looks a bit related to segfaulting when trying to trace a malloc call than tracing a function like in the linked bug:

#0 0x00007f505bc52e2c in ?? () from /lib/x86_64-linux-gnu/libc.so.6

#1 0x00007f505bc03fb2 in raise () from /lib/x86_64-linux-gnu/libc.so.6

#2 <signal handler called>

#3_PyCode_LineNumberFromArray (index=151147732, co=0x7f4f94022b20) at /usr/local/src/conda/python-3.11.9/Include/internal/pycore_code.h: 556

#4 PyCode_Addr2Line (co=0x7f4f94022620, addrq-302295464) at /usr/local/src/conda/python-3.11.9/0bjects/codeobject.c:773

#5 0x00007f505a2a274e in memray:: tracking_api:: PythonStackTracker::emitPending PushesAndPops() [clone .constprop.0] (this <optimized out>) at src/memray/_memray/tracking_api.cpp:182

#6 0x00007f505a28f2ad in memray:: tracking_api:: Tracker:: trackAllocationImpl (this=0x55a999bcae10, ptr=0x7f4f94051800, size=528, func=<optimized out>, trace...) at src/memray/_memray/tracking_api.cpp:153

#7 0x00007f505a27b578 in memray:: tracking_api:: Tracker:: trackAllocation (func=memray:: hooks:: Allocator:: MALLOC, size 528, ptr=0x7f4f94051800) at src/memray/_memray/tracking_api.h:228

#8 memray:: intercept::malloc (size=528) at src/memray/_memray/hooks.cpp:177

#9 0x000055a995289924 in PyMem_RawMalloc (size=<optimized out>, ctx=<optimized out>) at /usr/local/src/conda/python-3.11.9/Objects/obmalloc.c:181

#10 PyMem_RawMalloc (size=<optimized out>) at /usr/local/src/conda/python-3.11.9/Objects/obmalloc.c:586

#11_PyObject_Malloc (ctx=<optimized out>, nbytes=<optimized out>) at /usr/local/src/conda/python-3.11.9/Objects/obmalloc.c:2003

#12_PyObject_Malloc (nbytes=528, ctx=<optimized out>) at /usr/local/src/conda/python-3.11.9/Objects/obmalloc.c:1996

#13 PyMem Malloc (size=size@entry=528) at /usr/local/src/conda/python-3.11.9/0bjects/obmalloc.c:623

#14 0x000055a9953a0c78 in newblock (deque deque@entry=0x7f4f9f3cb970) at /usr/local/src/conda/python-3.11.9/Modules/_collectionsmodule.c:132

#15 0x000055a9953a0c0d in deque_new (type=<optimized out, args=<optimized out>, kwds=<optimized out>)

at /usr/local/src/conda/python-3.11.9/Modules/_collectionsmodule.c:162

#16 0x000055a9952997e4 in type_call (kwds=0x0, args=(), type-0x55a9955e7d20 <deque_type>) at /usr/local/src/conda/python-3.11.9/Objects/typeobject.c:1

#17_PyObject_MakeTpCall (tstate=0x55a99b1e0140, callable <type at remote 0x55a9955e7d20>, args=<optimized out>, nargs=0, keywords=0x0) at /usr/local/src/conda/python-3.11.9/Objects/call.c:214

#18 0x000055a9951bd584 in trace_call_function (kwnames-exe, nargs=0, args=<optimized out>, func=<type at remote 0x55a9955e7d20>, tstate=<optimized out: at /usr/local/src/conda/python-3.11.9/Python/ceval.c:7307

#19_PyEval_EvalFrameDefault (tstate-tstate@entry=0x55a99b1e0140, frame=<optimized out>, frame@entry=0x7f5059884890, throwflag-throwflag@entry=0)

at /usr/local/src/conda/python-3.11.9/Python/ceval.c:4764

#20 0x000055a9952ca981 in _PyEval_EvalFrame (throwflag=0, frame=0x7f5059884890, tstate=0x55a99b1e0140)

at /usr/local/src/conda/python-3.11.9/Include/internal/pycore ceval.h:73

Obviously we don't expect a segfault when running memray, but also it's strange that it only happens with pytest-memray and not when using memray core.

Given I've confirmed greenlet is activated in both cases, I'm not sure how to proceed with further debugging the cause of this segfault.

@pablogsal
Copy link
Member

Have you tried the last version of memray? We have fixed some issues related to the greenlet support

@pablogsal
Copy link
Member

In particular bloomberg/memray#700 which was released in version 1.15.0

@Clae224
Copy link
Author

Clae224 commented Dec 12, 2024

Ah I forgot to put the versions in the original bug report or update to the latest version to see if had been patched.

Unfortunatly the segfault is still present in the most recent version, and also still only occues in pytest-memray versus memray. I installed versions:

memray = "1.15.0"
pytest-memray = "1.7.0"
pytest = "8.3.4"

And the old versions were

memray = "1.13.4"
pytest-memray = "1.6.0"
pytest = "8.3.1"

@pablogsal
Copy link
Member

The stack trace looks like indeed there is some problem related to greenlet and looks oddly similar to the one we fixed but without having a way to reproduce it on our side we won't be able to help here unfortunately. I am afraid I must ask you to try to rip enough code from your codebase that can reproduce the problem but you are also comfortable sharing.

@pablogsal
Copy link
Member

I went ahead and tried to execute the tests suites of gevent and greenlet under memray to see if I could get any segfault and none of them crash (at least on macOS):

Gevent test suite
⚠ Memray support for Greenlet is experimental ⚠
Please report any issues at https://github.com/bloomberg/memray/issues


�[36m        GEVENTTEST_QUIET	=	True�[0m
�[36mGEVENTTEST_USE_RESOURCES	=	all�[0m
�[36m           PYTHONDEVMODE	=	1�[0m
�[36m      PYTHONFAULTHANDLER	=	true�[0m
�[36m          PYTHONWARNINGS	=	default,default::DeprecationWarning,default::ResourceWarning,ignore:::site:,ignore:::pkgutil:,ignore:::importlib._bootstrap:,ignore:::importlib._bootstrap_external:,ignore:::pkg_resources._vendor.pyparsing:,ignore:::dns.namedict:,ignore:::dns.hash:,ignore:::dns.zone:�[0m
�[35mWARNING: The tests in /Users/pgalindo3/github/memray/gevent/src/greentest/3.12/ are from version 3.12.6 and your Python is 3.12.7�[0m
�[0mDiscovered 13 tests in /Users/pgalindo3/github/memray/gevent/src/greentest/3.12�[0m
�[0mDiscovered 0 version-specific tests in /Users/pgalindo3/github/memray/gevent/src/greentest/3.12.7�[0m
�[0mRunning tests in parallel with concurrency 9 �[32m(concurrency available: 9)�[0m.�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__util [Ran 10 tests in 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__hub_join_timeout gevent.tests.test__issue1864 gevent.tests.test__issue330 gevent.tests.test__issue467 gevent.tests.test__issue607 gevent.tests.test__issue639 [Ran 22 tests in 0.8s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__ares_host_result gevent.tests.test__ares_timeout gevent.tests.test__close_backend_fd gevent.tests.test__compat gevent.tests.test__core gevent.tests.test__core_async [Ran 46 tests in 1.3s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__issues461_471 gevent.tests.test__iwait gevent.tests.test__joinall gevent.tests.test__lock gevent.tests.test__loop_callback gevent.tests.test__memleak [Ran 13 tests in 2.7s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__signal gevent.tests.test__socket_close gevent.tests.test__socket_dns gevent.tests.test__socket_dns6 gevent.tests.test__socket_errors gevent.tests.test__socket_ex [Ran 202 tests in 2.9s�[1;33m (skipped=10)�[0m]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test___config gevent.tests.test___ident gevent.tests.test___monitor gevent.tests.test__all__ gevent.tests.test__api gevent.tests.test__api_timeout
  .........../Users/pgalindo3/github/memray/gevent/src/gevent/tests/test___config.py:50: UserWarning: dnspython not installed
    warnings.warn('dnspython not installed')
  ............................ssss.sssssss.ss.ssss.sssssss.ss.ssss.ss.ssss.ss..sss.sssssss.sssssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.sssssss.sssssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.s...............ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss.ssss.ss..sss.ss..sss.ss..sss.ss..sss.ss..sss.ss.s.......ssss.ss.ssss.sssssss.sssssss.sssssss.sssssss.sssssss.ss.s.......ssss.ss.ssss.ss.s........sss.sssssss.sssssss.ss.ssss.ss.ssss.sss.ssss.ss.s.......s.......ssss.ss.s.......s.......s...............s......ss.......ssss.ss.s.......ssss.ss.ssss.ss.ssss.ss.............
  ----------------------------------------------------------------------
  Ran 603 tests in 0.738s
  
  OK (skipped=350)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test___config gevent.tests.test___ident gevent.tests.test___monitor gevent.tests.test__all__ gevent.tests.test__api gevent.tests.test__api_timeout [Ran 603 tests in 0.9s�[1;33m (skipped=350)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__core_callback gevent.tests.test__core_stat gevent.tests.test__core_timer gevent.tests.test__core_watcher gevent.tests.test__destroy_default_loop gevent.tests.test__event [Ran 59 tests in 3.7s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__issue600 gevent.tests.test__local gevent.tests.test__makefile_ref gevent.tests.test__monkey gevent.tests.test__monkey_queue gevent.tests.test__monkey_select
  ......................s/Users/pgalindo3/github/memray/gevent/src/gevent/testing/openfiles.py:177: DeprecationWarning: connections() is deprecated and will be removed; use net_connections() instead
    results['data'] += process.connections('all')
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:294: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    s = closer(ssl.SSLContext().wrap_socket(raw_s))
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:294: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    s = closer(ssl.SSLContext().wrap_socket(raw_s))
  ./Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:311: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    s = closer(ssl.SSLContext().wrap_socket(s))
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:311: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    s = closer(ssl.SSLContext().wrap_socket(s))
  ./Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:260: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    x = ssl.SSLContext().wrap_socket(connector)
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:260: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    x = ssl.SSLContext().wrap_socket(connector)
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:323: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    context = ssl.SSLContext()
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:323: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl.SSLContext()
  /Users/pgalindo3/github/memray/gevent/src/gevent/testing/openfiles.py:177: DeprecationWarning: connections() is deprecated and will be removed; use net_connections() instead
    results['data'] += process.connections('all')
  ..../Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:426: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    s = ssl.SSLContext().wrap_socket(connector)
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:426: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    s = ssl.SSLContext().wrap_socket(connector)
  ./Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:285: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    s = closer(ssl.SSLContext().wrap_socket(s))
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__makefile_ref.py:285: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    s = closer(ssl.SSLContext().wrap_socket(s))
  ..................................
  ----------------------------------------------------------------------
  Ran 64 tests in 1.698s
  
  OK (skipped=1)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__issue600 gevent.tests.test__local gevent.tests.test__makefile_ref gevent.tests.test__monkey gevent.tests.test__monkey_queue gevent.tests.test__monkey_select [Ran 64 tests in 2.0s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__GreenletExit [took 0.1s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__backdoor
  ..Traceback (most recent call last):
    File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
      result = self._run(*self.args, **self.kwargs)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__backdoor.py", line 100, in connect
      self._close(conn)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__backdoor.py", line 86, in _close
      self.assertEqual(line, '')
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/case.py", line 885, in assertEqual
      assertion_func(first, second, msg=msg)
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/case.py", line 1251, in assertMultiLineEqual
      self.fail(self._formatMessage(msg, standardMsg))
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/case.py", line 715, in fail
      raise self.failureException(msg)
  AssertionError: '>>> ' != ''
  - >>> 
  
  2024-12-12T08:24:24Z <WorkerGreenlet at 0x101a596d0: connect> failed with AssertionError
  
  F...
  ======================================================================
  FAIL: test_multi (__main__.Test.test_multi)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/testcase.py", line 320, in _callTestMethod
      method()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/errorhandler.py", line 47, in restore_fatal_error_wrapper
      return method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/errorhandler.py", line 34, in fatal_error_wrapper
      return method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/testcase.py", line 182, in timeout_wrapper
      return method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__backdoor.py", line 104, in test_multi
      done = gevent.joinall(jobs, raise_error=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "src/gevent/greenlet.py", line 1057, in gevent._gevent_cgreenlet.joinall
      def joinall(greenlets, timeout=None, raise_error=False, count=None):
    File "src/gevent/greenlet.py", line 1070, in gevent._gevent_cgreenlet.joinall
      for obj in iwait(greenlets, timeout=timeout, count=count):
    File "src/gevent/_hub_primitives.py", line 185, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
      raise
    File "src/gevent/_hub_primitives.py", line 176, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
      item = self._waiter.get()
    File "src/gevent/_waiter.py", line 195, in gevent._gevent_c_waiter.MultipleWaiter.get
      Waiter.get(self)
    File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
      return self.hub.switch()
    File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
      def switch(self):
    File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
      def switch(self):
    File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
      return _greenlet_switch(self) # pylint:disable=undefined-variable
    File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
      return PyGreenlet_Switch(self, NULL, NULL)
    File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
      result = self._run(*self.args, **self.kwargs)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__backdoor.py", line 100, in connect
      self._close(conn)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__backdoor.py", line 86, in _close
      self.assertEqual(line, '')
  AssertionError: '>>> ' != ''
  - >>> 
  
  
  ----------------------------------------------------------------------
  Ran 6 tests in 0.253s
  
  FAILED (failures=1)
�[0m
�[1;31m! /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__backdoor [code 1] [Ran 6 tests in 0.4s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__monkey_selectors gevent.tests.test__pywsgi gevent.tests.test__refcount gevent.tests.test__socket gevent.tests.test__socket_ssl gevent.tests.test__socketpair [Ran 161 tests in 2.8s�[1;33m (skipped=13)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__destroy [took 0.1s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__doctests
  �[0mgevent._config (from /Users/pgalindo3/github/memray/gevent/src/gevent/_config.py): 1 tests�[0m
  �[0mgevent._waiter (from /Users/pgalindo3/github/memray/gevent/src/gevent/_waiter.py): 0 tests�[0m
  �[0mgevent.event (from /Users/pgalindo3/github/memray/gevent/src/gevent/event.py): 0 tests�[0m
  �[0mgevent.local (from /Users/pgalindo3/github/memray/gevent/src/gevent/local.py): 1 tests�[0m
  �[0mgevent.pywsgi (from /Users/pgalindo3/github/memray/gevent/src/gevent/pywsgi.py): 2 tests�[0m
  �[0mgevent.queue (from /Users/pgalindo3/github/memray/gevent/src/gevent/queue.py): 1 tests�[0m
  �[0mgevent.subprocess (from /Users/pgalindo3/github/memray/gevent/src/gevent/subprocess.py): 1 tests�[0m
  �[0mgevent.timeout (from /Users/pgalindo3/github/memray/gevent/src/gevent/timeout.py): 2 tests�[0m
  �[0mTotal: 8 tests in 8 modules�[0m
  Config (gevent._config)
  Doctest: gevent._config.Config ... ok
  _gevent_clocal (gevent)
  Doctest: gevent._gevent_clocal ... ok
  SecureEnviron (gevent.pywsgi)
  Doctest: gevent.pywsgi.SecureEnviron ... ok
  WSGISecureEnviron (gevent.pywsgi)
  Doctest: gevent.pywsgi.WSGISecureEnviron ... ok
  _gevent_cqueue (gevent)
  Doctest: gevent._gevent_cqueue ... ok
  check_output (gevent.subprocess)
  Doctest: gevent.subprocess.check_output ... /Users/pgalindo3/github/memray/gevent/src/gevent/os.py:431: DeprecationWarning: This process (pid=54194) is multi-threaded, use of fork() may lead to deadlocks in the child.
    pid = fork()
  ok
  Timeout (gevent.timeout)
  Doctest: gevent.timeout.Timeout ... ok
  __str__ (gevent.timeout.Timeout)
  Doctest: gevent.timeout.Timeout.__str__ ... ok
  
  ----------------------------------------------------------------------
  Ran 8 tests in 0.138s
  
  OK
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__doctests [Ran 8 tests in 0.4s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__core_loop_run [took 0.6s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__environ [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__example_udp_client [took 0.4s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__execmodules [Ran 74 tests in 0.4s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__getaddrinfo_import [took 0.1s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__import_wait [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__import_blocking_in_greenlet [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__issue6 [took 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__issue_728 [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_builtins_future [took 0.1s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__issue1686 [took 0.7s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__contextvars gevent.tests.test__core_fork gevent.tests.test__example_portforwarder gevent.tests.test__greenness gevent.tests.test__issue112 gevent.tests.test__issue230
  ...................�[0m+ /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -W ignore -u portforwarder.py 127.0.0.1:10011 127.0.0.1:10012�[0m
  /Users/pgalindo3/github/memray/gevent/src/gevent/os.py:431: DeprecationWarning: This process (pid=54172) is multi-threaded, use of fork() may lead to deadlocks in the child.
    pid = fork()
  Starting port forwarder 127.0.0.1:10011 -> 127.0.0.1:10012
  127.0.0.1:49449 accepted
  127.0.0.1:49449->127.0.0.1:10012: b'msg1'
  got b'msg1'
  Closing listener socket
  127.0.0.1:49449->127.0.0.1:10012: b'msg2'
  127.0.0.1:49449->127.0.0.1:10012: b''
  got b'msg2'
  got b''
  ..s.
  ----------------------------------------------------------------------
  Ran 23 tests in 3.598s
  
  OK (skipped=1)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__contextvars gevent.tests.test__core_fork gevent.tests.test__example_portforwarder gevent.tests.test__greenness gevent.tests.test__issue112 gevent.tests.test__issue230 [Ran 23 tests in 4.0s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_hub_in_thread [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_logging [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_sigchld [Ran 1 tests in 0.2s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_multiple_imports [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_sigchld_2 [Ran 1 tests in 0.1s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_sigchld_3 [Ran 1 tests in 0.2s�[1;33m (skipped=1)�[0m]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_ssl_warning
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__monkey_ssl_warning.py:17: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    __import__('pkg_resources')
  /Users/pgalindo3/github/memray/gevent/.tox/py12/lib/python3.12/site-packages/pkg_resources/__init__.py:3149: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)
  .
  ----------------------------------------------------------------------
  Ran 1 test in 0.185s
  
  OK
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_ssl_warning [took 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_ssl_warning2 [took 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_ssl_warning3 [took 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__nondefaultloop [took 0.1s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__resolver_dnspython gevent.tests.test__select gevent.tests.test__selectors gevent.tests.test__semaphore gevent.tests.test__server gevent.tests.test__server_pywsgi
  ss.s................................................Traceback (most recent call last):
    File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
      result = self._run(*self.args, **self.kwargs)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/baseserver.py", line 34, in _handle_and_close_when_done
      return handle(*args_tuple)
             ^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__server.py", line 40, in handle
      data = client_socket.recv(1)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/_socketcommon.py", line 656, in recv
      return self._sock.recv(*args)
             ^^^^^^^^^^^^^^^^^^^^^^
  ConnectionResetError: [Errno 54] Connection reset by peer
  2024-12-12T08:24:24Z <Greenlet at 0x107574410: _handle_and_close_when_done(<bound method SimpleStreamServer.handle of <Simple, <bound method StreamServer.do_close of <SimpleStre, (<gevent._socket3.socket [closed] at 0x10753dd60 o)> failed with ConnectionResetError
  
  Traceback (most recent call last):
    File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
      result = self._run(*self.args, **self.kwargs)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/baseserver.py", line 34, in _handle_and_close_when_done
      return handle(*args_tuple)
             ^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__server.py", line 40, in handle
      data = client_socket.recv(1)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/_socketcommon.py", line 656, in recv
      return self._sock.recv(*args)
             ^^^^^^^^^^^^^^^^^^^^^^
  ConnectionResetError: [Errno 54] Connection reset by peer
  2024-12-12T08:24:24Z <Greenlet at 0x1075741d0: _handle_and_close_when_done(<bound method SimpleStreamServer.handle of <Simple, <bound method StreamServer.do_close of <SimpleStre, (<gevent._socket3.socket [closed] at 0x10753d8e0 o)> failed with ConnectionResetError
  
  .................../Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py:239: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    self._context = SSLContext(ssl_version)
  ..s....................................s
  ----------------------------------------------------------------------
  Ran 111 tests in 8.869s
  
  OK (skipped=5)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__resolver_dnspython gevent.tests.test__select gevent.tests.test__selectors gevent.tests.test__semaphore gevent.tests.test__server gevent.tests.test__server_pywsgi [Ran 111 tests in 9.1s�[1;33m (skipped=5)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__sleep0 [took 0.2s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__subprocess_poll
  /Users/pgalindo3/github/memray/gevent/src/gevent/os.py:431: DeprecationWarning: This process (pid=54328) is multi-threaded, use of fork() may lead to deadlocks in the child.
    pid = fork()
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__subprocess_poll [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__systemerror [Ran 10 tests in 0.2s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__fileobject gevent.tests.test__greenio gevent.tests.test__greenlet gevent.tests.test__greenletset gevent.tests.test__hub gevent.tests.test__hub_join
  .....s..s..........ss..s...........ss.../Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__fileobject.py:389: ResourceWarning: unclosed file <_io.BufferedWriter name=6>
    g.kill()
  ResourceWarning: Enable tracemalloc to get the object allocation traceback
  ss..s......................................s............................................................................s....................................Traceback (most recent call last):
    File "src/gevent/libev/corecext.pyx", line 1435, in gevent.libev.corecext.gevent_handle_error
      loop.handle_error(context, type, value, traceback)
    File "src/gevent/libev/corecext.pyx", line 606, in gevent.libev.corecext.loop.handle_error
      handle_error(context, type, value, tb)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__hub.py", line 389, in bad_handle_error
      raise AttributeError
  AttributeError
  ...................
  ----------------------------------------------------------------------
  Ran 216 tests in 9.257s
  
  OK (skipped=12)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__fileobject gevent.tests.test__greenio gevent.tests.test__greenlet gevent.tests.test__greenletset gevent.tests.test__hub gevent.tests.test__hub_join [Ran 216 tests in 9.5s�[1;33m (skipped=12)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_before_monkey [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_fork_from_dummy [took 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__subprocess_interrupted [took 0.8s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__ssl gevent.tests.test__threading_2 gevent.tests.test__threadpool_executor_patched
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__ssl.py:23: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl.SSLContext(
  ......s.................................................................................../Users/pgalindo3/github/memray/gevent/src/gevent/os.py:431: DeprecationWarning: This process (pid=54098) is multi-threaded, use of fork() may lead to deadlocks in the child.
    pid = fork()
  ...s.................
  ----------------------------------------------------------------------
  Ran 111 tests in 6.416s
  
  OK (skipped=2)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__ssl gevent.tests.test__threading_2 gevent.tests.test__threadpool_executor_patched [Ran 111 tests in 7.1s�[1;33m (skipped=2)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_holding_lock_while_monkey [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading [Ran 4 tests in 0.7s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_monkey_in_thread [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_no_monkey [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_native_before_monkey [Ran 2 tests in 0.3s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_patched_local [took 0.2s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__monkey_module_run [Ran 7 tests in 2.5s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__threading_vs_settrace [Ran 5 tests in 0.6s]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_httplib.py
  Running with patch_all(): /Users/pgalindo3/github/memray/gevent/src/greentest/3.12/test_httplib.py
  Added imports 1
  Skipped test_httplib.HeaderTests.test_headers_debuglevel (1)
  Skipped test_httplib.HTTPSTest.test_local_bad_hostname (1)
  Skipped test_httplib.HeaderTests.test_parse_all_octets (1)
  Skipped test_httplib.HTTPSTest.test_local_good_hostname (1)
  Skipped test_httplib.HTTPSTest.test_local_unknown_cert (1)
  test_bad_status_repr (__main__.BasicTest.test_bad_status_repr) ... ok
  test_blocksize_request (__main__.BasicTest.test_blocksize_request)
  Check that request() respects the configured block size. ... ok
  test_blocksize_send (__main__.BasicTest.test_blocksize_send)
  Check that send() respects the configured block size. ... ok
  test_chunked (__main__.BasicTest.test_chunked) ... ok
  test_chunked_extension (__main__.BasicTest.test_chunked_extension) ... ok
  test_chunked_head (__main__.BasicTest.test_chunked_head) ... ok
  test_chunked_missing_end (__main__.BasicTest.test_chunked_missing_end)
  some servers may serve up a short chunked encoding stream ... ok
  test_chunked_sync (__main__.BasicTest.test_chunked_sync)
  Check that we don't read past the end of the chunked-encoding stream ... ok
  test_chunked_trailers (__main__.BasicTest.test_chunked_trailers)
  See that trailers are read and ignored ... ok
  test_content_length_sync (__main__.BasicTest.test_content_length_sync)
  Check that we don't read past the end of the Content-Length stream ... ok
  test_dir_with_added_behavior_on_status (__main__.BasicTest.test_dir_with_added_behavior_on_status) ... ok
  test_early_eof (__main__.BasicTest.test_early_eof) ... ok
  test_epipe (__main__.BasicTest.test_epipe) ... ok
  test_error_leak (__main__.BasicTest.test_error_leak) ... ok
  test_host_port (__main__.BasicTest.test_host_port) ... ok
  test_httpstatus_category (__main__.BasicTest.test_httpstatus_category)
  Checks that the statuses belong to the standard categories ... ok
  test_httpstatus_range (__main__.BasicTest.test_httpstatus_range)
  Checks that the statuses are in the 100-599 range ... ok
  test_incomplete_read (__main__.BasicTest.test_incomplete_read) ... ok
  test_mixed_reads (__main__.BasicTest.test_mixed_reads) ... ok
  test_negative_content_length (__main__.BasicTest.test_negative_content_length) ... ok
  test_overflowing_chunked_line (__main__.BasicTest.test_overflowing_chunked_line) ... ok
  test_overflowing_header_limit_after_100 (__main__.BasicTest.test_overflowing_header_limit_after_100) ... ok
  test_overflowing_header_line (__main__.BasicTest.test_overflowing_header_line) ... ok
  test_overflowing_status_line (__main__.BasicTest.test_overflowing_status_line) ... ok
  test_partial_readintos (__main__.BasicTest.test_partial_readintos) ... ok
  test_partial_readintos_incomplete_body (__main__.BasicTest.test_partial_readintos_incomplete_body) ... ok
  test_partial_readintos_no_content_length (__main__.BasicTest.test_partial_readintos_no_content_length) ... ok
  test_partial_readintos_past_end (__main__.BasicTest.test_partial_readintos_past_end) ... ok
  test_partial_reads (__main__.BasicTest.test_partial_reads) ... ok
  test_partial_reads_incomplete_body (__main__.BasicTest.test_partial_reads_incomplete_body) ... ok
  test_partial_reads_no_content_length (__main__.BasicTest.test_partial_reads_no_content_length) ... ok
  test_partial_reads_past_end (__main__.BasicTest.test_partial_reads_past_end) ... ok
  test_putrequest_override_domain_validation (__main__.BasicTest.test_putrequest_override_domain_validation)
  It should be possible to override the default validation ... ok
  test_putrequest_override_encoding (__main__.BasicTest.test_putrequest_override_encoding)
  It should be possible to override the default encoding ... ok
  test_putrequest_override_host_validation (__main__.BasicTest.test_putrequest_override_host_validation) ... ok
  test_read1_bound_content_length (__main__.BasicTest.test_read1_bound_content_length) ... ok
  test_read1_content_length (__main__.BasicTest.test_read1_content_length) ... ok
  test_read_head (__main__.BasicTest.test_read_head) ... ok
  test_readinto_chunked (__main__.BasicTest.test_readinto_chunked) ... ok
  test_readinto_chunked_head (__main__.BasicTest.test_readinto_chunked_head) ... ok
  test_readinto_head (__main__.BasicTest.test_readinto_head) ... ok
  test_readline_bound_content_length (__main__.BasicTest.test_readline_bound_content_length) ... ok
  test_readlines_content_length (__main__.BasicTest.test_readlines_content_length) ... ok
  test_response_fileno (__main__.BasicTest.test_response_fileno) ... ok
  test_response_headers (__main__.BasicTest.test_response_headers) ... ok
  test_send (__main__.BasicTest.test_send) ... ok
  test_send_file (__main__.BasicTest.test_send_file) ... ok
  test_send_iter (__main__.BasicTest.test_send_iter) ... ok
  test_send_type_error (__main__.BasicTest.test_send_type_error) ... ok
  test_send_updating_file (__main__.BasicTest.test_send_updating_file) ... ok
  test_simple_httpstatus (__main__.BasicTest.test_simple_httpstatus) ... ok
  test_status_lines (__main__.BasicTest.test_status_lines) ... ok
  test_too_many_headers (__main__.BasicTest.test_too_many_headers) ... ok
  test_peek (__main__.ExtendedReadTest.test_peek) ... ok
  test_peek_0 (__main__.ExtendedReadTest.test_peek_0) ... ok
  test_read1 (__main__.ExtendedReadTest.test_read1) ... ok
  test_read1_0 (__main__.ExtendedReadTest.test_read1_0) ... ok
  test_read1_bounded (__main__.ExtendedReadTest.test_read1_bounded) ... ok
  test_read1_unbounded (__main__.ExtendedReadTest.test_read1_unbounded) ... ok
  test_readline (__main__.ExtendedReadTest.test_readline) ... ok
  test_readline_without_limit (__main__.ExtendedReadTest.test_readline_without_limit) ... ok
  test_peek (__main__.ExtendedReadTestChunked.test_peek) ... ok
  test_peek_0 (__main__.ExtendedReadTestChunked.test_peek_0) ... ok
  test_read1 (__main__.ExtendedReadTestChunked.test_read1) ... ok
  test_read1_0 (__main__.ExtendedReadTestChunked.test_read1_0) ... ok
  test_read1_bounded (__main__.ExtendedReadTestChunked.test_read1_bounded) ... ok
  test_read1_unbounded (__main__.ExtendedReadTestChunked.test_read1_unbounded) ... ok
  test_readline (__main__.ExtendedReadTestChunked.test_readline) ... ok
  test_readline_without_limit (__main__.ExtendedReadTestChunked.test_readline_without_limit) ... ok
  test_peek (__main__.ExtendedReadTestContentLengthKnown.test_peek) ... ok
  test_peek_0 (__main__.ExtendedReadTestContentLengthKnown.test_peek_0) ... ok
  test_read1 (__main__.ExtendedReadTestContentLengthKnown.test_read1) ... ok
  test_read1_0 (__main__.ExtendedReadTestContentLengthKnown.test_read1_0) ... ok
  test_read1_bounded (__main__.ExtendedReadTestContentLengthKnown.test_read1_bounded) ... ok
  test_read1_unbounded (__main__.ExtendedReadTestContentLengthKnown.test_read1_unbounded) ... ok
  test_readline (__main__.ExtendedReadTestContentLengthKnown.test_readline) ... ok
  test_readline_without_limit (__main__.ExtendedReadTestContentLengthKnown.test_readline_without_limit) ... ok
  test_getting_header (__main__.HTTPResponseTest.test_getting_header) ... ok
  test_getting_header_defaultint (__main__.HTTPResponseTest.test_getting_header_defaultint) ... ok
  test_getting_nonexistent_header_with_iterable_default (__main__.HTTPResponseTest.test_getting_nonexistent_header_with_iterable_default) ... ok
  test_getting_nonexistent_header_with_string_default (__main__.HTTPResponseTest.test_getting_nonexistent_header_with_string_default) ... ok
  test_getting_nonexistent_header_without_default (__main__.HTTPResponseTest.test_getting_nonexistent_header_without_default) ... ok
  test_attributes (__main__.HTTPSTest.test_attributes) ... ok
  test_host_port (__main__.HTTPSTest.test_host_port) ... ok
  test_local_bad_hostname (__main__.HTTPSTest.test_local_bad_hostname) ... skipped 'Removed by patched_tests_setup: test_httplib.HTTPSTest.test_local_bad_hostname'
  test_local_good_hostname (__main__.HTTPSTest.test_local_good_hostname) ... skipped 'Removed by patched_tests_setup: test_httplib.HTTPSTest.test_local_good_hostname'
  test_local_unknown_cert (__main__.HTTPSTest.test_local_unknown_cert) ... skipped 'Removed by patched_tests_setup: test_httplib.HTTPSTest.test_local_unknown_cert'
  test_networked (__main__.HTTPSTest.test_networked) ... FAIL
  test_networked_bad_cert (__main__.HTTPSTest.test_networked_bad_cert) ... skipped "resource 'walltime' is not enabled"
  test_networked_good_cert (__main__.HTTPSTest.test_networked_good_cert) ... ERROR
  test_networked_noverification (__main__.HTTPSTest.test_networked_noverification) ... ERROR
  test_networked_trusted_by_default_cert (__main__.HTTPSTest.test_networked_trusted_by_default_cert) ... ok
  test_tls13_pha (__main__.HTTPSTest.test_tls13_pha) ... ok
  test_auto_headers (__main__.HeaderTests.test_auto_headers) ... ok
  test_content_length_0 (__main__.HeaderTests.test_content_length_0) ... ok
  test_headers_debuglevel (__main__.HeaderTests.test_headers_debuglevel) ... skipped 'Removed by patched_tests_setup: test_httplib.HeaderTests.test_headers_debuglevel'
  test_invalid_headers (__main__.HeaderTests.test_invalid_headers) ... ok
  test_ipv6host_header (__main__.HeaderTests.test_ipv6host_header) ... ok
  test_malformed_headers_coped_with (__main__.HeaderTests.test_malformed_headers_coped_with) ... ok
  test_parse_all_octets (__main__.HeaderTests.test_parse_all_octets) ... skipped 'Removed by patched_tests_setup: test_httplib.HeaderTests.test_parse_all_octets'
  test_putheader (__main__.HeaderTests.test_putheader) ... ok
  test_invalid_method_names (__main__.HttpMethodTests.test_invalid_method_names) ... ok
  test_all (__main__.OfflineTest.test_all) ... ok
  test_client_constants (__main__.OfflineTest.test_client_constants) ... ok
  test_responses (__main__.OfflineTest.test_responses) ... ok
  test_100_close (__main__.PersistenceTest.test_100_close) ... ok
  test_disconnected (__main__.PersistenceTest.test_disconnected) ... ok
  test_reuse_reconnect (__main__.PersistenceTest.test_reuse_reconnect) ... ok
  test_ascii_body (__main__.RequestBodyTest.test_ascii_body) ... ok
  test_binary_file_body (__main__.RequestBodyTest.test_binary_file_body) ... ok
  test_bytes_body (__main__.RequestBodyTest.test_bytes_body) ... ok
  test_latin1_body (__main__.RequestBodyTest.test_latin1_body) ... ok
  test_list_body (__main__.RequestBodyTest.test_list_body) ... ok
  test_manual_content_length (__main__.RequestBodyTest.test_manual_content_length) ... ok
  test_text_file_body (__main__.RequestBodyTest.test_text_file_body) ... ok
  testHTTPConnectionSourceAddress (__main__.SourceAddressTest.testHTTPConnectionSourceAddress) ... ok
  testHTTPSConnectionSourceAddress (__main__.SourceAddressTest.testHTTPSConnectionSourceAddress) ... ok
  testTimeoutAttribute (__main__.TimeoutTest.testTimeoutAttribute) ... ok
  test_empty_body (__main__.TransferEncodingTest.test_empty_body) ... ok
  test_endheaders_chunked (__main__.TransferEncodingTest.test_endheaders_chunked) ... ok
  test_explicit_headers (__main__.TransferEncodingTest.test_explicit_headers) ... ok
  test_request (__main__.TransferEncodingTest.test_request) ... ok
  test_connect_put_request (__main__.TunnelTests.test_connect_put_request) ... ok
  test_connect_put_request_ipv6 (__main__.TunnelTests.test_connect_put_request_ipv6) ... ok
  test_connect_put_request_ipv6_port (__main__.TunnelTests.test_connect_put_request_ipv6_port) ... ok
  test_connect_with_tunnel (__main__.TunnelTests.test_connect_with_tunnel) ... ok
  test_connect_with_tunnel_different_host (__main__.TunnelTests.test_connect_with_tunnel_different_host) ... ok
  test_connect_with_tunnel_idna (__main__.TunnelTests.test_connect_with_tunnel_idna) ... ok
  test_connect_with_tunnel_with_default_port (__main__.TunnelTests.test_connect_with_tunnel_with_default_port) ... ok
  test_connect_with_tunnel_with_different_host_header (__main__.TunnelTests.test_connect_with_tunnel_with_different_host_header) ... ok
  test_connect_with_tunnel_with_nonstandard_port (__main__.TunnelTests.test_connect_with_tunnel_with_nonstandard_port) ... ok
  test_disallow_set_tunnel_after_connect (__main__.TunnelTests.test_disallow_set_tunnel_after_connect) ... ok
  test_no_proxy_response_headers (__main__.TunnelTests.test_no_proxy_response_headers) ... ok
  test_proxy_response_headers (__main__.TunnelTests.test_proxy_response_headers) ... ok
  test_set_tunnel_host_port_headers_add_host_missing (__main__.TunnelTests.test_set_tunnel_host_port_headers_add_host_missing) ... ok
  test_set_tunnel_host_port_headers_set_host_different (__main__.TunnelTests.test_set_tunnel_host_port_headers_set_host_different) ... ok
  test_set_tunnel_host_port_headers_set_host_identical (__main__.TunnelTests.test_set_tunnel_host_port_headers_set_host_identical) ... ok
  test_tunnel_connect_single_send_connection_setup (__main__.TunnelTests.test_tunnel_connect_single_send_connection_setup)
  Regresstion test for https://bugs.python.org/issue43332. ... ok
  test_tunnel_debuglog (__main__.TunnelTests.test_tunnel_debuglog) ... ok
  test_tunnel_leak (__main__.TunnelTests.test_tunnel_leak) ... ok
  
  ======================================================================
  ERROR: test_networked_good_cert (__main__.HTTPSTest.test_networked_good_cert)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_httplibycdlk_2a.py", line 1969, in test_networked_good_cert
      h.request('GET', '/')
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1336, in request
      self._send_request(method, url, body, headers, encode_chunked)
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1382, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1331, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1091, in _send_output
      self.send(msg)
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1035, in send
      self.connect()
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1477, in connect
      self.sock = self._context.wrap_socket(self.sock,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
  ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)
  
  ======================================================================
  ERROR: test_networked_noverification (__main__.HTTPSTest.test_networked_noverification)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_httplibycdlk_2a.py", line 1940, in test_networked_noverification
      self.assertIn('nginx', resp.getheader('server'))
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/case.py", line 1149, in assertIn
      if member not in container:
         ^^^^^^^^^^^^^^^^^^^^^^^
  TypeError: argument of type 'NoneType' is not iterable
  
  ======================================================================
  FAIL: test_networked (__main__.HTTPSTest.test_networked)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_httplibycdlk_2a.py", line 1925, in test_networked
      with self.assertRaises(ssl.SSLError) as exc_info:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  AssertionError: SSLError not raised
  
  ----------------------------------------------------------------------
  Ran 140 tests in 0.533s
  
  FAILED (failures=1, errors=2, skipped=6)
�[0m
�[1;31m! /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_httplib.py [code 1] [Ran 140 tests in 0.8s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_context.py [Ran 43 tests in 0.9s]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_ftplib.py [Ran 94 tests in 2.0s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_select.py [Ran 6 tests in 1.8s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_interpreters.py [Ran 79 tests in 4.0s�[1;33m (skipped=10)�[0m]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__socket_send_memoryview gevent.tests.test__socket_timeout gevent.tests.test__subprocess gevent.tests.test__thread gevent.tests.test__threadpool gevent.tests.test__timeout
  .../Users/pgalindo3/github/memray/gevent/src/gevent/os.py:431: DeprecationWarning: This process (pid=54074) is multi-threaded, use of fork() may lead to deadlocks in the child.
    pid = fork()
  ....................Traceback (most recent call last):
    File "src/gevent/greenlet.py", line 900, in gevent._gevent_cgreenlet.Greenlet.run
      result = self._run(*self.args, **self.kwargs)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/subprocess.py", line 561, in _read_and_close
      return fobj.read()
             ^^^^^^^^^^^
    File "<frozen codecs>", line 322, in decode
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
  2024-12-12T08:24:22Z <Greenlet at 0x1035be5d0: _read_and_close(<FileObjectPosix at 0x10373ca60 closed_fobj=<geven)> failed with UnicodeDecodeError
  
  ........s.123
  ...................................................................................Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/threadpool.py", line 173, in __run_task
      thread_result.set(func(*args, **kwargs))
                        ^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__threadpool.py", line 388, in func
      pool2.spawn(lambda: "Hi")
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/threadpool.py", line 523, in spawn
      raise InvalidThreadUseError
  gevent.exceptions.InvalidThreadUseError
  2024-12-12T08:24:34Z (<ThreadPoolWorker at 0x10373e300 thread_ident=0x309007000 threadpool-hub=<QuietHub at 0x1036b43b0 thread_ident=0x1f8e40f40>>, <function TestSpawn.test_cannot_spawn_from_other_thread.<locals>.func at 0x103565310>) failed with InvalidThreadUseError
  
  .....Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/threadpool.py", line 625, in _on_async
      self._call_when_ready()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__threadpool.py", line 698, in bad_when_ready
      raise MyException
  gevent.tests.test__threadpool.TestThreadResult.test_exception_in_on_async_doesnt_crash.<locals>.MyException
  2024-12-12T08:24:36Z <async_ at 0x1035c9eb0 native=0x1035c9ef0> failed with MyException
  
  ............Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/timeout.py", line 249, in _on_expiration
      prev_greenlet.throw(ex)
  TypeError: exceptions must be classes, or instances, not object
  2024-12-12T08:24:36Z <timer at 0x1035c8dd0 native=0x1035c8e10 callback=<bound method Timeout._on_expiration of <Timeout at 0x103d57ce0 seconds=0.01 exception=<object object at 0x103073550>>> args=(<greenlet.greenlet object at 0x101b456d0 (otid=0x103647ab0) suspended active started main>, <object object at 0x103073550>)> failed with TypeError
  
  Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/timeout.py", line 249, in _on_expiration
      prev_greenlet.throw(ex)
  TypeError: exceptions must be classes, or instances, not type
  2024-12-12T08:24:36Z <timer at 0x103ea3c80 native=0x103ea3cc0 callback=<bound method Timeout._on_expiration of <Timeout at 0x103d57be0 seconds=0.01 exception=<class 'gevent.tests.test__timeout.Test.test_expires_non_exception.<locals>.OldStyle'>>> args=(<greenlet.greenlet object at 0x101b456d0 (otid=0x103647ab0) suspended active started main>, <class 'gevent.tests.test__timeout.Test.test_expires_non_exception.<locals>.OldStyle'>)> failed with TypeError
  
  Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/timeout.py", line 249, in _on_expiration
      prev_greenlet.throw(ex)
  TypeError: exceptions must be classes, or instances, not OldStyle
  2024-12-12T08:24:36Z <timer at 0x1035c8dd0 native=0x1035c8e10 callback=<bound method Timeout._on_expiration of <Timeout at 0x103d57c60 seconds=0.01 exception=<gevent.tests.test__timeout.Test.test_expires_non_exception.<locals>.OldStyle object at 0x103c94f60>>> args=(<greenlet.greenlet object at 0x101b456d0 (otid=0x103647ab0) suspended active started main>, <gevent.tests.test__timeout.Test.test_expires_non_exception.<locals>.OldStyle object at 0x103c94f60>)> failed with TypeError
  
  .....
  ----------------------------------------------------------------------
  Ran 138 tests in 17.012s
  
  OK (skipped=1)
�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__socket_send_memoryview gevent.tests.test__socket_timeout gevent.tests.test__subprocess gevent.tests.test__thread gevent.tests.test__threadpool gevent.tests.test__timeout �[1;35m[Ran 138 tests in 17.2s�[1;33m (skipped=1)�[0m]�[0m�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__events gevent.tests.test__example_echoserver gevent.tests.test__example_udp_server gevent.tests.test__example_wsgiserver_ssl gevent.tests.test__examples gevent.tests.test__exc_info
  ....�[0m+ /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -W ignore -u echoserver.py�[0m
  Starting echo server on port 16000
  Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/examples/echoserver.py", line 37, in <module>
      server.serve_forever()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/baseserver.py", line 398, in serve_forever
      self.start()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/baseserver.py", line 336, in start
      self.init_socket()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/server.py", line 173, in init_socket
      self.socket = self.get_listener(self.address, self.backlog, self.family)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/server.py", line 185, in get_listener
      return _tcp_listener(address, backlog=backlog, reuse_addr=cls.reuse_addr, family=family)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/server.py", line 264, in _tcp_listener
      sock.bind(address)
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/_socketcommon.py", line 543, in bind
      return self._sock.bind(address)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  OSError: [Errno 48] Address already in use: ('127.0.0.1', 16000)
  F�[0m+ /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -W ignore -u udp_server.py�[0m
  Receiving datagrams on :9000
  127.0.0.1: got b'Test udp_server'
  .�[0m+ /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -W ignore -u wsgiserver_ssl.py�[0m
  Serving on https://:8443
  127.0.0.1 - - [2024-12-12 09:24:28] "GET / HTTP/1.1" 200 119 0.000474
  127.0.0.1 - - [2024-12-12 09:24:28] "GET /xxx HTTP/1.1" 404 126 0.000157
  .�[0m+ /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -W ignore -u wsgiserver_ssl.py�[0m
  Serving on https://:8443
  127.0.0.1 - - [2024-12-12 09:24:32] "GET / HTTP/1.1" 200 119 0.000760
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__example_wsgiserver.py:65: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
    context = ssl.SSLContext()
  /Users/pgalindo3/github/memray/gevent/src/gevent/tests/test__example_wsgiserver.py:65: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    context = ssl.SSLContext()
  127.0.0.1 - - [2024-12-12 09:24:32] "GET / HTTP/1.1" 200 119 0.000287
  127.0.0.1 - - [2024-12-12 09:24:32] "GET /xxx HTTP/1.0" 404 145 0.000080
  ...s.s.sss...
  ======================================================================
  FAIL: test (gevent.tests.test__example_echoserver.Test.test)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/util.py", line 613, in test
      with self.running_server():
           ^^^^^^^^^^^^^^^^^^^^^
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 137, in __enter__
      return next(self.gen)
             ^^^^^^^^^^^^^^
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/util.py", line 607, in running_server
      self.before()
    File "/Users/pgalindo3/github/memray/gevent/src/gevent/testing/util.py", line 619, in before
      self.assertIsNone(self.popen.poll(),
  AssertionError: 1 is not None : echoserver.py died with code 1
  
  ----------------------------------------------------------------------
  Ran 20 tests in 20.550s
  
  FAILED (failures=1, skipped=5)
�[0m
�[1;31m! /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__events gevent.tests.test__example_echoserver gevent.tests.test__example_udp_server gevent.tests.test__example_wsgiserver_ssl gevent.tests.test__examples gevent.tests.test__exc_info [code 1] �[1;35m[Ran 20 tests in 20.8s]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_wsgiref.py [Ran 35 tests in 0.3s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_selectors.py �[1;35m[Ran 121 tests in 10.8s�[1;33m (skipped=66)�[0m]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_threading.py [Ran 167 tests in 7.2s�[1;33m (skipped=31)�[0m]�[0m
�[0m| /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_ssl.py
  Running with patch_all(): /Users/pgalindo3/github/memray/gevent/src/greentest/3.12/test_ssl.py
  Added imports 1
  Skipped test_ssl.SimpleBackgroundTests.test_connect_with_context (2)
  Skipped test_ssl.ThreadedTests.test_recv_into_buffer_protocol_len (1)
  Skipped test_ssl.BasicSocketTests.test_private_init (2)
  Skipped test_ssl.SimpleBackgroundTests.test_get_server_certificate (5)
  Skipped test_ssl.ThreadedTests.test_socketserver (1)
  Skipped test_ssl.BasicSocketTests.test_random_fork (0)
  Skipped test_ssl.ThreadedTests.test_default_ciphers (0)
  Skipped test_ssl.BasicSocketTests.test_openssl_version (1)
  Skipped test_ssl.ThreadedTests.test_wrong_cert_tls13 (1)
  Skipped test_ssl.NetworkedTests.test_non_blocking_connect_ex (1)
  Skipped test_ssl.ThreadedTests.test_check_hostname_idn (1)
  Skipped test_ssl.SimpleBackgroundTests.test_connect_capath (1)
  Skipped test_ssl.BasicSocketTests.test_parse_cert_CVE_2019_5010 (1)
  Skipped test_ssl.BasicSocketTests.test_dealloc_warn (1)
  Skipped test_ssl.ThreadedTests.test_empty_cert (1)
  Skipped test_ssl.ThreadedTests.test_malformed_key (1)
  Skipped test_ssl.NetworkedTests.test_algorithms (0)
  Skipped test_ssl.ThreadedTests.test_nonblocking_send (1)
  Skipped test_ssl.ThreadedTests.test_malformed_cert (1)
  Skipped test_ssl.BasicSocketTests.test_connect_ex_error (1)
  test_ssl: testing with 'OpenSSL 3.4.0 22 Oct 2024' (3, 4, 0, 0, 0)
            under Mac ('14.7.1', ('', '', ''), 'arm64')
            HAS_SNI = True
            OP_ALL = 0x80000050
            OP_NO_TLSv1_1 = 0x10000000
  ...s.s.ssss.ss.s..
  {'OCSP': ('http://ocsp.verisign.com',),
   'caIssuers': ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',),
   'crlDistributionPoints': ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',),
   'issuer': ((('countryName', 'US'),),
              (('organizationName', 'VeriSign, Inc.'),),
              (('organizationalUnitName', 'VeriSign Trust Network'),),
              (('organizationalUnitName',
                'Terms of use at https://www.verisign.com/rpa (c)10'),),
              (('commonName', 'VeriSign Class 3 International Server CA - G3'),)),
   'notAfter': 'Sep 20 23:59:59 2012 GMT',
   'notBefore': 'Sep 21 00:00:00 2011 GMT',
   'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A',
   'subject': ((('countryName', 'FI'),),
               (('stateOrProvinceName', 'Espoo'),),
               (('localityName', 'Espoo'),),
               (('organizationName', 'Nokia'),),
               (('organizationalUnitName', 'BI'),),
               (('commonName', 'projects.developer.nokia.com'),)),
   'subjectAltName': (('DNS', 'projects.developer.nokia.com'),
                      ('DNS', 'projects.forum.nokia.com')),
   'version': 3}
  .
  {'issuer': ((('countryName', 'US'),),
              (('stateOrProvinceName', 'Oregon'),),
              (('localityName', 'Beaverton'),),
              (('organizationName', 'Python Software Foundation'),),
              (('organizationalUnitName', 'Python Core Development'),),
              (('commonName', 'null.python.org\x00example.org'),),
              (('emailAddress', '[email protected]'),)),
   'notAfter': 'Aug  7 13:12:52 2013 GMT',
   'notBefore': 'Aug  7 13:11:52 2013 GMT',
   'serialNumber': '00',
   'subject': ((('countryName', 'US'),),
               (('stateOrProvinceName', 'Oregon'),),
               (('localityName', 'Beaverton'),),
               (('organizationName', 'Python Software Foundation'),),
               (('organizationalUnitName', 'Python Core Development'),),
               (('commonName', 'null.python.org\x00example.org'),),
               (('emailAddress', '[email protected]'),)),
   'subjectAltName': (('DNS', 'altnull.python.org\x00example.com'),
                      ('email', '[email protected]\[email protected]'),
                      ('URI', 'http://null.python.org\x00http://example.org'),
                      ('IP Address', '192.0.2.1'),
                      ('IP Address', '2001:DB8:0:0:0:0:0:1')),
   'version': 3}
  .ss.
   RAND_status is 1 (sufficient randomness)
  . server:  new connection from ('127.0.0.1', 50077)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  ........................s....................s.....s. server:  new connection from ('127.0.0.1', 50083)
  Needed 2 calls to complete do_handshake().
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  Needed 3 calls to complete unwrap().
   connection timeout TimeoutError('timed out')
  . server:  new connection from ('127.0.0.1', 50093)
  Needed 2 calls to complete do_handshake().
  Needed 1 calls to complete write().
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  Needed 2 calls to complete read().
  Needed 2 calls to complete unwrap().
   connection timeout TimeoutError('timed out')
  . server:  new connection from ('127.0.0.1', 50097)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50098)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50100)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50101)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50103)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50104)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  .s server:  new connection from ('127.0.0.1', 50106)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50108)
  
   server:  bad connection attempt from ('127.0.0.1', 50108):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1000)
  .ss server:  new connection from ('127.0.0.1', 50110)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50112)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  Test server failure:
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2366, in run
      msg = self.read()
            ^^^^^^^^^^^
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2343, in read
      return self.sslconn.read()
             ^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 439, in read
      return self._sslobj.read(nbytes or 1024)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ssl.SSLError: [SYS] unknown error (_ssl.c:2570)
  .ssss server:  new connection from ('127.0.0.1', 50114)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  .s server:  new connection from ('127.0.0.1', 50116)
  
  Needed 2 calls to do_handshake() to establish session.
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50118)
  Needed 2 calls to complete do_handshake().
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  .................
  .
  .. server:  new connection from ('127.0.0.1', 50138)
   client cert is None
   client did not provide a cert
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  TLS: (<gevent.ssl.SSLSocket at 0x110af9f60 server=True, cipher=('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) object, fd=9, family=2, type=1, proto=0>, 'write', <TLSVersion.TLSv1_3: 772>, <_TLSContentType.ALERT: 21>, <_TLSAlertType.CERTIFICATE_REQUIRED: 116>, b'\x02t')
  Test server failure:
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2366, in run
      msg = self.read()
            ^^^^^^^^^^^
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2343, in read
      return self.sslconn.read()
             ^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 439, in read
      return self._sslobj.read(nbytes or 1024)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ssl.SSLError: [SSL: PEER_DID_NOT_RETURN_A_CERTIFICATE] peer did not return a certificate (_ssl.c:2570)
  TLS: (<gevent.ssl.SSLSocket at 0x110872ee0 server=False, cipher=('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256) object, fd=8, family=2, type=1, proto=0>, 'read', <TLSVersion.TLSv1_3: 772>, <_TLSContentType.ALERT: 21>, <_TLSAlertType.CERTIFICATE_REQUIRED: 116>, b'\x02t')
  ...sE......
   PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE
   PROTOCOL_TLS->PROTOCOL_TLS CERT_OPTIONAL
   PROTOCOL_TLS->PROTOCOL_TLS CERT_REQUIRED
   PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE
  . server:  new connection from ('127.0.0.1', 50165)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   server:  new connection from ('127.0.0.1', 50167)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   server:  new connection from ('127.0.0.1', 50169)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   server:  new connection from ('127.0.0.1', 50171)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  .
   server:  new connection from 127.0.0.1:50173
   client:  sending b'FOO\n'...
   server:  read b'FOO\n' from client
   client:  read b'foo\n'
   client:  closing connection.
   client:  connection closed.
   cleanup: stopping server.
   cleanup: joining server thread.
   server:  read b'over\n' from client
   server:  closed connection <gevent.ssl.SSLSocket [closed] at 0x110aa44e0 server=True, cipher='' object [closed proxy at 0x1100f6810 fd=9 closed]>
   server:  read b'' from client
   cleanup: successfully joined.
  .
   server:  new connection from ('127.0.0.1', 50175)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50177)
  
   server:  bad connection attempt from ('127.0.0.1', 50177):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] ssl/tls alert bad certificate (_ssl.c:1000)
   connection timeout TimeoutError('timed out')
  .s server:  new connection from ('127.0.0.1', 50184)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   got compression: None
  . server:  new connection from ('127.0.0.1', 50186)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  .
   server:  new connection from ('127.0.0.1', 50188)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  Test server failure:
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2366, in run
      msg = self.read()
            ^^^^^^^^^^^
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2343, in read
      return self.sslconn.read()
             ^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 439, in read
      return self._sslobj.read(nbytes or 1024)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ssl.SSLError: [SYS] unknown error (_ssl.c:2570)
   server:  new connection from ('127.0.0.1', 50190)
  
   server:  bad connection attempt from ('127.0.0.1', 50190):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1000)
   server:  new connection from ('127.0.0.1', 50192)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50194)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
  . server:  new connection from ('127.0.0.1', 50196)
   server: connection cipher is now ('DHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  .. server:  new connection from ('127.0.0.1', 50198)
   server: connection cipher is now ('ECDHE-ECDSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
  . server:  new connection from ('127.0.0.1', 50200)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50202)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   server:  new connection from ('127.0.0.1', 50204)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
   server:  new connection from ('127.0.0.1', 50206)
  
   server:  bad connection attempt from ('127.0.0.1', 50206):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: NO_SUITABLE_KEY_SHARE] no suitable key share (_ssl.c:1000)
   connection timeout TimeoutError('timed out')
  .s
  {'OCSP': ('http://testca.pythontest.net/testca/ocsp/',),
   'caIssuers': ('http://testca.pythontest.net/testca/pycacert.cer',),
   'crlDistributionPoints': ('http://testca.pythontest.net/testca/revocation.crl',),
   'issuer': ((('countryName', 'XY'),),
              (('organizationName', 'Python Software Foundation CA'),),
              (('commonName', 'our-ca-server'),)),
   'notAfter': 'Oct 28 14:23:16 2037 GMT',
   'notBefore': 'Aug 29 14:23:16 2018 GMT',
   'serialNumber': 'CB2D80995A69525C',
   'subject': ((('countryName', 'XY'),),
               (('localityName', 'Castle Anthrax'),),
               (('organizationName', 'Python Software Foundation'),),
               (('commonName', 'localhost'),)),
   'subjectAltName': (('DNS', 'localhost'),),
   'version': 3}
  Connection cipher is ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256).
  ... server:  new connection from ('127.0.0.1', 50264)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50266)
  
   server:  bad connection attempt from ('127.0.0.1', 50266):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] ssl/tls alert bad certificate (_ssl.c:1000)
  . server:  new connection from ('127.0.0.1', 50268)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  .ssss server:  new connection from ('127.0.0.1', 50270)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  . server:  new connection from ('127.0.0.1', 50272)
  
   server:  bad connection attempt from ('127.0.0.1', 50272):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1000)
   connection timeout TimeoutError('timed out')
  .s.sss
   PROTOCOL_TLSv1_2->PROTOCOL_TLSv1_2 CERT_NONE
   {PROTOCOL_TLS->PROTOCOL_TLSv1_2} CERT_NONE
   connection timeout TimeoutError('timed out')
   PROTOCOL_TLSv1_2->PROTOCOL_TLS CERT_NONE
  ..s
   server:  new connection from ('127.0.0.1', 50284)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50287)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  .. server:  new connection from ('127.0.0.1', 50291)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  . server:  new connection from ('127.0.0.1', 50293)
   client:  sending b'FOO\n'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  sending b'FOO\n'...
   client:  read b'foo\n'
   client:  closing connection.
  ... server:  new connection from ('127.0.0.1', 50299)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
   server:  new connection from ('127.0.0.1', 50301)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
   server:  new connection from ('127.0.0.1', 50303)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
   server:  new connection from ('127.0.0.1', 50305)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
  .. server:  new connection from ('127.0.0.1', 50311)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . server:  new connection from ('127.0.0.1', 50313)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50315)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server:  new connection from ('127.0.0.1', 50317)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  . connection timeout TimeoutError('timed out')
  . connection timeout TimeoutError('timed out')
  . connection timeout TimeoutError('timed out')
  .s
   server:  new connection from ('127.0.0.1', 50332)
  
   server:  bad connection attempt from ('127.0.0.1', 50332):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1000)
  .
   client:  sending b'msg 1'...
   server:  new connection from ('127.0.0.1', 50334)
   server: read b'msg 1' (unencrypted), sending back b'msg 1' (unencrypted)...
   client:  read b'msg 1' from server
   client:  sending b'MSG 2'...
   server: read b'MSG 2' (unencrypted), sending back b'msg 2' (unencrypted)...
   client:  read b'msg 2' from server
   client:  sending b'STARTTLS'...
   server: read STARTTLS from client, sending OK...
   client:  read b'ok' from server, starting TLS...
   client:  sending b'MSG 3'...
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
   server: read b'MSG 3' (encrypted), sending back b'msg 3' (encrypted)...
   client:  read b'msg 3' from server
   client:  sending b'msg 4'...
   server: read b'msg 4' (encrypted), sending back b'msg 4' (encrypted)...
   client:  read b'msg 4' from server
   client:  sending b'ENDTLS'...
   server: read ENDTLS from client, sending OK...
   client:  read b'ok' from server, ending TLS...
   client:  sending b'msg 5'...
   server: connection is now unencrypted...
   server: read b'msg 5' (unencrypted), sending back b'msg 5' (unencrypted)...
   client:  read b'msg 5' from server
   client:  sending b'msg 6'...
   server: read b'msg 6' (unencrypted), sending back b'msg 6' (unencrypted)...
   client:  read b'msg 6' from server
   client:  closing connection.
   server: client closed connection
  . server:  new connection from ('127.0.0.1', 50336)
   server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
  .
   server:  new connection from ('127.0.0.1', 50338)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
   got channel binding data: b'\xfa\x8d\xaf\x12\xbf\xfd\xec\xd6\x15r\xe5\x8b'
   server:  new connection from ('127.0.0.1', 50339)
   server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256)
  got another channel binding data: b'9\xa0\xab\xd8a\xac,\x1f\xe56\xbc\xc8'
  .. server:  new connection from ('127.0.0.1', 50344)
  
   server:  bad connection attempt from ('127.0.0.1', 50344):
  Traceback (most recent call last):
     File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 2281, in wrap_conn
      self.sslconn = self.server.context.wrap_socket(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 122, in wrap_socket
      return self.sslsocket_class(
             ^^^^^^^^^^^^^^^^^^^^^
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 351, in __init__
      self.do_handshake()
     File "/Users/pgalindo3/github/memray/gevent/src/gevent/ssl.py", line 740, in do_handshake
      self._sslobj.do_handshake()
   ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1000)
  
  SSLError is SSLError(1, '[SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1000)')
   connection timeout TimeoutError('timed out')
  .s
  ======================================================================
  ERROR: test_preauth_data_to_tls_server (__main__.TestPreHandshakeClose.test_preauth_data_to_tls_server)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 4896, in test_preauth_data_to_tls_server
      self.non_linux_skip_if_other_okay_error(wrap_error)
    File "/var/folders/z8/xbqbt70d4xncwd5v8ccnvx0h0000gq/T/test_ssl6jbx780t.py", line 4843, in non_linux_skip_if_other_okay_error
      re.search('wrong.version.number', getattr(err, "reason", ""), re.I)):
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/homebrew/Cellar/[email protected]/3.12.7_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/re/__init__.py", line 177, in search
      return _compile(pattern, flags).search(string)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  TypeError: expected string or bytes-like object, got 'NoneType'
  
  ----------------------------------------------------------------------
  Ran 183 tests in 11.239s
  
  FAILED (errors=1, skipped=36)
�[0m
�[1;31m! /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_ssl.py [code 1] �[1;35m[Ran 183 tests in 11.6s]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__order gevent.tests.test__os gevent.tests.test__pool gevent.tests.test__queue gevent.tests.test__real_greenlet gevent.tests.test__refcount_core �[1;35m[Ran 219 tests in 30.0s�[1;33m (skipped=3)�[0m]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_weakref.py �[1;35m[Ran 133 tests in 14.6s]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_subprocess.py �[1;35m[Ran 341 tests in 20.0s�[1;33m (skipped=86)�[0m]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_socket.py �[1;35m[Ran 731 tests in 22.8s�[1;33m (skipped=284)�[0m]�[0m�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_signal.py �[1;35m[Ran 57 tests in 41.8s�[1;33m (skipped=18)�[0m]�[0m�[0m
�[0mRunning tests marked standalone�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__example_webproxy [Ran 2 tests in 3.9s�[1;33m (skipped=1)�[0m]�[0m
�[0m- /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__example_wsgiserver [Ran 2 tests in 7.3s]�[0m
�[36mReaping 9 jobs�[0m
�[0m
Longest-running tests:�[0m
�[0m41.8 seconds: /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_signal.py�[0m
�[0m30.0 seconds: /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__order gevent.tests.test__os gevent.tests.test__pool gevent.tests.test__queue gevent.tests.test__real_greenlet gevent.tests.test__refcount_core�[0m
�[0m22.8 seconds: /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_socket.py�[0m
�[0m20.8 seconds: /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__events gevent.tests.test__example_echoserver gevent.tests.test__example_udp_server gevent.tests.test__example_wsgiserver_ssl gevent.tests.test__examples gevent.tests.test__exc_info�[0m
�[0m20.0 seconds: /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_subprocess.py�[0m
�[36m
4/70 tests failed in 01:04�[0m
�[1;31m
4/70 unexpected failures�[0m
�[0m - /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -mgevent.tests.test__backdoor�[0m
�[0m - /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_httplib.py�[0m
�[0m - /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -m unittest gevent.tests.test__events gevent.tests.test__example_echoserver gevent.tests.test__example_udp_server gevent.tests.test__example_wsgiserver_ssl gevent.tests.test__examples gevent.tests.test__exc_info�[0m
�[0m - /Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -u -W ignore -m gevent.testing.monkey_test test_ssl.py�[0m
�[0m
Ran 4271 tests�[1;33m (skipped=903)�[0m in 70 files in 01:04�[0m
Writing profile results into memray-gevent.tests.54067.bin
[memray] Successfully generated profile results.

You can now generate reports from the stored allocation records.
Some example commands to generate reports:

/Users/pgalindo3/github/memray/gevent/.tox/py12/bin/python -m memray flamegraph memray-gevent.tests.54067.bin

Greenlet test suite
⚠ Memray support for Greenlet is experimental ⚠
Please report any issues at https://github.com/bloomberg/memray/issues


test_break_ctxvars (greenlet.tests.test_contextvars.ContextVarsTests.test_break_ctxvars) ... ok
test_context_assignment_different_thread (greenlet.tests.test_contextvars.ContextVarsTests.test_context_assignment_different_thread) ... ok
test_context_assignment_while_running (greenlet.tests.test_contextvars.ContextVarsTests.test_context_assignment_while_running) ... ok
test_context_assignment_wrong_type (greenlet.tests.test_contextvars.ContextVarsTests.test_context_assignment_wrong_type) ... ok
test_context_not_propagated (greenlet.tests.test_contextvars.ContextVarsTests.test_context_not_propagated) ... ok
test_context_propagated_by_context_run (greenlet.tests.test_contextvars.ContextVarsTests.test_context_propagated_by_context_run) ... ok
test_context_propagated_by_setting_attribute (greenlet.tests.test_contextvars.ContextVarsTests.test_context_propagated_by_setting_attribute) ... ok
test_context_shared (greenlet.tests.test_contextvars.ContextVarsTests.test_context_shared) ... ok
test_not_broken_if_using_attribute_instead_of_context_run (greenlet.tests.test_contextvars.ContextVarsTests.test_not_broken_if_using_attribute_instead_of_context_run) ... ok
test_contextvars_errors (greenlet.tests.test_contextvars.NoContextVarsTests.test_contextvars_errors) ... skipped 'ContextVar supported'
test_exception_switch (greenlet.tests.test_cpp.CPPTests.test_exception_switch) ... ok
test_unhandled_exception_in_greenlet_aborts (greenlet.tests.test_cpp.CPPTests.test_unhandled_exception_in_greenlet_aborts) ... ok
test_unhandled_nonstd_exception_aborts (greenlet.tests.test_cpp.CPPTests.test_unhandled_nonstd_exception_aborts) ... ok
test_unhandled_std_exception_aborts (greenlet.tests.test_cpp.CPPTests.test_unhandled_std_exception_aborts) ... ok
test_unhandled_std_exception_as_greenlet_function_aborts (greenlet.tests.test_cpp.CPPTests.test_unhandled_std_exception_as_greenlet_function_aborts) ... ok
test_getcurrent (greenlet.tests.test_extension_interface.CAPITests.test_getcurrent) ... ok
test_instance_of_wrong_type (greenlet.tests.test_extension_interface.CAPITests.test_instance_of_wrong_type) ... ok
test_new_greenlet (greenlet.tests.test_extension_interface.CAPITests.test_new_greenlet) ... ok
test_non_traceback_param (greenlet.tests.test_extension_interface.CAPITests.test_non_traceback_param) ... ok
test_not_throwable (greenlet.tests.test_extension_interface.CAPITests.test_not_throwable) ... ok
test_raise_greenlet_dead (greenlet.tests.test_extension_interface.CAPITests.test_raise_greenlet_dead) ... ok
test_raise_greenlet_error (greenlet.tests.test_extension_interface.CAPITests.test_raise_greenlet_error) ... ok
test_setparent (greenlet.tests.test_extension_interface.CAPITests.test_setparent) ... ok
test_switch (greenlet.tests.test_extension_interface.CAPITests.test_switch) ... ok
test_switch_kwargs (greenlet.tests.test_extension_interface.CAPITests.test_switch_kwargs) ... ok
test_throw (greenlet.tests.test_extension_interface.CAPITests.test_throw) ... ok
test_circular_greenlet (greenlet.tests.test_gc.GCTests.test_circular_greenlet) ... ok
test_dead_circular_ref (greenlet.tests.test_gc.GCTests.test_dead_circular_ref) ... ok
test_finalizer_crash (greenlet.tests.test_gc.GCTests.test_finalizer_crash) ... ok
test_inactive_ref (greenlet.tests.test_gc.GCTests.test_inactive_ref) ... ok
test_generator (greenlet.tests.test_generator.GeneratorTests.test_generator) ... ok
test_genlet_bad (greenlet.tests.test_generator_nested.NestedGeneratorTests.test_genlet_bad) ... ok
test_genlet_simple (greenlet.tests.test_generator_nested.NestedGeneratorTests.test_genlet_simple) ... ok
test_layered_genlets (greenlet.tests.test_generator_nested.NestedGeneratorTests.test_layered_genlets) ... ok
test_nested_genlets (greenlet.tests.test_generator_nested.NestedGeneratorTests.test_nested_genlets) ... ok
test_permutations (greenlet.tests.test_generator_nested.NestedGeneratorTests.test_permutations) ... ok
test_failed_to_initialstub (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_failed_to_initialstub) ... ok
test_failed_to_slp_switch_into_running (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_failed_to_slp_switch_into_running) ... ok
test_failed_to_switch_into_running (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_failed_to_switch_into_running) ... ok
test_reentrant_switch_GreenletAlreadyStartedInPython (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_reentrant_switch_GreenletAlreadyStartedInPython) ... ok
test_reentrant_switch_run_callable_has_del (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_reentrant_switch_run_callable_has_del) ... ok
test_reentrant_switch_three_greenlets (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_reentrant_switch_three_greenlets) ... ok
test_reentrant_switch_three_greenlets2 (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_reentrant_switch_three_greenlets2) ... ok
test_reentrant_switch_two_greenlets (greenlet.tests.test_greenlet.TestBrokenGreenlets.test_reentrant_switch_two_greenlets) ... ok
test_abstract_subclasses (greenlet.tests.test_greenlet.TestGreenlet.test_abstract_subclasses) ... ok
test_can_access_f_back_of_suspended_greenlet (greenlet.tests.test_greenlet.TestGreenlet.test_can_access_f_back_of_suspended_greenlet) ... ok
test_dealloc (greenlet.tests.test_greenlet.TestGreenlet.test_dealloc) ... ok
test_dealloc_catches_GreenletExit_throws_other (greenlet.tests.test_greenlet.TestGreenlet.test_dealloc_catches_GreenletExit_throws_other) ... ok
test_dealloc_other_thread (greenlet.tests.test_greenlet.TestGreenlet.test_dealloc_other_thread) ... ok
test_dealloc_switch_args_not_lost (greenlet.tests.test_greenlet.TestGreenlet.test_dealloc_switch_args_not_lost) ... ok
test_deepcopy (greenlet.tests.test_greenlet.TestGreenlet.test_deepcopy) ... ok
test_exc_state (greenlet.tests.test_greenlet.TestGreenlet.test_exc_state) ... ok
test_exception (greenlet.tests.test_greenlet.TestGreenlet.test_exception) ... ok
test_falling_off_end_switches_to_unstarted_parent_raises_error (greenlet.tests.test_greenlet.TestGreenlet.test_falling_off_end_switches_to_unstarted_parent_raises_error) ... ok
test_falling_off_end_switches_to_unstarted_parent_works (greenlet.tests.test_greenlet.TestGreenlet.test_falling_off_end_switches_to_unstarted_parent_works) ... ok
test_frame (greenlet.tests.test_greenlet.TestGreenlet.test_frame) ... ok
test_frames_always_exposed (greenlet.tests.test_greenlet.TestGreenlet.test_frames_always_exposed) ... ok
test_get_stack_with_nested_c_calls (greenlet.tests.test_greenlet.TestGreenlet.test_get_stack_with_nested_c_calls) ... ok
test_implicit_parent_with_threads (greenlet.tests.test_greenlet.TestGreenlet.test_implicit_parent_with_threads) ... ok
test_instance_dict (greenlet.tests.test_greenlet.TestGreenlet.test_instance_dict) ... FAIL
test_issue_245_reference_counting_subclass_no_threads (greenlet.tests.test_greenlet.TestGreenlet.test_issue_245_reference_counting_subclass_no_threads) ... ok
test_issue_245_reference_counting_subclass_threads (greenlet.tests.test_greenlet.TestGreenlet.test_issue_245_reference_counting_subclass_threads) ... ok
test_parent_equals_None (greenlet.tests.test_greenlet.TestGreenlet.test_parent_equals_None) ... ok
test_parent_restored_on_kill (greenlet.tests.test_greenlet.TestGreenlet.test_parent_restored_on_kill) ... ok
test_parent_return_failure (greenlet.tests.test_greenlet.TestGreenlet.test_parent_return_failure) ... ok
test_recursive_startup (greenlet.tests.test_greenlet.TestGreenlet.test_recursive_startup) ... ok
test_run_equals_None (greenlet.tests.test_greenlet.TestGreenlet.test_run_equals_None) ... ok
test_running_greenlet_has_no_run (greenlet.tests.test_greenlet.TestGreenlet.test_running_greenlet_has_no_run) ... ok
test_send_exception (greenlet.tests.test_greenlet.TestGreenlet.test_send_exception) ... ok
test_simple (greenlet.tests.test_greenlet.TestGreenlet.test_simple) ... ok
test_switch_kwargs (greenlet.tests.test_greenlet.TestGreenlet.test_switch_kwargs) ... ok
test_switch_kwargs_to_parent (greenlet.tests.test_greenlet.TestGreenlet.test_switch_kwargs_to_parent) ... ok
test_switch_no_run_raises_AttributeError (greenlet.tests.test_greenlet.TestGreenlet.test_switch_no_run_raises_AttributeError) ... ok
test_switch_to_another_thread (greenlet.tests.test_greenlet.TestGreenlet.test_switch_to_another_thread) ... ok
test_switch_to_dead_greenlet_reparent (greenlet.tests.test_greenlet.TestGreenlet.test_switch_to_dead_greenlet_reparent) ... ok
test_switch_to_dead_greenlet_with_unstarted_perverse_parent (greenlet.tests.test_greenlet.TestGreenlet.test_switch_to_dead_greenlet_with_unstarted_perverse_parent) ... ok
test_thread_bug (greenlet.tests.test_greenlet.TestGreenlet.test_thread_bug) ... ok
test_threaded_updatecurrent (greenlet.tests.test_greenlet.TestGreenlet.test_threaded_updatecurrent) ... ok
test_threads (greenlet.tests.test_greenlet.TestGreenlet.test_threads) ... ok
test_throw_exception_not_lost (greenlet.tests.test_greenlet.TestGreenlet.test_throw_exception_not_lost) ... ok
test_throw_no_run_raises_AttributeError (greenlet.tests.test_greenlet.TestGreenlet.test_throw_no_run_raises_AttributeError) ... ok
test_throw_to_dead_thread_doesnt_crash (greenlet.tests.test_greenlet.TestGreenlet.test_throw_to_dead_thread_doesnt_crash) ... ok
test_throw_to_dead_thread_doesnt_crash_wait (greenlet.tests.test_greenlet.TestGreenlet.test_throw_to_dead_thread_doesnt_crash_wait) ... ok
test_tuple_subclass (greenlet.tests.test_greenlet.TestGreenlet.test_tuple_subclass) ... ok
test_two_children (greenlet.tests.test_greenlet.TestGreenlet.test_two_children) ... ok
test_two_recursive_children (greenlet.tests.test_greenlet.TestGreenlet.test_two_recursive_children) ... ok
test_cannot_delete_parent (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_cannot_delete_parent) ... ok
test_cannot_delete_parent_of_main (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_cannot_delete_parent_of_main) ... ok
test_deeper_cycle (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_deeper_cycle) ... ok
test_main_greenlet_parent_is_none (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_main_greenlet_parent_is_none) ... ok
test_set_parent_wrong_types (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_set_parent_wrong_types) ... ok
test_threaded_reparent (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_threaded_reparent) ... ok
test_trivial_cycle (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_trivial_cycle) ... ok
test_trivial_cycle_main (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_trivial_cycle_main) ... ok
test_unexpected_reparenting (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_unexpected_reparenting) ... ok
test_unexpected_reparenting_thread_running (greenlet.tests.test_greenlet.TestGreenletSetParentErrors.test_unexpected_reparenting_thread_running) ... ok
test_main_greenlet_is_greenlet (greenlet.tests.test_greenlet.TestMainGreenlet.test_main_greenlet_is_greenlet) ... ok
test_main_greenlet_type_can_be_subclassed (greenlet.tests.test_greenlet.TestMainGreenlet.test_main_greenlet_type_can_be_subclassed) ... ok
test_dead (greenlet.tests.test_greenlet.TestRepr.test_dead) ... ok
test_formatting_produces_native_str (greenlet.tests.test_greenlet.TestRepr.test_formatting_produces_native_str) ... ok
test_initial (greenlet.tests.test_greenlet.TestRepr.test_initial) ... ok
test_main_from_other_thread (greenlet.tests.test_greenlet.TestRepr.test_main_from_other_thread) ... ok
test_main_in_background (greenlet.tests.test_greenlet.TestRepr.test_main_in_background) ... ok
test_main_while_running (greenlet.tests.test_greenlet.TestRepr.test_main_while_running) ... ok
test_it (greenlet.tests.test_greenlet_trash.TestTrashCanReEnter.test_it) ... ok
test_arg_refs (greenlet.tests.test_leaks.TestLeaks.test_arg_refs) ... ok
test_issue251_issue252_explicit_reference_not_collectable (greenlet.tests.test_leaks.TestLeaks.test_issue251_issue252_explicit_reference_not_collectable) ... ok
test_issue251_issue252_need_to_collect_in_background (greenlet.tests.test_leaks.TestLeaks.test_issue251_issue252_need_to_collect_in_background) ... ok
test_issue251_issue252_need_to_collect_in_background_cleanup_disabled (greenlet.tests.test_leaks.TestLeaks.test_issue251_issue252_need_to_collect_in_background_cleanup_disabled) ... ok
test_issue251_killing_cross_thread_leaks_list (greenlet.tests.test_leaks.TestLeaks.test_issue251_killing_cross_thread_leaks_list) ... ok
test_issue251_with_cleanup_disabled (greenlet.tests.test_leaks.TestLeaks.test_issue251_with_cleanup_disabled) ... ok
test_kwarg_refs (greenlet.tests.test_leaks.TestLeaks.test_kwarg_refs) ... ok
test_threaded_adv_leak (greenlet.tests.test_leaks.TestLeaks.test_threaded_adv_leak) ... ok
test_threaded_leak (greenlet.tests.test_leaks.TestLeaks.test_threaded_leak) ... ok
test_untracked_memory_doesnt_increase (greenlet.tests.test_leaks.TestLeaks.test_untracked_memory_doesnt_increase) ... ok
test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_main (greenlet.tests.test_leaks.TestLeaks.test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_main) ... ok
test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_thread (greenlet.tests.test_leaks.TestLeaks.test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_thread) ... ok
test_stack_saved (greenlet.tests.test_stack_saved.Test.test_stack_saved) ... ok
test_class (greenlet.tests.test_throw.ThrowTests.test_class) ... ok
test_instance_of_wrong_type (greenlet.tests.test_throw.ThrowTests.test_instance_of_wrong_type) ... ok
test_kill (greenlet.tests.test_throw.ThrowTests.test_kill) ... ok
test_non_traceback_param (greenlet.tests.test_throw.ThrowTests.test_non_traceback_param) ... ok
test_not_throwable (greenlet.tests.test_throw.ThrowTests.test_not_throwable) ... ok
test_throw_goes_to_original_parent (greenlet.tests.test_throw.ThrowTests.test_throw_goes_to_original_parent) ... ok
test_val (greenlet.tests.test_throw.ThrowTests.test_val) ... ok
test_a_greenlet_tracing (greenlet.tests.test_tracing.TestGreenletTracing.test_a_greenlet_tracing) ... ok
test_b_exception_disables_tracing (greenlet.tests.test_tracing.TestGreenletTracing.test_b_exception_disables_tracing) ... ok
test_set_same_tracer_twice (greenlet.tests.test_tracing.TestGreenletTracing.test_set_same_tracer_twice) ... ok
test_trace_events_from_greenlet_func_sets_profiler (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_from_greenlet_func_sets_profiler) ... FAIL
test_trace_events_from_greenlet_subclass_sets_profiler (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_from_greenlet_subclass_sets_profiler) ... ok
test_trace_events_into_greenlet_func_already_set (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_into_greenlet_func_already_set) ... ok
test_trace_events_into_greenlet_subclass_already_set (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_into_greenlet_subclass_already_set) ... ok
test_trace_events_multiple_greenlets_switching (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_multiple_greenlets_switching) ... ok
test_trace_events_multiple_greenlets_switching_siblings (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_multiple_greenlets_switching_siblings) ... ok
test_trace_events_trivial (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_trivial) ... ok
test_version (greenlet.tests.test_version.VersionTests.test_version) ... ok
test_dead_weakref (greenlet.tests.test_weakref.WeakRefTests.test_dead_weakref) ... ok
test_dealloc_weakref (greenlet.tests.test_weakref.WeakRefTests.test_dealloc_weakref) ... ok
test_inactive_weakref (greenlet.tests.test_weakref.WeakRefTests.test_inactive_weakref) ... ok

======================================================================
FAIL: test_instance_dict (greenlet.tests.test_greenlet.TestGreenlet.test_instance_dict)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 317, in wrapper
    return _RefCountChecker(self, method)(args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 295, in __call__
    self._run_test(args, kwargs)
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 212, in _run_test
    self.function(self.testcase, *args, **kwargs)
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/test_greenlet.py", line 363, in test_instance_dict
    self.assertEqual(g.__dict__, {'test': 42})
AssertionError: {'test': 42, '_memray_tid': 488} != {'test': 42}
- {'_memray_tid': 488, 'test': 42}
+ {'test': 42}

======================================================================
FAIL: test_trace_events_from_greenlet_func_sets_profiler (greenlet.tests.test_tracing.TestPythonTracing.test_trace_events_from_greenlet_func_sets_profiler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 317, in wrapper
    return _RefCountChecker(self, method)(args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 295, in __call__
    self._run_test(args, kwargs)
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/leakcheck.py", line 212, in _run_test
    self.function(self.testcase, *args, **kwargs)
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/test_tracing.py", line 189, in test_trace_events_from_greenlet_func_sets_profiler
    self._check_trace_events_from_greenlet_sets_profiler(greenlet.greenlet(run),
  File "/Users/pgalindo3/github/memray/greenlet/.tox/py12/lib/python3.12/site-packages/greenlet/tests/test_tracing.py", line 171, in _check_trace_events_from_greenlet_sets_profiler
    self.assertEqual(tracer.actions, [
AssertionError: Lists differ: [('c_return', '__enter__'), ('return', '__en[241 chars]__')] != [('return', '__enter__'), ('call', 'tpt_call[149 chars]__')]

First differing element 0:
('c_return', '__enter__')
('return', '__enter__')

First list contains 2 additional elements.
First extra element 8:
('call', '__exit__')

- [('c_return', '__enter__'),
?    --

+ [('return', '__enter__'),
-  ('return', '__enter__'),
   ('call', 'tpt_callback'),
   ('return', 'tpt_callback'),
   ('return', 'run'),
-  ('c_return', '_check_trace_events_from_greenlet_sets_profiler'),
   ('call', 'tpt_callback'),
   ('return', 'tpt_callback'),
   ('call', '__exit__'),
   ('c_call', '__exit__')]

----------------------------------------------------------------------
Ran 139 tests in 67.400s

FAILED (failures=2, skipped=1)
Writing profile results into memray-unittest.55086.bin
Time limit exceeded.
Threads: Waiting for only 1 --> 1
MGlets : Waiting for only 6 --> 7
Time limit exceeded.
Threads: Waiting for only 1 --> 1
MGlets : Waiting for only 14 --> 18
Time limit exceeded.
Threads: Waiting for only 1 --> 1
MGlets : Waiting for only 14 --> 18
[memray] Successfully generated profile results.

You can now generate reports from the stored allocation records.
Some example commands to generate reports:

/Users/pgalindo3/github/memray/greenlet/.tox/py12/bin/python -m memray flamegraph memray-unittest.55086.bin

@Clae224
Copy link
Author

Clae224 commented Dec 12, 2024

I assume the above was with pytest-memray?

Will do my best to try come up with a reproduction for the segfault.

@pablogsal
Copy link
Member

No, just memray (they don't use pytest). But pytest memray is not doing anything by itself tricky, the problem likely is that pytest is just adding ton of extra behaviour that somehow makes the problem more common but the problem is likely there anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants