pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

python: GIL deadlock if Endpoint::libHandleEvents and Call::getInfo are called concurrently under some conditions

Open azertyfun opened this issue 3 years ago • 0 comments

Describe the bug

Hi,

My code sometimes deadlocks when ep.libHandleEvents() is called while another thread is already handling Call::getInfo(). This seems to only happen when a call is initiated outside of the main thread.

If you attempt to reproduce, you might have to retry quite a few times; as the race condition happens in the print call, it's not terribly likely to happen.

Note that the backtrace is always the same once you can reproduce the issue, it always deadlocks on libHandleEvents() on the main thread and while building the f-string with getInfo on the worker thread.

I've worked around the issue by having a global lock held by libHandleEvents as well as all my Call callbacks.

Steps to reproduce

  • Make the sample python app;
  • Replace the time.sleep(10) with a loop over ep.libHandleEvents(100) as the original method leads to a segfault (this seems to be the standard way to do things from what I've seen online);
  • Start a new thread, call libRegisterThread;
  • In that new thread, when registered, initiate a call;
  • In the Call handlers, print some debug info using self.getInfo().

Python code:

#!/usr/bin/env python3

import threading
import time

import pjsua2 as pj

CALL_ADDRESS = 'sip:<rempte_user>@<server>'
ACC_URI = 'sip:<user>@<server>'
REG_URI = 'sip:<server>'
USER = '<user>'
PASS = '<pass>'

REGISTERED = threading.Event()

# Subclass to extend the Account and get notifications etc.
class Account(pj.Account):
  def onRegState(self, prm):
      print(f'***OnRegState: {prm.reason}')
      if prm.reason == 'OK':
          REGISTERED.set()

class Call(pj.Call):
    def __init__(self, account: Account, dest: str = None):
        self.account = account
        self.dest = dest

        super().__init__(account)

    def makeCall(self):
        prm = pj.CallOpParam(True)

        print(f'Call<{self.getId()}> calling {self.dest}')
        super().makeCall(self.dest, prm)

    def onCallState(self, prm):
        i = self.getInfo()

        print(f'Call<{self.getId()}> new state: {self.getInfo().stateText}')
            del self

    def onCallMediaState(self, prm):
        print(f'Call<{self.getId()}> media event: {self.getInfo().stateText}')

class MyThread(threading.Thread):
    def __init__(self, ep, acc):
        super().__init__(daemon=True)
        self.ep = ep
        self.acc = acc

    def run(self):
        self.ep.libRegisterThread(self.name)

        call_made = False
        while True:
            if REGISTERED.is_set() and not call_made:
                c = Call(self.acc, CALL_ADDRESS)
                c.makeCall()
                call_made = True
            time.sleep(1)

# pjsua2 test function
def main():
    # Create and initialize the library
    ep_cfg = pj.EpConfig()
    ep_cfg.uaConfig.threadCnt = 0 # Python does not like PJSUA2's thread. It will result in segment fault
    ep_cfg.uaConfig.mainThreadOnly = True
    ep_cfg.logConfig.level = 2
    ep = pj.Endpoint()
    ep.libCreate()
    ep.libInit(ep_cfg)
    ep.audDevManager().setNullDev()

    # Create SIP transport. Error handling sample is shown
    sipTpConfig = pj.TransportConfig()
    sipTpConfig.port = 5060
    ep.transportCreate(pj.PJSIP_TRANSPORT_UDP, sipTpConfig)
    # Start the library
    ep.libStart()

    acfg = pj.AccountConfig()
    acfg.idUri = ACC_URI
    acfg.regConfig.registrarUri = REG_URI
    cred = pj.AuthCredInfo("digest", "*", USER, 0, PASS)
    acfg.sipConfig.authCreds.append( cred )
    # Create the account
    acc = Account()
    acc.create(acfg)

    MyThread(ep, acc).start()

    # handle events
    for _ in range(100): # run for about 10 seconds
        ep.libHandleEvents(100)

    # Destroy the library
    ep.libDestroy()

if __name__ == '__main__':
    main()

PJSIP version

2.12.1

Context

Using python 3.10 in the following docker image:

FROM python:3.10-bullseye

# Build pjproject
# Shamelessly inspired from here: https://github.com/GreyBitter/pjsua2_docker/blob/master/Dockerfile
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update
RUN apt-get install --fix-missing libasound2-dev \
    libssl-dev libv4l-dev \
    libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev \
    libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev \
    libx264-dev libavformat-dev libavcodec-dev \
    libavdevice-dev libavfilter-dev libavresample-dev \
    libavutil-dev libavcodec-extra libopus-dev \
    libopencore-amrwb-dev libopencore-amrnb-dev \
    libvo-amrwbenc-dev subversion python3-pip git swig -y

RUN git clone https://github.com/pjsip/pjproject.git --branch=2.12.1 --depth=1
WORKDIR pjproject

RUN export CFLAGS="$CFLAGS -fPIC" \
    && ./configure --enable-shared \
    && make dep \
    && make -j8 \
    && make install
COPY 0001-Don-t-build-Java-bindings.patch .
RUN patch -p1 < 0001-Don-t-build-Java-bindings.patch
RUN make -C pjsip-apps/src/swig \
    && cd pjsip-apps/src/swig/python/ \
    && make install \
    && python3 setup.py install
WORKDIR ..
RUN rm -rf pjproject
ENV LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

RUN apt-get install -y gdb python3-dbg

0001-Don-t-build-Java-bindings.patch:

From c80630d6923f50b29fc136e75a8bed5de4ae50dd Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <[email protected]>
Date: Sat, 22 Feb 2020 04:54:58 +0000
Subject: [PATCH] Don't build Java bindings

Signed-off-by: Caleb Maclennan <[email protected]>
---
 pjsip-apps/src/swig/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pjsip-apps/src/swig/Makefile b/pjsip-apps/src/swig/Makefile
index abb317b..1f4759f 100644
--- a/pjsip-apps/src/swig/Makefile
+++ b/pjsip-apps/src/swig/Makefile
@@ -7,7 +7,7 @@ else
     ifneq ($(findstring ios,$(TARGET_NAME)),)
   	LANG = csharp
     else
-  	LANG = python java
+  	LANG = python
     endif
 endif
 
-- 
2.25.1

Log, call stack, etc

(gdb) info threads
  Id   Target Id                                Frame 
* 1    Thread 0x7f54b4a92740 (LWP 1) "python3"  __lll_lock_wait (futex=futex@entry=0x7f54ac010198, private=0) at lowlevellock.c:52
  2    Thread 0x7f54b3571700 (LWP 7) "python3"  0x00007f54b4ccdc61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f54b3570690, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
  3    Thread 0x7f54b2d70700 (LWP 8) "python3"  futex_abstimed_wait_cancelable (private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559b7ef7da20) at ../sysdeps/nptl/futex-internal.h:323
  4    Thread 0x7f54b1d6e700 (LWP 10) "python3" futex_abstimed_wait_cancelable (private=0, abstime=0x7f54b1d6b590, clockid=-1311329040, expected=0, futex_word=0x7f54b518b60c <_PyRuntime+428>) at ../sysdeps/nptl/futex-internal.h:323
  5    Thread 0x7f54b256f700 (LWP 11) "python3" 0x00007f54b4ccdc61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f54b256ee30, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
(gdb) thread apply all py-bt

Thread 5 (Thread 0x7f54b256f700 (LWP 11) "python3"):
Unable to locate python frame

Thread 4 (Thread 0x7f54b1d6e700 (LWP 10) "python3"):
Traceback (most recent call first):
  Waiting for the GIL
  <built-in method write of _io.TextIOWrapper object at remote 0x7f54b49e5080>
  <built-in method print of module object at remote 0x7f54b49d4590>
  File "/test.py", line 34, in onCallState
    print(f'Call<{self.getId()}> new state: {self.getInfo().stateText}')
  <built-in method Call_makeCall of module object at remote 0x7f54b457e200>
  File "/root/.local/lib/python3.10/site-packages/pjsua2.py", line 6506, in makeCall
    return _pjsua2.Call_makeCall(self, dst_uri, prm)
  File "/test.py", line 28, in makeCall
    super().makeCall(self.dest, prm)
  File "/test.py", line 55, in run
    c.makeCall()
  File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 966, in _bootstrap
    self._bootstrap_inner()

Thread 3 (Thread 0x7f54b2d70700 (LWP 8) "python3"):
Unable to locate python frame

Thread 2 (Thread 0x7f54b3571700 (LWP 7) "python3"):
Unable to locate python frame

Thread 1 (Thread 0x7f54b4a92740 (LWP 1) "python3"):
Traceback (most recent call first):
  <built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>
  File "/root/.local/lib/python3.10/site-packages/pjsua2.py", line 7132, in libHandleEvents
    return _pjsua2.Endpoint_libHandleEvents(self, msec_timeout)
  File "/test.py", line 100, in main
  File "/test.py", line 106, in <module>
(gdb) thread 1
[Switching to thread 1 (Thread 0x7f54b4a92740 (LWP 1))]
#0  __lll_lock_wait (futex=futex@entry=0x7f54ac010198, private=0) at lowlevellock.c:52
52	in lowlevellock.c
(gdb) bt
#0  __lll_lock_wait (futex=futex@entry=0x7f54ac010198, private=0) at lowlevellock.c:52
#1  0x00007f54b4bf18d1 in __GI___pthread_mutex_lock (mutex=0x7f54ac010198) at ../nptl/pthread_mutex_lock.c:115
#2  0x00007f54b3cfea6e in pj_mutex_lock () from /usr/local/lib/libpj.so.2
#3  0x00007f54b3d0709b in pj_lock_acquire () from /usr/local/lib/libpj.so.2
#4  0x00007f54b3d07344 in grp_lock_acquire () from /usr/local/lib/libpj.so.2
#5  0x00007f54b3d078e2 in pj_grp_lock_acquire () from /usr/local/lib/libpj.so.2
#6  0x00007f54b3e1c127 in pjsip_tsx_recv_msg () from /usr/local/lib/libpjsip.so.2
#7  0x00007f54b3e1a379 in mod_tsx_layer_on_rx_response () from /usr/local/lib/libpjsip.so.2
#8  0x00007f54b3dfc73c in pjsip_endpt_process_rx_data () from /usr/local/lib/libpjsip.so.2
#9  0x00007f54b3dfc9fc in endpt_on_rx_msg () from /usr/local/lib/libpjsip.so.2
#10 0x00007f54b3e07097 in pjsip_tpmgr_receive_packet () from /usr/local/lib/libpjsip.so.2
#11 0x00007f54b3e093bc in udp_on_read_complete () from /usr/local/lib/libpjsip.so.2
#12 0x00007f54b3cfaa1c in ioqueue_dispatch_read_event () from /usr/local/lib/libpj.so.2
#13 0x00007f54b3cfcead in pj_ioqueue_poll () from /usr/local/lib/libpj.so.2
#14 0x00007f54b3dfc350 in pjsip_endpt_handle_events2 () from /usr/local/lib/libpjsip.so.2
#15 0x00007f54b3e6ea72 in pjsua_handle_events () from /usr/local/lib/libpjsua.so.2
#16 0x00007f54b4183d50 in pj::Endpoint::libHandleEvents (this=<optimized out>, msec_timeout=<optimized out>) at ../src/pjsua2/endpoint.cpp:1975
#17 0x00007f54b42b7cbd in _wrap_Endpoint_libHandleEvents (args=<optimized out>) at pjsua2_wrap.cpp:120043
<SNIP>
(gdb) p (pthread_mutex_t) *0x7f54ac010198
$1 = pthread_mutex_t = {Type = Recursive, Status = Acquired, possibly with waiters, Owner ID = 10, Robust = No, Shared = No, Protocol = None}



FULL backtrace:

(gdb) thread apply all bt

Thread 5 (Thread 0x7f54b256f700 (LWP 11) "python3"):
#0  0x00007f54b4ccdc61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f54b256ee30, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#1  0x00007f54b4cd3443 in __GI___nanosleep (requested_time=requested_time@entry=0x7f54b256ee30, remaining=remaining@entry=0x0) at nanosleep.c:27
#2  0x00007f54b4cfe125 in usleep (useconds=<optimized out>) at ../sysdeps/posix/usleep.c:32
#3  0x00007f54b3cfe258 in pj_thread_sleep () from /usr/local/lib/libpj.so.2
#4  0x00007f54b3d70126 in clock_thread () from /usr/local/lib/libpjmedia.so.2
#5  0x00007f54b3cfde5c in thread_main () from /usr/local/lib/libpj.so.2
#6  0x00007f54b4beeea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f54b4d05def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f54b1d6e700 (LWP 10) "python3"):
#0  futex_abstimed_wait_cancelable (private=0, abstime=0x7f54b1d6b590, clockid=-1311329040, expected=0, futex_word=0x7f54b518b60c <_PyRuntime+428>) at ../sysdeps/nptl/futex-internal.h:323
#1  __pthread_cond_wait_common (abstime=0x7f54b1d6b590, clockid=-1311329040, mutex=0x7f54b518b610 <_PyRuntime+432>, cond=0x7f54b518b5e0 <_PyRuntime+384>) at pthread_cond_wait.c:520
#2  __pthread_cond_timedwait (cond=0x7f54b518b5e0 <_PyRuntime+384>, mutex=0x7f54b518b610 <_PyRuntime+432>, abstime=0x7f54b1d6b590) at pthread_cond_wait.c:656
#3  0x00007f54b4efc337 in PyCOND_TIMEDWAIT (us=<optimized out>, mut=<optimized out>, cond=0x7f54b518b5e0 <_PyRuntime+384>) at Python/condvar.h:73
#4  take_gil (tstate=0x7f54b1d6b590) at Python/ceval_gil.h:255
#5  0x00007f54b4f1d372 in PyEval_RestoreThread (tstate=0x559b7eefaad0) at Python/ceval.c:547
#6  0x00007f54b4fdd435 in _Py_write_impl (gil_held=1, count=<optimized out>, buf=0x559b7edb1330, fd=1) at Python/fileutils.c:1815
#7  _Py_write (fd=1, buf=0x559b7edb1330, count=<optimized out>) at Python/fileutils.c:1870
#8  0x00007f54b5004f3f in _io_FileIO_write_impl (b=0x7f54b1d6b640, self=0x7f54b48814c0) at ./Modules/_io/fileio.c:861
#9  _io_FileIO_write (self=0x7f54b48814c0, arg=<memoryview at remote 0x7f54b497dd80>) at ./Modules/_io/clinic/fileio.c.h:304
#10 0x00007f54b4f39e9b in method_vectorcall_O (func=func@entry=<method_descriptor at remote 0x7f54b4a306d0>, args=args@entry=0x7f54b1d6b760, nargsf=<optimized out>, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:460
#11 0x00007f54b4f18a9d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b1d6b760, callable=<method_descriptor at remote 0x7f54b4a306d0>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#12 PyObject_VectorcallMethod (name=<optimized out>, args=0x7f54b1d6b760, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:770
#13 0x00007f54b5004e34 in PyObject_CallMethodOneArg (arg=<memoryview at remote 0x7f54b497dd80>, name=<optimized out>, self=<optimized out>) at ./Include/cpython/abstract.h:204
#14 _bufferedwriter_raw_write (self=0x7f54b487c460, start=<optimized out>, len=27) at ./Modules/_io/bufferedio.c:1833
#15 0x00007f54b5001f55 in _bufferedwriter_flush_unlocked (self=0x7f54b487c460) at ./Modules/_io/bufferedio.c:1878
#16 0x00007f54b5001b49 in buffered_flush_and_rewind_unlocked (self=0x7f54b487c460) at ./Modules/_io/bufferedio.c:800
#17 0x00007f54b50019c0 in buffered_flush (self=0x7f54b487c460, args=<optimized out>) at ./Modules/_io/bufferedio.c:827
#18 0x00007f54b4f3277f in method_vectorcall_NOARGS (func=func@entry=<method_descriptor at remote 0x7f54b4a32480>, args=args@entry=0x7f54b1d6b8e0, nargsf=<optimized out>, kwnames=kwnames@entry=0x0) at Objects/descrobject.c:432
#19 0x00007f54b4f18a9d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b1d6b8e0, callable=<method_descriptor at remote 0x7f54b4a32480>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#20 PyObject_VectorcallMethod (name=<optimized out>, args=0x7f54b1d6b8e0, nargsf=<optimized out>, kwnames=0x0) at Objects/call.c:770
#21 0x00007f54b50042c7 in PyObject_CallMethodNoArgs (name=<optimized out>, self=<_io.BufferedWriter at remote 0x7f54b487c460>) at ./Include/cpython/abstract.h:194
#22 _io_TextIOWrapper_write_impl (text=<optimized out>, self=<optimized out>) at ./Modules/_io/textio.c:1733
#23 _io_TextIOWrapper_write (self=0x7f54b49e5080, arg=<optimized out>) at ./Modules/_io/clinic/textio.c.h:391
#24 0x00007f54b4f2ef5a in cfunction_vectorcall_O (func=<built-in method write of _io.TextIOWrapper object at remote 0x7f54b49e5080>, args=0x7f54b1d6b988, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/methodobject.c:516
#25 0x00007f54b4fdd9e4 in _PyObject_VectorcallTstate (tstate=0x559b7eefaad0, callable=<built-in method write of _io.TextIOWrapper object at remote 0x7f54b49e5080>, args=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at ./Include/cpython/abstract.h:114
#26 0x00007f54b4fe331f in PyObject_CallOneArg (func=<built-in method write of _io.TextIOWrapper object at remote 0x7f54b49e5080>, arg=<optimized out>) at ./Include/cpython/abstract.h:184
#27 0x00007f54b4fe3274 in PyFile_WriteObject (v='\n', f=<optimized out>, flags=<optimized out>) at Objects/fileobject.c:140
#28 0x00007f54b4fe34cf in PyFile_WriteString (s=<optimized out>, f=<_io.TextIOWrapper at remote 0x7f54b49e5080>) at Objects/fileobject.c:164
#29 0x00007f54b4fe2c29 in builtin_print (self=<optimized out>, args=0x7f54b4608e00, nargs=1, kwnames=<optimized out>) at Python/bltinmodule.c:2007
#30 0x00007f54b4f2654f in cfunction_vectorcall_FASTCALL_KEYWORDS (func=<built-in method print of module object at remote 0x7f54b49d4590>, args=0x7f54b4608e00, nargsf=<optimized out>, kwnames=0x0) at Objects/methodobject.c:446
#31 0x00007f54b4f1e738 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4608e00, callable=<built-in method print of module object at remote 0x7f54b49d4590>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#32 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4608e00, callable=<built-in method print of module object at remote 0x7f54b49d4590>) at ./Include/cpython/abstract.h:123
#33 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6bba0, tstate=<optimized out>) at Python/ceval.c:5867
#34 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4213
#35 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b4608c80, for file /test.py, line 34, in onCallState (self=<Call(account=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>, dest='sip:*REDACTED', this=<SwigPyObject at remote 0x7f54b462e970>) at remote 0x7f54b462e9e0>, prm=<OnCallStateParam(this=<SwigPyObject at remote 0x7f54b462eb20>) at remote 0x7f54b462ead0>, i=<CallInfo(this=<SwigPyObject at remote 0x7f54b462eb50>) at remote 0x7f54b462eb90>), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#36 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b4721520, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#37 _PyFunction_Vectorcall (func=<function at remote 0x7f54b4721510>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#38 0x00007f54b4f2f125 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b1d6bca0, callable=<function at remote 0x7f54b4721510>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#39 object_vacall (tstate=0x559b7eefaad0, base=<optimized out>, callable=<function at remote 0x7f54b4721510>, vargs=<optimized out>) at Objects/call.c:734
#40 0x00007f54b4fff656 in PyObject_CallMethodObjArgs (obj=<Call(account=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>, dest='sip:*REDACTED', this=<SwigPyObject at remote 0x7f54b462e970>) at remote 0x7f54b462e9e0>, name=<optimized out>) at Objects/call.c:794
#41 0x00007f54b432b92f in SwigDirector_Call::onCallState (this=0x7f54ac001250, prm=...) at pjsua2_wrap.cpp:3009
#42 0x00007f54b419e0b0 in pj::Call::processStateChange (this=this@entry=0x7f54ac001250, prm=...) at ../src/pjsua2/call.cpp:990
#43 0x00007f54b4182cd1 in pj::Endpoint::on_call_state (call_id=<optimized out>, e=0x7f54b1d6ce60) at ../src/pjsua2/endpoint.cpp:1120
#44 0x00007f54b3e665f3 in pjsua_call_on_state_changed () from /usr/local/lib/libpjsua.so.2
#45 0x00007f54b3cd06f1 in inv_set_state () from /usr/local/lib/libpjsip-ua.so.2
#46 0x00007f54b3cd7d5e in inv_on_state_null () from /usr/local/lib/libpjsip-ua.so.2
#47 0x00007f54b3cd105b in mod_inv_on_tsx_state () from /usr/local/lib/libpjsip-ua.so.2
#48 0x00007f54b3e23cbf in pjsip_dlg_on_tsx_state () from /usr/local/lib/libpjsip.so.2
#49 0x00007f54b3e246bb in mod_ua_on_tsx_state () from /usr/local/lib/libpjsip.so.2
#50 0x00007f54b3e1af9d in tsx_set_state () from /usr/local/lib/libpjsip.so.2
#51 0x00007f54b3e1d702 in tsx_on_state_null () from /usr/local/lib/libpjsip.so.2
#52 0x00007f54b3e1c04b in pjsip_tsx_send_msg () from /usr/local/lib/libpjsip.so.2
#53 0x00007f54b3e22320 in pjsip_dlg_send_request () from /usr/local/lib/libpjsip.so.2
#54 0x00007f54b3cd69be in pjsip_inv_send_msg () from /usr/local/lib/libpjsip-ua.so.2
#55 0x00007f54b3e5c701 in on_make_call_med_tp_complete () from /usr/local/lib/libpjsua.so.2
#56 0x00007f54b3e5d3ae in pjsua_call_make_call () from /usr/local/lib/libpjsua.so.2
#57 0x00007f54b419c2cf in pj::Call::makeCall (this=this@entry=0x7f54ac001250, dst_uri="sip:READTED", prm=...) at ../src/pjsua2/call.cpp:696
#58 0x00007f54b4334568 in _wrap_Call_makeCall (args=<optimized out>) at pjsua2_wrap.cpp:109511
#59 0x00007f54b4f2f572 in cfunction_call (func=<built-in method Call_makeCall of module object at remote 0x7f54b457e200>, args=<optimized out>, kwargs=<optimized out>) at Objects/methodobject.c:552
#60 0x00007f54b4f28aba in _PyObject_MakeTpCall (tstate=0x559b7eefaad0, callable=<built-in method Call_makeCall of module object at remote 0x7f54b457e200>, args=<optimized out>, nargs=<optimized out>, keywords=0x0) at Objects/call.c:215
#61 0x00007f54b4f2399f in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=<optimized out>, callable=<built-in method Call_makeCall of module object at remote 0x7f54b457e200>, tstate=<optimized out>) at ./Include/cpython/abstract.h:112
#62 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4608c48, callable=<built-in method Call_makeCall of module object at remote 0x7f54b457e200>, tstate=<optimized out>) at ./Include/cpython/abstract.h:99
#63 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4608c48, callable=<built-in method Call_makeCall of module object at remote 0x7f54b457e200>) at ./Include/cpython/abstract.h:123
#64 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6d660, tstate=<optimized out>) at Python/ceval.c:5867
#65 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4181
#66 0x00007f54b4f3c010 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b4608ac0, for file /root/.local/lib/python3.10/site-packages/pjsua2.py, line 6506, in makeCall (self=<Call(account=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>, dest='sip:*REDACTED', this=<SwigPyObject at remote 0x7f54b462e970>) at remote 0x7f54b462e9e0>, dst_uri='sip:*REDACTED', prm=<CallOpParam(this=<SwigPyObject at remote 0x7f54b462ea60>) at remote 0x7f54b462ea40>), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#67 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=0x7f54b46088c0, locals=0x0, con=0x7f54b359acc0, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#68 _PyFunction_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>, stack=0x7f54b46088c0, func=<function at remote 0x7f54b359acb0>) at Objects/call.c:342
#69 _PyObject_VectorcallTstate (kwnames=<optimized out>, nargsf=<optimized out>, args=0x7f54b46088c0, callable=<function at remote 0x7f54b359acb0>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#70 method_vectorcall (method=<optimized out>, args=0x7f54b46088c8, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/classobject.c:53
#71 0x00007f54b4f22fa2 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b46088c8, callable=<method at remote 0x7f54b47be640>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#72 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b46088c8, callable=<method at remote 0x7f54b47be640>) at ./Include/cpython/abstract.h:123
#73 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6d870, tstate=<optimized out>) at Python/ceval.c:5867
#74 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4181
#75 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b4608740, for file /test.py, line 28, in makeCall (self=<Call(account=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>, dest='sip:*REDACTED', this=<SwigPyObject at remote 0x7f54b462e970>) at remote 0x7f54b462e9e0>, prm=<CallOpParam(this=<SwigPyObject at remote 0x7f54b462ea60>) at remote 0x7f54b462ea40>), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#76 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b4720e60, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#77 _PyFunction_Vectorcall (func=<function at remote 0x7f54b4720e50>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#78 0x00007f54b4f1eb1a in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460cf40, callable=<function at remote 0x7f54b4720e50>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#79 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460cf40, callable=<function at remote 0x7f54b4720e50>) at ./Include/cpython/abstract.h:123
#80 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6da30, tstate=<optimized out>) at Python/ceval.c:5867
#81 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4198
#82 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b460cdc0, for file /test.py, line 55, in run (self=<MyThread(_target=None, _name='Thread-1', _args=(), _kwargs={}, _daemonic=True, _ident=140001737631488, _native_id=10, _tstate_lock=<_thread.lock at remote 0x7f54b4881640>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b4792ec0>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b4792ec0>, release=<built-in method release of _thread.lock object at remote 0x7f54b4792ec0>, _waiters=<collections.deque at remote 0x7f54b4718580>) at remote 0x7f54b462e620>, _flag=True) at remote 0x7f54b462e5c0>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f54b49e5150>, _invoke_excepthook=<function at remote 0x7f54b35adea0>, ep=<Endpoint(this=<SwigPyObject at remote 0x7f54b48aa190>) at remote 0x7f54b48aa1d0>, acc=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>) at remote 0x7f54b462e590>, call_made=False, c=<Call(account=<...>, dest='sip:*300@REDACTED', this...(truncated), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#83 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b35ade20, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#84 _PyFunction_Vectorcall (func=<function at remote 0x7f54b35ade10>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#85 0x00007f54b4f1eb1a in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b49fdec0, callable=<function at remote 0x7f54b35ade10>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#86 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b49fdec0, callable=<function at remote 0x7f54b35ade10>) at ./Include/cpython/abstract.h:123
#87 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6dbf0, tstate=<optimized out>) at Python/ceval.c:5867
#88 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4198
#89 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b49fdd50, for file /usr/local/lib/python3.10/threading.py, line 1009, in _bootstrap_inner (self=<MyThread(_target=None, _name='Thread-1', _args=(), _kwargs={}, _daemonic=True, _ident=140001737631488, _native_id=10, _tstate_lock=<_thread.lock at remote 0x7f54b4881640>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b4792ec0>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b4792ec0>, release=<built-in method release of _thread.lock object at remote 0x7f54b4792ec0>, _waiters=<collections.deque at remote 0x7f54b4718580>) at remote 0x7f54b462e620>, _flag=True) at remote 0x7f54b462e5c0>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f54b49e5150>, _invoke_excepthook=<function at remote 0x7f54b35adea0>, ep=<Endpoint(this=<SwigPyObject at remote 0x7f54b48aa190>) at remote 0x7f54b48aa1d0>, acc=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>) at remote 0x7f54b462e590>), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#90 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b493b6e0, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#91 _PyFunction_Vectorcall (func=<function at remote 0x7f54b493b6d0>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#92 0x00007f54b4f1eb1a in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460cd80, callable=<function at remote 0x7f54b493b6d0>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#93 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460cd80, callable=<function at remote 0x7f54b493b6d0>) at ./Include/cpython/abstract.h:123
#94 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7f54b1d6ddb0, tstate=<optimized out>) at Python/ceval.c:5867
#95 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4198
#96 0x00007f54b4f3c24a in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b460cc10, for file /usr/local/lib/python3.10/threading.py, line 966, in _bootstrap (self=<MyThread(_target=None, _name='Thread-1', _args=(), _kwargs={}, _daemonic=True, _ident=140001737631488, _native_id=10, _tstate_lock=<_thread.lock at remote 0x7f54b4881640>, _started=<Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b4792ec0>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b4792ec0>, release=<built-in method release of _thread.lock object at remote 0x7f54b4792ec0>, _waiters=<collections.deque at remote 0x7f54b4718580>) at remote 0x7f54b462e620>, _flag=True) at remote 0x7f54b462e5c0>, _is_stopped=False, _initialized=True, _stderr=<_io.TextIOWrapper at remote 0x7f54b49e5150>, _invoke_excepthook=<function at remote 0x7f54b35adea0>, ep=<Endpoint(this=<SwigPyObject at remote 0x7f54b48aa190>) at remote 0x7f54b48aa1d0>, acc=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>) at remote 0x7f54b462e590>), tstate=0x559b7eefaad0) at ./Include/internal/pycore_ceval.h:46
#97 _PyEval_Vector (kwnames=0x0, argcount=1, args=0x7f54b1d6de48, locals=0x0, con=0x7f54b493b4a0, tstate=0x559b7eefaad0) at Python/ceval.c:5065
#98 _PyFunction_Vectorcall (kwnames=0x0, nargsf=1, stack=0x7f54b1d6de48, func=<function at remote 0x7f54b493b490>) at Objects/call.c:342
#99 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=1, args=0x7f54b1d6de48, callable=<function at remote 0x7f54b493b490>, tstate=0x559b7eefaad0) at ./Include/cpython/abstract.h:114
#100 method_vectorcall (method=<optimized out>, args=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/classobject.c:61
#101 0x00007f54b50295c6 in thread_run (boot_raw=0x7f54b462e940) at ./Modules/_threadmodule.c:1090
#102 0x00007f54b5000534 in pythread_wrapper (arg=<optimized out>) at Python/thread_pthread.h:248
#103 0x00007f54b4beeea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#104 0x00007f54b4d05def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f54b2d70700 (LWP 8) "python3"):
#0  futex_abstimed_wait_cancelable (private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559b7ef7da20) at ../sysdeps/nptl/futex-internal.h:323
#1  do_futex_wait (sem=sem@entry=0x559b7ef7da20, abstime=0x0, clockid=0) at sem_waitcommon.c:112
#2  0x00007f54b4bf8278 in __new_sem_wait_slow (sem=0x559b7ef7da20, abstime=0x0, clockid=0) at sem_waitcommon.c:184
#3  0x00007f54b3cff0fa in pj_sem_wait () from /usr/local/lib/libpj.so.2
#4  0x00007f54b3d7cb27 in event_worker_thread () from /usr/local/lib/libpjmedia.so.2
#5  0x00007f54b3cfde5c in thread_main () from /usr/local/lib/libpj.so.2
#6  0x00007f54b4beeea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#7  0x00007f54b4d05def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f54b3571700 (LWP 7) "python3"):
#0  0x00007f54b4ccdc61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7f54b3570690, rem=rem@entry=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
#1  0x00007f54b4cd3443 in __GI___nanosleep (requested_time=requested_time@entry=0x7f54b3570690, remaining=remaining@entry=0x0) at nanosleep.c:27
#2  0x00007f54b4cfe125 in usleep (useconds=<optimized out>) at ../sysdeps/posix/usleep.c:32
#3  0x00007f54b3cfe258 in pj_thread_sleep () from /usr/local/lib/libpj.so.2
#4  0x00007f54b3cfcac5 in pj_ioqueue_poll () from /usr/local/lib/libpj.so.2
#5  0x00007f54b3d7ae91 in worker_proc () from /usr/local/lib/libpjmedia.so.2
#6  0x00007f54b3cfde5c in thread_main () from /usr/local/lib/libpj.so.2
#7  0x00007f54b4beeea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#8  0x00007f54b4d05def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f54b4a92740 (LWP 1) "python3"):
#0  __lll_lock_wait (futex=futex@entry=0x7f54ac010198, private=0) at lowlevellock.c:52
#1  0x00007f54b4bf18d1 in __GI___pthread_mutex_lock (mutex=0x7f54ac010198) at ../nptl/pthread_mutex_lock.c:115
#2  0x00007f54b3cfea6e in pj_mutex_lock () from /usr/local/lib/libpj.so.2
#3  0x00007f54b3d0709b in pj_lock_acquire () from /usr/local/lib/libpj.so.2
#4  0x00007f54b3d07344 in grp_lock_acquire () from /usr/local/lib/libpj.so.2
#5  0x00007f54b3d078e2 in pj_grp_lock_acquire () from /usr/local/lib/libpj.so.2
#6  0x00007f54b3e1c127 in pjsip_tsx_recv_msg () from /usr/local/lib/libpjsip.so.2
#7  0x00007f54b3e1a379 in mod_tsx_layer_on_rx_response () from /usr/local/lib/libpjsip.so.2
#8  0x00007f54b3dfc73c in pjsip_endpt_process_rx_data () from /usr/local/lib/libpjsip.so.2
#9  0x00007f54b3dfc9fc in endpt_on_rx_msg () from /usr/local/lib/libpjsip.so.2
#10 0x00007f54b3e07097 in pjsip_tpmgr_receive_packet () from /usr/local/lib/libpjsip.so.2
#11 0x00007f54b3e093bc in udp_on_read_complete () from /usr/local/lib/libpjsip.so.2
#12 0x00007f54b3cfaa1c in ioqueue_dispatch_read_event () from /usr/local/lib/libpj.so.2
#13 0x00007f54b3cfcead in pj_ioqueue_poll () from /usr/local/lib/libpj.so.2
#14 0x00007f54b3dfc350 in pjsip_endpt_handle_events2 () from /usr/local/lib/libpjsip.so.2
#15 0x00007f54b3e6ea72 in pjsua_handle_events () from /usr/local/lib/libpjsua.so.2
#16 0x00007f54b4183d50 in pj::Endpoint::libHandleEvents (this=<optimized out>, msec_timeout=<optimized out>) at ../src/pjsua2/endpoint.cpp:1975
#17 0x00007f54b42b7cbd in _wrap_Endpoint_libHandleEvents (args=<optimized out>) at pjsua2_wrap.cpp:120043
#18 0x00007f54b4f2f572 in cfunction_call (func=<built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>, args=<optimized out>, kwargs=<optimized out>) at Objects/methodobject.c:552
#19 0x00007f54b4f28aba in _PyObject_MakeTpCall (tstate=0x559b7ed4fe40, callable=<built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>, args=<optimized out>, nargs=<optimized out>, keywords=0x0) at Objects/call.c:215
#20 0x00007f54b4f2399f in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=<optimized out>, callable=<built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>, tstate=<optimized out>) at ./Include/cpython/abstract.h:112
#21 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460d2a0, callable=<built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>, tstate=<optimized out>) at ./Include/cpython/abstract.h:99
#22 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b460d2a0, callable=<built-in method Endpoint_libHandleEvents of module object at remote 0x7f54b457e200>) at ./Include/cpython/abstract.h:123
#23 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffec4a9eb10, tstate=<optimized out>) at Python/ceval.c:5867
#24 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4181
#25 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b460d120, for file /root/.local/lib/python3.10/site-packages/pjsua2.py, line 7132, in libHandleEvents (self=<Endpoint(this=<SwigPyObject at remote 0x7f54b48aa190>) at remote 0x7f54b48aa1d0>, msec_timeout=100), tstate=0x559b7ed4fe40) at ./Include/internal/pycore_ceval.h:46
#26 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b35ac0e0, tstate=0x559b7ed4fe40) at Python/ceval.c:5065
#27 _PyFunction_Vectorcall (func=<function at remote 0x7f54b35ac0d0>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#28 0x00007f54b4f1eb1a in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b49fd170, callable=<function at remote 0x7f54b35ac0d0>, tstate=0x559b7ed4fe40) at ./Include/cpython/abstract.h:114
#29 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b49fd170, callable=<function at remote 0x7f54b35ac0d0>) at ./Include/cpython/abstract.h:123
#30 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffec4a9ecd0, tstate=<optimized out>) at Python/ceval.c:5867
#31 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4198
#32 0x00007f54b4f2f988 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b49fcfc0, for file /test.py, line 100, in main (ep_cfg=<EpConfig(this=<SwigPyObject at remote 0x7f54b48ab5d0>) at remote 0x7f54b48ab3d0>, ep=<Endpoint(this=<SwigPyObject at remote 0x7f54b48aa190>) at remote 0x7f54b48aa1d0>, sipTpConfig=<TransportConfig(this=<SwigPyObject at remote 0x7f54b462e4c0>) at remote 0x7f54b462e4a0>, acfg=<AccountConfig(this=<SwigPyObject at remote 0x7f54b462e5e0>) at remote 0x7f54b462e680>, cred=<AuthCredInfo(this=<SwigPyObject at remote 0x7f54b462e4f0>) at remote 0x7f54b462e560>, acc=<Account(this=<SwigPyObject at remote 0x7f54b462e700>) at remote 0x7f54b462e6e0>, acc2=<Account(this=<SwigPyObject at remote 0x7f54b462e790>) at remote 0x7f54b462e770>, _=17), tstate=0x559b7ed4fe40) at ./Include/internal/pycore_ceval.h:46
#33 _PyEval_Vector (kwnames=<optimized out>, argcount=<optimized out>, args=<optimized out>, locals=0x0, con=0x7f54b48ca0f0, tstate=0x559b7ed4fe40) at Python/ceval.c:5065
#34 _PyFunction_Vectorcall (func=<function at remote 0x7f54b48ca0e0>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/call.c:342
#35 0x00007f54b4f1e738 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4969ba8, callable=<function at remote 0x7f54b48ca0e0>, tstate=0x559b7ed4fe40) at ./Include/cpython/abstract.h:114
#36 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f54b4969ba8, callable=<function at remote 0x7f54b48ca0e0>) at ./Include/cpython/abstract.h:123
#37 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, trace_info=0x7ffec4a9ee90, tstate=<optimized out>) at Python/ceval.c:5867
#38 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:4213
#39 0x00007f54b4fdd832 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7f54b4969a40, for file /test.py, line 106, in <module> (), tstate=0x559b7ed4fe40) at ./Include/internal/pycore_ceval.h:46
#40 _PyEval_Vector (tstate=0x559b7ed4fe40, con=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at Python/ceval.c:5065
#41 0x00007f54b4fdd792 in PyEval_EvalCode (co=<code at remote 0x7f54b48be080>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, locals=<optimized out>) at Python/ceval.c:1134
#42 0x00007f54b4fed01d in run_eval_code_obj (tstate=0x559b7ed4fe40, co=0x7f54b48be080, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}) at Python/pythonrun.c:1291
#43 0x00007f54b4fe8b6b in run_mod (mod=<optimized out>, filename=<optimized out>, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, flags=<optimized out>, arena=<optimized out>) at Python/pythonrun.c:1312
#44 0x00007f54b4e7b2e6 in pyrun_file (fp=fp@entry=0x559b7ed33370, filename=filename@entry='/test.py', start=start@entry=257, globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='/test.py') at remote 0x7f54b4947c10>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7f54b49d4590>, '__file__': '/test.py', '__cached__': None, 'threading': <module at remote 0x7f54b48c20c0>, 'time': <module at remote 0x7f54b484b560>, 'pj': <module at remote 0x7f54b48c3470>, 'REGISTERED': <Event(_cond=<Condition(_lock=<_thread.lock at remote 0x7f54b48d2b00>, acquire=<built-in method acquire of _thread.lock object at remote 0x7f54b48d2b00>, release=<built-in method release of _thread.lock object at remote 0x7f54b48d2b00>, _waiters=<collections.deque at remote 0x7f54b4718520>) at remote 0x7f54b48cd4b0>, _flag=True) at remote 0x7f54b48cd4e0>, 'Account': <type at remote 0x559b7ee09b80>, 'Call': <type at remote 0x559b7ee0ec60>, 'MyThread': <type at remote 0x559b7edb3b80>, 'main': <function at remote 0x7f54b48ca0e0>}, closeit=closeit@entry=1, flags=0x7ffec4a9f118) at Python/pythonrun.c:1208
#45 0x00007f54b4e7af55 in _PyRun_SimpleFileObject (fp=0x559b7ed33370, filename='/test.py', closeit=1, flags=0x7ffec4a9f118) at Python/pythonrun.c:456
#46 0x00007f54b4e7d162 in _PyRun_AnyFileObject (fp=0x559b7ed33370, filename='/test.py', closeit=1, flags=0x7ffec4a9f118) at Python/pythonrun.c:90
#47 0x00007f54b4ff908f in pymain_run_file_obj (skip_source_first_line=0, filename='/test.py', program_name='python3') at Modules/main.c:353
#48 pymain_run_file (config=0x559b7ed34430) at Modules/main.c:372
#49 pymain_run_python (exitcode=0x7ffec4a9f114) at Modules/main.c:587
#50 Py_RunMain () at Modules/main.c:666
#51 0x00007f54b4fcf799 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:720
#52 0x00007f54b4c2ed0a in __libc_start_main (main=0x559b7dcea140 <main>, argc=2, argv=0x7ffec4a9f308, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffec4a9f2f8) at ../csu/libc-start.c:308
#53 0x0000559b7dcea07a in _start ()

azertyfun avatar May 25 '22 08:05 azertyfun