Bug 735658 - [abrt] mercurial-1.9.2-1.fc15: ssl.py:159:getpeercert:AttributeError: 'NoneType' object has no attribute 'peer_certificate'
Summary: [abrt] mercurial-1.9.2-1.fc15: ssl.py:159:getpeercert:AttributeError: 'NoneTy...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mercurial
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Neal Becker
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:37c072849d647dfbec0e73f84de...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-04 16:37 UTC by cyrushmh
Modified: 2011-10-31 10:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-31 10:28:29 UTC


Attachments (Terms of Use)
/usr/lib64/python2.7/site-packages/mercurial/ssl.py (14.82 KB, text/plain)
2011-09-05 09:16 UTC, Mads Kiilerich
no flags Details

Description cyrushmh 2011-09-04 16:37:11 UTC
abrt version: 2.0.3
architecture:   x86_64
cmdline:        
component:      mercurial
executable:     /usr/bin/hg
kernel:         2.6.40.4-5.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        mercurial-1.9.2-1.fc15
reason:         ssl.py:159:getpeercert:AttributeError: 'NoneType' object has no attribute 'peer_certificate'
time:           Mon Sep  5 00:33:13 2011
uid:            500

backtrace:
:ssl.py:159:getpeercert:AttributeError: 'NoneType' object has no attribute 'peer_certificate'
:
:Traceback (most recent call last):
:  File "/usr/bin/hg", line 38, in <module>
:    mercurial.dispatch.run()
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
:    sys.exit(dispatch(request(sys.argv[1:])))
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
:    return _runcatch(req)
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
:    return _dispatch(req)
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 688, in _dispatch
:    cmdpats, cmdoptions)
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 463, in runcommand
:    ret = _runcommand(ui, options, cmd, d)
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 742, in _runcommand
:    return checkargs()
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 696, in checkargs
:    return cmdfunc()
:  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 685, in <lambda>
:    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
:  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 385, in check
:    return func(*args, **kwargs)
:  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 3774, in pull
:    other = hg.peer(repo, opts, source)
:  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 104, in peer
:    return repository(rui, path, create)
:  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 93, in repository
:    repo = _peerlookup(path).instance(ui, path, create)
:  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 231, in instance
:    inst._fetchcaps()
:  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 56, in _fetchcaps
:    self.caps = set(self._call('capabilities').split())
:  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 164, in _call
:    fp = self._callstream(cmd, **args)
:  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 114, in _callstream
:    resp = self.urlopener.open(req)
:  File "/usr/lib64/python2.7/urllib2.py", line 392, in open
:    response = self._open(req, data)
:  File "/usr/lib64/python2.7/urllib2.py", line 410, in _open
:    '_open', req)
:  File "/usr/lib64/python2.7/urllib2.py", line 370, in _call_chain
:    result = func(*args)
:  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 360, in https_open
:    return self.do_open(self._makeconnection, req)
:  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 256, in do_open
:    self._start_transaction(h, req)
:  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 346, in _start_transaction
:    return keepalive.KeepAliveHandler._start_transaction(self, h, req)
:  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 354, in _start_transaction
:    h.endheaders()
:  File "/usr/lib64/python2.7/httplib.py", line 937, in endheaders
:    self._send_output(message_body)
:  File "/usr/lib64/python2.7/httplib.py", line 797, in _send_output
:    self.send(msg)
:  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 133, in _sendfile
:    orgsend(self, data)
:  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 537, in safesend
:    self.connect()
:  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 335, in connect
:    sslutil.validator(self.ui, host)(self.sock)
:  File "/usr/lib64/python2.7/site-packages/mercurial/sslutil.py", line 105, in __call__
:    peercert = sock.getpeercert(True)
:  File "/usr/lib64/python2.7/ssl.py", line 159, in getpeercert
:    return self._sslobj.peer_certificate(binary_form)
:AttributeError: 'NoneType' object has no attribute 'peer_certificate'
:
:Local variables in innermost frame:
:self: <ssl.SSLSocket object at 0xc85488>
:binary_form: True

comment:
:$hg pull 
:from googlecode.com

Comment 1 Mads Kiilerich 2011-09-04 19:55:22 UTC
Can you reproduce this - consistently?

Is there any special network components (firewalls) that block the connection?

