bzr crashed with error in _curl_perform(): (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')

Bug #851834 reported by eternaltyro
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
bzr (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

bzr crashed when trying to add a login.

bzr launchpad-login <id_here>

ProblemType: Crash
DistroRelease: Ubuntu 11.04
Package: bzr 2.3.4-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic i686
Architecture: i386
BzrDebugFlags: set()
BzrPlugins:
 bash_completion /usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion [2.3.4]
   bzrtools /usr/lib/python2.7/dist-packages/bzrlib/plugins/bzrtools [2.3.1]
   launchpad /usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad [2.3.4]
   netrc_credential_store /usr/lib/python2.7/dist-packages/bzrlib/plugins/netrc_credential_store [2.3.4]
   news_merge /usr/lib/python2.7/dist-packages/bzrlib/plugins/news_merge [2.3.4]
BzrVersion: 2.3.4
CommandLine: ['/usr/bin/bzr', 'launchpad-login', 'eternaltyro']
CrashDb: bzr
Date: Fri Sep 16 17:33:50 2011
ExecutablePath: /usr/bin/bzr
FileSystemEncoding: UTF-8
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
InterpreterPath: /usr/bin/python2.7
Locale: en_IN.UTF-8
PackageArchitecture: all
Platform: Linux-2.6.38-11-generic-i686-with-Ubuntu-11.04-natty
ProcCmdline: /usr/bin/python /usr/bin/bzr launchpad-login eternaltyro
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_IN.UTF-8
 LANGUAGE=en_IN:en
PythonVersion: 2.7.1
SourcePackage: bzr
Title: bzr crashed with error in _curl_perform(): (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')
UpgradeStatus: Upgraded to natty on 2011-07-14 (64 days ago)
UserEncoding: UTF-8
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Revision history for this message
eternaltyro (eternaltyro) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bzr (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

Seems to be a different flavour of the existing curl bug, which should now be fixed in Natty and Oneiric. Can someone confirm that updating curl resolves this issue?

visibility: private → public
Revision history for this message
Arnel A. Borja (kyoushuu) wrote :

Is it fixed in Precise? I still get the same error message in Precise.

Revision history for this message
Martin Packman (gz) wrote :

Presumably not fixed if it's still present in precise.

To work out what's wrong here, we really need someone affected by this to dig further. It's certainly similar to bug 736216 which may indicate a curl or some other environmental issue.

Revision history for this message
Arnel A. Borja (kyoushuu) wrote :

If you could provide some steps on how to do that, it would be helpful for me, I don't know how to debug Python programs. This is the output in my machine:

kyoushuu@kyoushuu-netbook-precise:~$ bzr launchpad-login kyoushuu
bzr: ERROR: pycurl.error: (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 919, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1124, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 672, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 694, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/__init__.py", line 284, in run
    account.check_lp_login(name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/account.py", line 108, in check_lp_login
    data = _transport.get_bytes('~%s/+sshkeys' % username)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/__init__.py", line 623, in get_bytes
    f = self.get(relpath)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/http/__init__.py", line 121, in get
    code, response_file = self._get(relpath, None)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_pycurl.py", line 173, in _get
    return self._get_full(relpath)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_pycurl.py", line 208, in _get_full
    self._curl_perform(curl, header)
  File "/usr/lib/python2.7/dist-packages/bzrlib/transport/http/_pycurl.py", line 392, in _curl_perform
    curl.perform()
error: (35, 'gnutls_handshake() failed: A TLS packet with unexpected length was received.')

You can report this problem to Bazaar's developers by running
    apport-bug /var/crash/bzr.1000.2012-02-07T15:02.crash
if a bug-reporting window does not automatically appear.

From what I found searching about this, it's a bug in GnuTLS.

I included the said file as an attachment.

Revision history for this message
Martin Pool (mbp) wrote :

I think it would be good to get a network-level capture of the problem. Even though it's encrypted, that may go down at least to the TLS/SSL packetization layer enough to let us understand more what's going on.

To do this:

 * install tcpdump
 * sudo tcpdump -i eth0 -p ip net 91.189.89.0/24 and tcp port 443 -w /tmp/lp.dump
 * while that's running, in another window, run the problematic bzr command
 * after bzr fails, press ctrl-C on tcpdump
 * attach /tmp/lp.dump to this bug

If you're behind an https proxy, please let us know, because firstly that may be the cause of the problem and secondly you will need to adjust the tcpdump expression.

Revision history for this message
Arnel A. Borja (kyoushuu) wrote :

Sorry but I can no longer test that internet connection because it's already cut just this week. I tried bzr in the internet connection in a company and it works.

Revision history for this message
Arnel A. Borja (kyoushuu) wrote :

A new, but same internet connection is installed here today. I tried 'bzr lp-login kyoushuu' and it worked.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks for the updates. I guess we could at least just print a regular error here rather than a full backtrace, but there isn't much we can do to actually fix this I think.

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
pawciobiel (pawciobiel) wrote :

Please see Bug #926548 for more info and updates on that issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.