Pivotal Knowledge Base

Follow

GPDB utilities exits with python stack errors related thread cleanup like "Unhandled exception in thread started by <bound method Worker..>"

Problem

Executing a python related utilities like gprecoverseg / gpstart or any other GPDB utilities errors out with python stack.

For eg.s

-bash-4.1$ gprecoverseg -r
20130821:11:15:59:002594 gprecoverseg:mdw:gpadmin-[INFO]:-Starting gprecoverseg with args: -r
20130821:11:15:59:002594 gprecoverseg:mdw:gpadmin-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 4.3.4.0 build 1'
[.....]
[.....] 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:-The rebalance operation has completed successfully. 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:-There is a resynchronization running in the background to bring all 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:-segments in sync. 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:- 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:-Use gpstate -s to check the resynchronization progress. 20130821:11:16:20:002594 gprecoverseg:mdw:gpadmin-[INFO]:-****************************************************************** Unhandled exception in thread started by > Traceback (most recent call last): File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 497, in __bootstrap Unhandled exception in thread started by > Traceback (most recent call last): Unhandled exception in thread started by > Traceback (most recent call last): File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 572, in __bootstrap_inner with _active_limbo_lock: AttributeError: 'NoneType' object has no attribute '_exit'Unhandled exception in thread started by > Traceback (most recent call last): File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 572, in __bootstrap_inner with _active_limbo_lock: AttributeError: 'NoneType' object has no attribute '_exit_' File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 572, in __bootstrap_inner with _active_limbo_lock: AttributeError: 'NoneType' object has no attribute '_exit_' Unhandled exception in thread started by > Traceback (most recent call last): File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 497, in __bootstrap self.__bootstrap_inner() File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 572, in __bootstrap_inner with _active_limbo_lock: AttributeError: 'NoneType' object has no attribute '_exit_' self.__bootstrap_inner() File "/data/home/gpadmin/savita/gpdb/greenplum-db/ext/python/lib/python2.6/threading.py", line 572, in __bootstrap_inner with _active_limbo_lock: AttributeError: 'NoneType' object has no attribute '_exit_'-bash-4.1$

Cause

This is related to Python bug prior to version 2.7 and is caused by the interpreter shutting down and uncleanly killing any existing threads that is spawned by the python script.

Solution

Upgrade the python on your cluster to Python 2.7 and see if that helps to resolve the issue.

Use the below command to check the current version of your python

/usr/bin/python -V

Comments

Powered by Zendesk