On 11/6/17 7:14 AM, GerritHub wrote:
    File src/log/log_functions.c: 
<https://review.gerrithub.io/#/c/383885/2/src/log/log_functions.c>

      o

        Patch Set #2, Line 1438: 
<https://review.gerrithub.io/#/c/383885/2/src/log/log_functions.c@1438> |name = 
work_pool_worker_name();|

        So the new hang for proxy is in this assumption -- proxy uses threads 
that do not define their thread_name but are not work_pool_worker_name.

        This specific problem is an easy fix (just set the thread_name!), but I find the 
assumption "no thread name -> work_pool_thread" to be pretty daring.

Tried setting the thread_name thread local variable, but doing it in a
library didn't work.  Needed a different name, and a function to fetch it.

The only threads that I know of are fridge and work_pool.

If you've got come others in another library, they'll have to use the same
library function.

        Here is the exact stack trace:
          #0  0x00007ffff7061f4d in __lll_lock_wait () from 
/lib64/libpthread.so.0
          #1  0x00007ffff705dd1d in _L_lock_840 () from /lib64/libpthread.so.0
          #2  0x00007ffff705dc3a in pthread_mutex_lock () from 
/lib64/libpthread.so.0
          #3  0x00007ffff7ddc029 in tls_get_addr_tail () from 
/lib64/ld-linux-x86-64.so.2
          #4  0x00007ffff6c31bc4 in work_pool_worker_name () at 
/opt/nfs-ganesha/src/libntirpc/src/work_pool.c:72
          #5  0x000000000051541d in display_log_component 
(dsp_log=0x7ffff1ed93c0, component=COMPONENT_FSAL,
             file=0x7ffff3f042e0 "/opt/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c", line=621, 
function=0x7ffff3f04b21 <__func__.21686> "pxy_rpc_recv",
             level=5) at /opt/nfs-ganesha/src/log/log_functions.c:1438
          #6  0x0000000000515694 in display_log_component_level 
(component=COMPONENT_FSAL,
             file=0x7ffff3f042e0 "/opt/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c", line=621, 
function=0x7ffff3f04b21 <__func__.21686> "pxy_rpc_recv",
             level=NIV_EVENT, format=0x7ffff3f04519 "Socket is closed", 
arguments=0x7ffff1ed9458) at /opt/nfs-ganesha/src/log/log_functions.c:1502
          #7  0x000000000051585f in DisplayLogComponentLevel (component=COMPONENT_FSAL, 
file=0x7ffff3f042e0 "/opt/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c",
             line=621, function=0x7ffff3f04b21 <__func__.21686> "pxy_rpc_recv", 
level=NIV_EVENT, format=0x7ffff3f04519 "Socket is closed")
             at /opt/nfs-ganesha/src/log/log_functions.c:1709
          #8  0x00007ffff3efa137 in pxy_rpc_recv (arg=0x7ffff410ae00 
<PROXY+352>) at /opt/nfs-ganesha/src/FSAL/FSAL_PROXY/handle.c:620
          #9  0x00007ffff705bdc5 in start_thread () from /lib64/libpthread.so.0
          #10 0x00007ffff671dced in clone () from /lib64/libc.so.6

        As you can see the problem seems to be that the thread local variable 
is not initialized, but I fail to see why this would hang instead of returning 
garbage.

That seems odd.  I defined the function so that a missing variable
should return NULL.


        I'll submit a patch that just sets thread names for now but 
experiencing a hang there instead of some default value isn't nice. Does anyone 
have an idea?

Nope.  And no idea why you'd post this on an old patch, either.  The
discussion will be lost.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to