tvalentyn commented on issue #30867:
URL: https://github.com/apache/beam/issues/30867#issuecomment-2048477298

   With `--native-all`, pystack adds a bit details, and also shows that other 
threads are waiting on getting GIL:
   
   ```
   root@beamapp-valentyn-04101932-04101232-3i3x-harness-3sqg:/# pystack remote 
29 --native-all
   Traceback for thread 100 (python) [Has the GIL] (most recent call last):
       (C) File "Python/thread_pthread.h", line 232, in pythread_wrapper 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_threadmodule.c", line 1002, in t_bootstrap 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 890, in 
_bootstrap
           self._bootstrap_inner()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 932, in 
_bootstrap_inner
           self.run()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 870, in run
           self._target(*self._args, **self._kwargs)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", 
line 80, in _worker
           work_item.run()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", 
line 57, in run
           result = self.fn(*self.args, **self.kwargs)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/batcher.py", line 
385, in _flush_rows
           response = self.table.mutate_rows(rows_to_flush)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/table.py", line 
724, in mutate_rows
           self.name,
       (C) File "Objects/descrobject.c", line 1496, in property_descr_get 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/table.py", line 
160, in name
           table_client = self._instance._client.table_data_client
       (C) File "Objects/descrobject.c", line 1496, in property_descr_get 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/client.py", line 
332, in table_data_client
           transport = self._create_gapic_client_channel(
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/client.py", line 
285, in _create_gapic_client_channel
           channel = grpc_transport.create_channel(
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py",
 line 217, in create_channel
           return grpc_helpers.create_channel(
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 
386, in create_channel
           return grpc.secure_channel(
       (Python) File "/usr/local/lib/python3.8/site-packages/grpc/__init__.py", 
line 2119, in secure_channel
           return _channel.Channel(
       (C) File "Objects/typeobject.c", line 6790, in slot_tp_init 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", 
line 2046, in __init__
           self._channel = cygrpc.Channel(
       (C) File "???", line 0, in syscall (/usr/lib/x86_64-linux-gnu/libc.so.6)
   
   Traceback for thread 99 (python) [Waiting for the GIL] (most recent call 
last):
       (C) File "Python/thread_pthread.h", line 232, in pythread_wrapper 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_threadmodule.c", line 1002, in t_bootstrap 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 890, in 
_bootstrap
           self._bootstrap_inner()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 932, in 
_bootstrap_inner
           self.run()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 870, in run
           self._target(*self._args, **self._kwargs)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", 
line 80, in _worker
           work_item.run()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", 
line 57, in run
           result = self.fn(*self.args, **self.kwargs)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/batcher.py", line 
385, in _flush_rows
           response = self.table.mutate_rows(rows_to_flush)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/table.py", line 
724, in mutate_rows
           self.name,
       (C) File "Objects/descrobject.c", line 1496, in property_descr_get 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/table.py", line 
160, in name
           table_client = self._instance._client.table_data_client
       (C) File "Objects/descrobject.c", line 1496, in property_descr_get 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/client.py", line 
332, in table_data_client
           transport = self._create_gapic_client_channel(
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable/client.py", line 
285, in _create_gapic_client_channel
           channel = grpc_transport.create_channel(
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py",
 line 217, in create_channel
           return grpc_helpers.create_channel(
       (Python) File 
"/usr/local/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 
386, in create_channel
           return grpc.secure_channel(
       (Python) File "/usr/local/lib/python3.8/site-packages/grpc/__init__.py", 
line 2119, in secure_channel
           return _channel.Channel(
       (C) File "Objects/typeobject.c", line 6790, in slot_tp_init 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/site-packages/grpc/_channel.py", 
line 2046, in __init__
           self._channel = cygrpc.Channel(
       (Python) File "/usr/local/lib/python3.8/pkgutil.py", line 638, in 
get_data
           return loader.get_data(resource_name)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "<frozen importlib._bootstrap_external>", line 1033, in 
get_data
       (C) File "./Modules/_io/clinic/bufferedio.c.h", line 174, in 
_io__Buffered_read (/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_io/bufferedio.c", line 891, in 
_io__Buffered_read_impl (inlined) (/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_io/bufferedio.c", line 1541, in 
_bufferedreader_read_all (inlined) (/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_io/fileio.c", line 706, in _io_FileIO_readall_impl 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Python/ceval_gil.h", line 206, in take_gil 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Python/condvar.h", line 73, in PyCOND_TIMEDWAIT (inlined) 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "???", line 0, in pthread_cond_timedwait 
(/usr/lib/x86_64-linux-gnu/libc.so.6)
   
   Traceback for thread 98 (python) [Waiting for the GIL] (most recent call 
last):
       (C) File "Python/thread_pthread.h", line 232, in pythread_wrapper 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_threadmodule.c", line 1002, in t_bootstrap 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 890, in 
_bootstrap
           self._bootstrap_inner()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 932, in 
_bootstrap_inner
           self.run()
       (C) File "Objects/call.c", line 284, in function_code_fastcall 
(/usr/local/lib/libpython3.8.so.1.0)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 1252, in run
           self.finished.wait(self.interval)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 558, in wait
           signaled = self._cond.wait(timeout)
       (Python) File "/usr/local/lib/python3.8/threading.py", line 306, in wait
           gotit = waiter.acquire(True, timeout)
       (C) File "./Modules/_threadmodule.c", line 146, in 
lock_PyThread_acquire_lock (/usr/local/lib/libpython3.8.so.1.0)
       (C) File "./Modules/_threadmodule.c", line 64, in acquire_timed 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Python/ceval_gil.h", line 206, in take_gil 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "Python/condvar.h", line 73, in PyCOND_TIMEDWAIT (inlined) 
(/usr/local/lib/libpython3.8.so.1.0)
       (C) File "???", line 0, in pthread_cond_timedwait 
(/usr/lib/x86_64-linux-gnu/libc.so.6)
   
   ```  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to