You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Dmitro Lisnichenko <dl...@hortonworks.com> on 2015/07/24 12:09:42 UTC

Review Request 36771: Provide traceback patch to debug hanging agents

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36771/
-----------------------------------------------------------

Review request for Ambari, Andrew Onischuk and Sumit Mohanty.


Bugs: AMBARI-12522
    https://issues.apache.org/jira/browse/AMBARI-12522


Repository: ambari


Description
-------

Patch tries to load and register traceback handler if it is available, and skips if not. Also it fixes binding signal handlers twice during agent start.
To install faulthandler under Centos 6 (faulthandler is not included to default distribution of Python 2.x), we have to perform:
yum install python-devel gcc -y
# install setup tools
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python -
# install pip
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
easy_install faulthandler
If faulthandler module is available, agent posts Registered faulthandler to agent out file.
After that, we start agent and can dump tracebacks for all running threads like that:
# kill -USR1 `cat /var/run/ambari-agent/ambari-agent.pid`
# cat /var/log/ambari-agent/ambari-agent.out


Diffs
-----

  ambari-agent/src/main/python/ambari_agent/HeartbeatHandlers.py f9d0e14 
  ambari-agent/src/main/python/ambari_agent/main.py 0971cbb 
  ambari-agent/src/test/python/ambari_agent/TestMain.py 6218b59 

Diff: https://reviews.apache.org/r/36771/diff/


Testing
-------

test_invalid (TestFileSystem.TestFileSystem) ... ok

----------------------------------------------------------------------
Ran 410 tests in 6.028s

OK

Process finished with exit code 0


Thanks,

Dmitro Lisnichenko


Re: Review Request 36771: Provide traceback patch to debug hanging agents

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36771/#review92886
-----------------------------------------------------------

Ship it!


Ship It!

- Andrew Onischuk


On July 24, 2015, 10:09 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36771/
> -----------------------------------------------------------
> 
> (Updated July 24, 2015, 10:09 a.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-12522
>     https://issues.apache.org/jira/browse/AMBARI-12522
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Patch tries to load and register traceback handler if it is available, and skips if not. Also it fixes binding signal handlers twice during agent start.
> To install faulthandler under Centos 6 (faulthandler is not included to default distribution of Python 2.x), we have to perform:
> yum install python-devel gcc -y
> # install setup tools
> curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python -
> # install pip
> curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
> easy_install faulthandler
> If faulthandler module is available, agent posts Registered faulthandler to agent out file.
> After that, we start agent and can dump tracebacks for all running threads like that:
> # kill -USR1 `cat /var/run/ambari-agent/ambari-agent.pid`
> # cat /var/log/ambari-agent/ambari-agent.out
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/HeartbeatHandlers.py f9d0e14 
>   ambari-agent/src/main/python/ambari_agent/main.py 0971cbb 
>   ambari-agent/src/test/python/ambari_agent/TestMain.py 6218b59 
> 
> Diff: https://reviews.apache.org/r/36771/diff/
> 
> 
> Testing
> -------
> 
> test_invalid (TestFileSystem.TestFileSystem) ... ok
> 
> ----------------------------------------------------------------------
> Ran 410 tests in 6.028s
> 
> OK
> 
> Process finished with exit code 0
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>