Comment 2 cyrushmh 2011-09-04 23:16:44 UTC
(In reply to comment #1)
> Can you reproduce this - consistently?
Yes,I can ,,
this bug when I yum update from updates-testing last
> 
> Is there any special network components (firewalls) that block the connection?

..sad, yes sometimes my ISP block this site.. but before version I can hg pull && hg update from google code,,
this site url is about ipv6 hosts.

Comment 3 Mads Kiilerich 2011-09-05 09:16:26 UTC
Created attachment 521461 [details]
/usr/lib64/python2.7/site-packages/mercurial/ssl.py

We have seen a similar report from a Chinese user.

This error "can't happen". It seems to be a bug in Python, but we need to understand the bug in order to correctly work around it.

Can you try to place the attached file in
/usr/lib64/python2.7/site-packages/mercurial/ssl.py , reproduce the problem using
  hg -v --debug ...
, show us the full output, and remove this ssl.py again?

Comment 4 Mads Kiilerich 2011-09-05 09:19:10 UTC
- and what do you mean with "this site url is about ipv6 hosts"? Are you using a IPv6 system with no IPv4?

Comment 5 cyrushmh 2011-09-06 02:37:57 UTC
(In reply to comment #3)
> Created attachment 521461 [details]
> /usr/lib64/python2.7/site-packages/mercurial/ssl.py
> 
> We have seen a similar report from a Chinese user.
> 
> This error "can't happen". It seems to be a bug in Python, but we need to
> understand the bug in order to correctly work around it.
> 
> Can you try to place the attached file in
> /usr/lib64/python2.7/site-packages/mercurial/ssl.py , reproduce the problem
> using
>   hg -v --debug ...
> , show us the full output, and remove this ssl.py again?
yes ,,detail
分布式软件配置管理工具 - 水银 (版本 1.9.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

基本命令:

 add:
      add the specified files on the next commit
 annotate, blame:
      show changeset information by line for each file
 clone:
      make a copy of an existing repository
 commit, ci:
      commit the specified files or all outstanding changes
 diff:
      diff repository (or selected files)
 export:
      dump the header and diffs for one or more changesets
 forget:
      forget the specified files on the next commit
 init:
      create a new repository in the given directory
 log, history:
      show revision history of entire repository or files
 merge:
      merge working directory with another revision
 pull:
      pull changes from the specified source
 push:
      push changes to the specified destination
 remove, rm:
      remove the specified files on the next commit
 serve:
      start stand-alone webserver
 status, st:
      show changed files in the working directory
 summary, sum:
      summarize working directory state
 update, up, checkout, co:
      update working directory (or switch revisions)

全局选项:
 -R --repository REPO    repository root directory or name of overlay bundle
                         file
    --cwd DIR            改变工作目录
 -y --noninteractive     do not prompt, automatically pick the first choice
                         for all prompts
 -q --quiet              抑制输出
 -v --verbose            启用额外的输出
    --config CONFIG [+]  set/override config option (use 'section.name=value')
    --debug              启用调试输出
    --debugger           启动调试器
    --encoding ENCODE    设置字符集编码 (默认: UTF-8)
    --encodingmode MODE  设置字符集编码模式 (默认: strict)
    --traceback          always print a traceback on exception
    --time               为命令计时
    --profile            显示命令执行的剖析
    --version            显示版本信息后退出
 -h --help               显示帮助后退出

[+] marked option can be specified multiple times

使用 "hg help" 获得全部命令的列表

(In reply to comment #4)
> - and what do you mean with "this site url is about ipv6 hosts"? Are you using
> a IPv6 system with no IPv4?

this mean is,
I need these ipv6 hosts when miredo start,
My ISP support ipv6 ,,but native ipv4,
I need that ipv6 hosts,match add to browser some website

Comment 6 Mads Kiilerich 2011-09-06 08:37:52 UTC
(In reply to comment #5)
> > Can you try to place the attached file in
> > /usr/lib64/python2.7/site-packages/mercurial/ssl.py , reproduce the problem
> > using
> >   hg -v --debug ...
> > , show us the full output, and remove this ssl.py again?
> yes ,,detail
> 分布式软件配置管理工具 - 水银 (版本 1.9.2)
> (see http://mercurial.selenic.com for more information)

That wasn't meant literally. Run the clone command that failed, but add -v and --debug . And please show the full terminal output, including the command you run.

> (In reply to comment #4)
> > - and what do you mean with "this site url is about ipv6 hosts"? Are you using
> > a IPv6 system with no IPv4?
> 
> this mean is,
> I need these ipv6 hosts when miredo start,
> My ISP support ipv6 ,,but native ipv4,
> I need that ipv6 hosts,match add to browser some website

I am sorry - I don't understand that.

Comment 7 cyrushmh 2011-09-07 11:49:31 UTC
Package: mercurial-1.9.2-1.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
hg pull
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.1 (r271:86832, Jul 13 2011, 21:12:43) [GCC 4.6.1]
** 分布式软件配置管理工具 - 水银 (版本 1.9.2)
** 已加载的扩展: 
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 688, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 463, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 742, in _runcommand
    return checkargs()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 696, in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 685, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 385, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 3774, in pull
    other = hg.peer(repo, opts, source)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 104, in peer
    return repository(rui, path, create)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 93, in repository
    repo = _peerlookup(path).instance(ui, path, create)
  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 231, in instance
    inst._fetchcaps()
  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 56, in _fetchcaps
    self.caps = set(self._call('capabilities').split())
  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 164, in _call
    fp = self._callstream(cmd, **args)
  File "/usr/lib64/python2.7/site-packages/mercurial/httprepo.py", line 114, in _callstream
    resp = self.urlopener.open(req)
  File "/usr/lib64/python2.7/urllib2.py", line 392, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 410, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 370, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 360, in https_open
    return self.do_open(self._makeconnection, req)
  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 256, in do_open
    self._start_transaction(h, req)
  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 346, in _start_transaction
    return keepalive.KeepAliveHandler._start_transaction(self, h, req)
  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 354, in _start_transaction
    h.endheaders()
  File "/usr/lib64/python2.7/httplib.py", line 937, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 797, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 133, in _sendfile
    orgsend(self, data)
  File "/usr/lib64/python2.7/site-packages/mercurial/keepalive.py", line 537, in safesend
    self.connect()
  File "/usr/lib64/python2.7/site-packages/mercurial/url.py", line 335, in connect
    sslutil.validator(self.ui, host)(self.sock)
  File "/usr/lib64/python2.7/site-packages/mercurial/sslutil.py", line 105, in __call__
    peercert = sock.getpeercert(True)
  File "/usr/lib64/python2.7/ssl.py", line 159, in getpeercert
    return self._sslobj.peer_certificate(binary_form)
AttributeError: 'NoneType' object has no attribute 'peer_certificate'


Note You need to log in before you can comment on or make changes to this bug.