Could anyone please help me how to debug the threads created in ceilometer?

asked 2014-09-19 10:04:59 -0600

Priya gravatar image

I tried debugging ceilometer by setting break-points at its initial stage and launched the service in eclipse. But there was an error message like "error: cannot switch to a different thread". On issuing ps -aef command, there were no other processes forked relevant to the service. And on eclipse, it shows like dummy threads upto 6 has been created. Listed the errored output below.

OUTPUT

pydev debugger: starting (pid: 31555) ('Executing file ', '/usr/local/bin/ceilometer-alarm-evaluator') ('arguments:', "['/usr/local/bin/ceilometer-alarm-evaluator']") ('Connecting to ', '127.0.0.1', ':', '42178') ('Connected.',) receive cmd <-- CMD_VERSION 501 1 1.1 sending cmd --> CMD_VERSION 501 1 1.1 sending cmd --> CMD_THREAD_CREATE 103 2 <xml><thread name="pydevd.reader" id="-1"/></xml> sending cmd --> CMD_THREAD_CREATE 103 4 <xml><thread name="pydevd.writer" id="-1"/></xml> receive cmd <-- CMD_SET_BREAK 111 3 27 /opt/stack/ceilometer/ceilometer/cli.py 70 FUNCalarm_evaluator None Added breakpoint:/opt/stack/ceilometer/ceilometer/cli.py - line:70 - func_name:alarm_evaluator (id: 27) receive cmd <-- CMD_SET_PY_EXCEPTION 122 5 false;false;false;true; Exceptions to hook : [] receive cmd <-- CMD_SET_PROPERTY_TRACE 124 7
receive cmd <-- CMD_IGNORE_THROWN_EXCEPTION_AT 132 9 REPLACE: receive cmd <-- CMD_ENABLE_DONT_TRACE 133 11 true receive cmd <-- CMD_RUN 101 13
sending cmd --> CMD_THREAD_CREATE 103 6 <xml><thread name="MainThread" id="pid31555_seq2"/></xml> sending cmd --> CMD_THREAD_CREATE 103 8 <xml><thread name="Dummy-5" id="pid31555_seq1"/></xml> sending cmd --> CMD_THREAD_SUSPEND 105 10 <xml><thread id="pid31555_seq1" stop_reason="111"><frame id="140264088344072" name="alarm_evaluator" file="/opt/stack/ceilometer/ceilometer/cli.py" line="70">"</frame><frame id="140264389151776" name="&lt;module&gt;" file="/usr/local/bin/ceilometer-alarm-evaluator" line="13">"</frame><frame id="22264912" name="run" file="/home/eclipse/plugins/org.python.pydev_3.6.0.201406232321/pysrc/pydevd.py" line="1373">"</frame><frame id="140264472976320" name="&lt;module&gt;" file="/home/eclipse/plugins/org.python.pydev_3.6.0.201406232321/pysrc/pydevd.py" line="1845">"</frame></thread></xml> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 346, in fire_timers timer() File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 58, in __call__ cb(args, kw) File "/usr/local/lib/python2.7/dist-packages/eventlet/semaphore.py", line 121, in _do_acquire waiter.switch() *error: cannot switch to a different thread

Debugging Steps Used:

I have also done many debugging steps, which i have listed as follows:

  • using pydevd
  • using pdb
  • using gdb (when i attach a process and issue "info threads", only one thread is listed)
  • by setting the following values in the elipse file "/home/eclipse/plugins/org.python.pydev_3.6.0.201406232321/pysrc/pydevd_constants.py" DEBUG_TRACE_LEVEL = 3 DEBUG_TRACE_BREAKPOINTS = 3

In whatever way i tried, i am unsuccessful in debugging the threads created in python or switching to the thread process. Is there any other way to do it? Please guide me.

edit retag flag offensive close merge delete