trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhu, Wen-Jun" <wenjun....@esgyn.cn>
Subject command `shell -c node info` blocks
Date Wed, 26 Sep 2018 10:09:17 GMT
Hi,

Recently I find that the `shell` program has blocked.

As I run
       sqcheck
Which invokes
       shell -c node info
it blocks.

After some debugging, I find that there are two threads within `shell`,
Stacks of one thread looks like this:
#0  0x0000007fb7e292fc in pthread_cond_wait@@GLIBC_2.17 () from /lib/aarch64-linux-gnu/libpthread.so.0
#1  0x000000000042ab54 in Local_IO_To_Monitor::wait_on_cv (this=0x600b40) at clio.cxx:2240
#2  0x0000000000429888 in Local_IO_To_Monitor::send_recv (this=0x600b40, pp_msg=0x7fb6bc95bc,
pv_nw=false) at clio.cxx:1675
#3  0x000000000040aeec in attach (nid=0, name=0x5d0240 "SHELL", program=0x4e84c8 "shell")
at shell.cxx:995
#4  0x0000000000421a58 in main (argc=4, argv=0x7fffff2d58) at shell.cxx:8849
Which is wait for `iv_sr_cv`

Stacks of the other thread:
    #0  local_monitor_reader (pp_arg=0x63e3) at clio.cxx:285
#1  0x0000007fb7e22fb4 in start_thread () from /lib/aarch64-linux-gnu/libpthread.so.0
Which wait `monitor` for the signal SQ_LIO_SIGNAL_REQUEST_REPLY.

If `monitor` send the signal, then `shell` would receive it, continue, and finish its job.
But `monitor` do not send the signal.



After some searching, I find that there is only one piece of code sending the signal:
       513         pthread_kill(iv_worker_thread_id, SQ_LIO_SIGNAL_REQUEST_REPLY);
In function Local_IO_To_Monitor::~Local_IO_To_Monitor() of file core/sqf/monitor/linux/clio.cxx.

As my understanding, this function should be invoked in `monitor` program, but when I attach
to that `monitor`,
whose pid is got from function `local_monitor_reader()`, and add a breakpoint on ` Local_IO_To_Monitor::~Local_IO_To_Monitor()`,
it does not break there.


So, what should the normal procedure be? Is it incorrect for `monitor` not to invoking Local_IO_To_Monitor::~Local_IO_To_Monitor()
?


Thank you.

Wenjun Zhu

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message