I have a Linux forking C server with an embedded Python 2.7.5 interpreter 
loading a script that uses gRPC.

This is CentOS with kernel 3.10.0-693.11.6.el7.x86_64.

The server creates the channels and grpc stubs post-fork().

However if I attempt any method call at all, the wokder deadlocks, always 
in the same place, even before hitting the wire.

I have read various issues with grpc and Python multiprocessing/fork(); 
however this is the case where it is the C server that forks. I'm wondering 
whether these are essentially the same issue.

grpcio is 1.9.1 

(gdb) bt
#0  0x00007f1474a29a0b in do_futex_wait.constprop.1 () from 
#1  0x00007f1474a29a9f in __new_sem_wait_slow.constprop.0 () from 
#2  0x00007f1474a29b3b in sem_wait@@GLIBC_2.2.5 () from 
#3  0x00007f14297d75f5 in PyThread_acquire_lock () from 
#4  0x00007f14297a3156 in PyEval_RestoreThread () from 
#5  0x00007f14297c6358 in PyGILState_Ensure () from 
#6  0x00007f1421eae385 in __pyx_f_4grpc_7_cython_6cygrpc__slice_from_bytes 
    at src/python/grpcio/grpc/_cython/cygrpc.c:20167
#7  0x00007f1421ed6522 in 
__pyx_pf_4grpc_7_cython_6cygrpc_7Channel_2create_call (
    __pyx_v_deadline=0x7f1429a5bf20 <_Py_NoneStruct>, 
__pyx_v_host=0x7f1429a5bf20 <_Py_NoneStruct>, 
    __pyx_v_method=<optimized out>, __pyx_v_queue=0x3015120, 
    __pyx_v_parent=0x7f1429a5bf20 <_Py_NoneStruct>, __pyx_v_self=0x3018e10)
    at src/python/grpcio/grpc/_cython/cygrpc.c:6899
#8  __pyx_pw_4grpc_7_cython_6cygrpc_7Channel_3create_call 
    __pyx_args=<optimized out>, __pyx_kwds=<optimized out>) at 
#9  0x00007f14297aabb0 in PyEval_EvalFrameEx () from 
#10 0x00007f14297aa57d in PyEval_EvalFrameEx () from 
#11 0x00007f14297acefd in PyEval_EvalCodeEx () from 
#12 0x00007f1429736858 in function_call () from /lib64/libpython2.7.so.1.0
#13 0x00007f14297119a3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#14 0x00007f1429720995 in instancemethod_call () from 

You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to