classification
Title: stem crashes python
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: lothar, pitrou, r.david.murray
Priority: normal Keywords:

Created on 2014-01-26 15:12 by lothar, last changed 2014-01-30 23:18 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
python3.2m.exe.stackdump lothar, 2014-01-26 15:12
Messages (8)
msg209328 - (view) Author: (lothar) Date: 2014-01-26 15:12
setup: python 3.2 ; cygwin64 

python crashes with a stackdump, which is attached.

stem is a python controller module for tor.

stem-1.1.1 can be had from here:
https://pypi.python.org/pypi/stem/

the code is in version 2 form, but "python3 setup install" runs 2to3 on it.

this code crashes before the for statement:

#! /usr/bin/env python3

import urllib.request
from stem import Signal
from stem.control import Controller

with Controller.from_port(port=9151) as controller:
  controller.signal(Signal.NEWNYM)

for nn in range(1, 3):
  print("case %02d" % nn)
  proxy_support = urllib.request.ProxyHandler({"socks5" : "127.0.0.1:9150"})
  opener = urllib.request.build_opener(proxy_support)
  urllib.request.install_opener(opener)
  print(urllib.request.urlopen("http://www.ifconfig.me/ip").read())
msg209334 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-01-26 16:06
For anyone else who wants to look at this: it doesn't look like stem involves any C code, and the 'signal' method appears to be a text-based interprocess communication.

Can you reproduce this with 3.3.3?  3.2 is in security-fix-only mode, and while a crash can be a security issue, it isn't necessarily.
msg209347 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-26 19:52
If this is a cygwin build (rather than a standard MSVC build), I'm afraid that's not a supported platform at all. Did you compile Python yourself?
msg209443 - (view) Author: (lothar) Date: 2014-01-27 13:39
i have the current cygwin python3 package:
http://mirrors.kernel.org/sourceware/cygwin/x86_64/release/python3/

i have no intention to build python myself.
msg209445 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-27 13:42
Can you try with a standard Windows build?
http://python.org/download/releases/3.3.3/
msg209446 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-27 13:45
(note that stem.util.system at least uses ctypes)
msg209732 - (view) Author: (lothar) Date: 2014-01-30 18:51
you are right: windows native python 3.3.3 from your link runs the program properly - and without crashing.
msg209742 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-30 23:18
Thanks for the feedback! Then I suggest you report the issue to the cygwin Python packagers.
History
Date User Action Args
2014-01-30 23:18:21pitrousetstatus: open -> closed
resolution: not a bug
messages: + msg209742

stage: resolved
2014-01-30 18:51:20lotharsetmessages: + msg209732
2014-01-27 13:45:46pitrousetmessages: + msg209446
2014-01-27 13:42:52pitrousetmessages: + msg209445
2014-01-27 13:39:12lotharsetmessages: + msg209443
2014-01-26 19:52:56pitrousetnosy: + pitrou
messages: + msg209347
2014-01-26 16:06:18r.david.murraysetnosy: + r.david.murray
messages: + msg209334
2014-01-26 15:12:59lotharcreate