1

I have a python script which uses multiple SSH links to multiple remote servers at the same time. Sometimes when the script is done, I think during garbage collection, I got this exception:

Exception in thread Thread-7 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'
Exception in thread Thread-5 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'
Exception in thread Thread-4 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 1574, in run
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'error'

I googled for Exception in thread Thread-7 (most likely raised during interpreter shutdown) and I find out that sometimes killing threads in multi-threads scripts causes this exception. It's really strange to me, because I have no threading in my scripts. In the other side, it seems to be related to paramiko and I'm pretty sure that I don't use threads for creating SSH links; I just have multiple open shells to multiple servers(maybe more than one shell is connected to one specific server). Any idea about the source of the exception??

Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
  • possible duplicate of [Got Exception Error "Exception in thread Thread-1 (most likely raised during interpreter shutdown)" which using Paramiko](http://stackoverflow.com/questions/8625878/got-exception-error-exception-in-thread-thread-1-most-likely-raised-during-int) – Daniel Pryden Apr 22 '15 at 06:22
  • @DanielPryden, yes! The problem seems to be the same! Thanks for pointing out. – Zeinab Abbasimazar Apr 22 '15 at 07:15

1 Answers1

2

This appears to be a known bug in Paramiko, see: https://github.com/paramiko/paramiko/issues/17

Daniel Pryden
  • 59,486
  • 16
  • 97
  • 135