Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39647

My script use paramiko module, it will be blocked at compute_hmac

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <naruto0.1@live.cn>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; "'',": 0.07; 'skip:/ 10': 0.07; 'python': 0.09; 'blocked': 0.09; 'hostname': 0.09; 'subject:module': 0.09; 'subject:script': 0.09; 'thread': 0.11; "skip:' 30": 0.15; 'threads': 0.16; 'skip:p 30': 0.20; 'subject:will': 0.22; 'this:': 0.23; 'script': 0.24; 'header:User- Agent:1': 0.26; 'select': 0.26; '(e.g.': 0.27; "skip:' 70": 0.29; "skip:' 10": 0.30; 'attach': 0.30; 'function': 0.30; 'code': 0.31; 'file': 0.32; 'info': 0.32; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'problem,': 0.35; 'process,': 0.35; 'received:192.168.0': 0.35; 'but': 0.36; 'skip:p 20': 0.36; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'help': 0.40; 'subject:, ': 0.61; 'strange': 0.62; 'here': 0.65; 'charset:gb2312': 0.77; "skip:' 80": 0.84; 'skip:/ 30': 0.91
X-EIP [6LaGRBFS91nB+3e++zezBWCD+p0n+hyc]
X-Originating-Email [naruto0.1@live.cn]
Date Sat, 23 Feb 2013 10:57:52 +0800
From Jack <naruto0.1@live.cn>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3
MIME-Version 1.0
To python-list@python.org
Subject My script use paramiko module, it will be blocked at compute_hmac
Content-Type multipart/alternative; boundary="------------090805060603000003010605"
X-OriginalArrivalTime 23 Feb 2013 02:57:53.0186 (UTC) FILETIME=[92C7B020:01CE1171]
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2327.1361588343.2939.python-list@python.org> (permalink)
Lines 129
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361588343 news.xs4all.nl 6893 [2001:888:2000:d::a6]:45743
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39647

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hello
one problem, thanks for help

My script like this:
/hostname = xxx//
//username = xxx//
//password = xxx//
//t = paramiko.Transport((hostname, 22))//
//t.connect(username=username, password=password)//# here will be blocked
//sftp = paramiko.SFTPClient.from_transport(t)/

I used gdb attach the python process, found that:
/(gdb) py-bt
#2 <built-in function sleep>
#4 file '/usr/lib64/python2.6/threading.py', in 'wait'
#8 file '/usr/lib64/python2.6/threading.py', in 'wait'
#12 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/auth_handler.py',
in 'wait_for_response'
#15 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/transport.py',
in 'auth_password'
#19 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/transport.py',
in 'connect'
#23 file 'plugins.py', in '<module>'
#35 file '<stdin>', in '<module>'
(gdb) info threads
2 Thread 0x7fe956708700 (LWP 25635) 0x0000003806e0d720 in sem_wait ()
from /lib64/libpthread.so.0
* 1 Thread 0x7fe96163b700 (LWP 25615) 0x00000038066e0d03 in select ()
from /lib64/libc.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0x7fe956708700 (LWP 25635))]#0
0x0000003806e0d720 in sem_wait () from /lib64/libpthread.so.0
(gdb) py-bt
#1 Waiting for a lock (e.g. GIL)
#7 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/packet.py',
in 'compute_hmac'
#10 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/packet.py',
in 'read_message'
#13 file
'/usr/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg/paramiko/transport.py',
in 'run'
#16 file '/usr/lib64/python2.6/threading.py', in '__bootstrap_inner'
#19 file '/usr/lib64/python2.6/threading.py', in '__bootstrap'
/
*but it is strange that when I use python interactive shell, the code
works well*

Regards,
Jack

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

My script use paramiko module, it will be blocked at compute_hmac Jack <naruto0.1@live.cn> - 2013-02-23 10:57 +0800

csiph-web