[issue16660] Segmentation fault when importing hashlib

2012-12-12 Thread ashwani

ashwani added the comment:

Ok , It did not crash when I recompiled with --with-pydebug.
I observed crash when I was working with the urllib.request.
It  was crashing when I  imported urllib.request. I drill down the code of 
urllib.request and found that it was crashing because of hashlib import.
Now, it is not crashing when I import hashlib and urllib.request.
But urllib.request.urlopen fails to open a site. It does open few other sites.
Now this might be completely different issue.

I think we first need to find why it is not crashing after the recompilation.

Following is comparison of urlopen on the same machine using two different 
python versions.


ir[40] [~/Python-3.3.0/]$ python3
Python 3.3.0 (default, Dec 12 2012, 17:26:56) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux
Type help, copyright, credits or license for more information.
 import hashlib
[71516 refs]
 import urllib
[71550 refs]
 import urllib.request
[123410 refs]
 u = urllib.request.urlopen('http://en.wikipedia.org/wiki/Wikipedia')
]Traceback (most recent call last):
  File stdin, line 1, in module
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 160, in 
urlopen
return opener.open(url, data, timeout)
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 479, in 
open
response = meth(req, response)
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 591, in 
http_response
'http', request, response, code, msg, hdrs)
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 517, in 
error
return self._call_chain(*args)
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 451, in 
_call_chain
result = func(*args)
  File /usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py, line 599, in 
http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
[126943 refs]
 u = urllib.request.urlopen('http://mit.edu/')
[127082 refs]
 len(u.read())
13857
[127068 refs]

It does open some other sites.


r[37] [~/Python-3.3.0/]$ python
Python 2.6.6 (r266:84292, Dec  7 2011, 20:48:22) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type help, copyright, credits or license for more information.
 import urllib
 u = urllib.urlopen('http://en.wikipedia.org/wiki/Wikipedia')
 len(u.read())
3000
 import hashlib
 


Thanks,
Ashwin

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-12 Thread Gregory P. Smith

Gregory P. Smith added the comment:

given the behavior you are seeing, I'm not inclined to trust your computer or 
however it is configured.  I do not believe this is a Python issue.

3.3 works fine on RHEL 6 so it should work fine on CentOS 6.  
http://buildbot.python.org/all/builders/x86%20RHEL%206%203.3

next steps as far as debugging the crash goes still stand: run python under gdb 
and get the C stacktrace from the crash.

--
resolution:  - invalid
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread ashwani

New submission from ashwani:

Hello,

I did a local installation of python 3.3.0 on my organization's CentOS machine.
We also have Python 2.6.6 installed for every users on this machine.
Python 3.3.0 crashes when I import the hash lib.
Following is snapshot of the crash.


ir[63] [~/]$ python3  -X faulthandler
Python 3.3.0 (default, Dec  9 2012, 20:13:58) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux
Type help, copyright, credits or license for more information.
 import hashlib
Fatal Python error: Segmentation fault

Current thread 0x7f0362784700:
  File /usa/arao/Python-3.3.0/lib/python3.3/hashlib.py, line 99 in 
__get_openssl_constructor
  File /usa/arao/Python-3.3.0/lib/python3.3/hashlib.py, line 141 in module
  File frozen importlib._bootstrap, line 313 in _call_with_frames_removed
  File frozen importlib._bootstrap, line 869 in _load_module
  File frozen importlib._bootstrap, line 562 in module_for_loader_wrapper
  File frozen importlib._bootstrap, line 1004 in load_module
  File frozen importlib._bootstrap, line 1023 in load_module
  File frozen importlib._bootstrap, line 586 in _check_name_wrapper
  File frozen importlib._bootstrap, line 1525 in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 1558 in _find_and_load
  File stdin, line 1 in module
Segmentation fault


Can someone help me on this?

Thanks,
Ashwin

--
components: Library (Lib)
messages: 177317
nosy: nixdash
priority: normal
severity: normal
status: open
title: Segmentation fault when importing hashlib
type: crash
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread ashwani

ashwani added the comment:

Following is the behavior on the same machine with Python 2.6.6



ir[65] [~/]$ python
Python 2.6.6 (r266:84292, Dec  7 2011, 20:48:22) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type help, copyright, credits or license for more information.
 import hashlib


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +gregory.p.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16660] Segmentation fault when importing hashlib

2012-12-10 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Given where the crash is occurring and that faulthandler traceback it makes me 
wonder if it was compiled with a set of openssl headers that don't make the 
library it is using at runtime.

If you recompile the interpreter in debug mode (--with-pydebug on your 
./configure) does it still happen?

Can you run it under gdb and get the C stacktrace?  that'll tell more than 
faulthandler alone does.  [I'm glad to see you're using faulthandler though!]

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16660
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com