test failure: test_http.SmartHTTPTunnellingTest.test_http_send_smart_request (dictionary changed size during iteration)

Bug #277048 reported by pva
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Martin Pool

Bug Description

On my system I see this test failure in bzr-1.7.1:

ERROR: test_http.SmartHTTPTunnellingTest.test_http_send_smart_request(pycurl,HTTP/1.0)
    dictionary changed size during iteration

[13605/13605 in 24m7s, 1 err, 13 missing] bzrlib.version_info_formats.format_custom.Template
======================================================================
ERROR: test_http_send_smart_request (bzrlib.tests.test_http.SmartHTTPTunnellingTest)

vvvv[log from bzrlib.tests.test_http.SmartHTTPTunnellingTest.test_http_send_smart_request(pycurl,HTTP/1.0)]
1112.384 encoding stdout as sys.stdout encoding 'stdout_encoding'
1112.385 encoding stdout as sys.stdin encoding 'stdin_encoding'
1112.385 encoding stdout as bzrlib.user_encoding 'user_encoding'
1112.385 encoding stdout as sys.stdout encoding 'cp0'
1112.386 cp0 is invalid encoding. encoding stdout as bzrlib.user_encoding 'latin-1'
1112.386 encoding stdout as sys.stdout encoding 'cp-unknown'
1126.881 clamping count of 5 to 4
1457.649 Returning RevisionSpec RevisionSpec_before for before:123
1457.652 Returning RevisionSpec RevisionSpec_revid for revid:<email address hidden>
1457.652 Returning RevisionSpec RevisionSpec_revid for revid:<email address hidden>
1457.652 Returning RevisionSpec RevisionSpec_revid for revid:<email address hidden>
1457.653 Returning RevisionSpec RevisionSpec_revid for revid:<email address hidden>
1457.653 Returning RevisionSpec RevisionSpec_date for date:2005-04-12
1457.653 Returning RevisionSpec RevisionSpec_date for date:2005-04-12 12:24:33
1457.653 Returning RevisionSpec RevisionSpec_date for date:2005-04-12T12:24:33
1457.653 Returning RevisionSpec RevisionSpec_date for date:2005-04-12,12:24:33
1457.654 Returning RevisionSpec RevisionSpec_branch for branch:../branch2
1457.655 Returning RevisionSpec RevisionSpec_branch for branch:../../branch2
1457.655 Returning RevisionSpec RevisionSpec_branch for branch:../../branch2
1457.655 Returning RevisionSpec RevisionSpec_branch for branch:..\branch2
1457.655 Returning RevisionSpec RevisionSpec_branch for branch:..\..\branch2

^^^^[log from bzrlib.tests.test_http.SmartHTTPTunnellingTest.test_http_send_smart_request(pycurl,HTTP/1.0)]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/vt/portage/tmp/portage/dev-util/bzr-1.7.1/work/bzr-1.7.1/bzrlib/workingtree.py", line 307, in open
    control = bzrdir.BzrDir.open(path, _unsupported)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.7.1/work/bzr-1.7.1/bzrlib/bzrdir.py", line 771, in open
    t = get_transport(base, possible_transports=possible_transports)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.7.1/work/bzr-1.7.1/bzrlib/transport/__init__.py", line 1559, in get_transport
    for proto, factory_list in transport_list_registry.iteritems():
  File "/vt/portage/tmp/portage/dev-util/bzr-1.7.1/work/bzr-1.7.1/bzrlib/registry.py", line 216, in iteritems
    for key, getter in self._dict.iteritems():
RuntimeError: dictionary changed size during iteration

----------------------------------------------------------------------

Just in case you are interested full output is in attachment.

Revision history for this message
pva (pva) wrote :
Revision history for this message
pva (pva) wrote :

Seems that this error does not exist in bzr-1.10. At least I don't see anything similar in tests output.

Revision history for this message
David Leverton (dleverton) wrote :

I'm still seeing thing in 1.10 final (sometimes; it's intermittent, sometimes it works fine).

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

And do you have the pycurl library installed? (Does "python -c 'import pycurl'" succeed?)

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :
Changed in bzr:
assignee: nobody → mbp
status: Confirmed → Fix Committed
Revision history for this message
pva (pva) wrote :

Well, this bug really still there. I've downgraded curl and pycurl to 7.18.2 and 7.16.4 versions respectively and reproduced it. With patch attached here I see different problem:

bzr: ERROR: exceptions.AttributeError: 'TransportListRegistry' object has no attribute 'items'

Traceback (most recent call last):
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/builtins.py", line 2842, in run
    starting_with=starting_with,
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/__init__.py", line 2582, in selftest
    suite = test_suite(keep_only, starting_with)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/__init__.py", line 2957, in test_suite
    suite.addTest(loader.loadTestsFromModuleNames(testmod_names))
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/TestUtil.py", line 92, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/TestUtil.py", line 99, in loadTestsFromModuleName
    result.addTests(self.loadTestsFromModule(module))
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/TestUtil.py", line 129, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/test_read_bundle.py", line 37, in load_tests
    adapter = TransportTestProviderAdapter()
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/test_transport_implementations.py", line 73, in __init__
    self.scenarios = self._test_permutations()
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/tests/test_transport_implementations.py", line 87, in _test_permutations
    for module in _get_transport_modules():
  File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/transport/__init__.py", line 87, in _get_transport_modules
    for prefix, factory_list in transport_list_registry.items():
AttributeError: 'TransportListRegistry' object has no attribute 'items'

bzr 1.10 on python 2.5.2 (linux2)
arguments: ['bzr', '--no-plugins', 'selftest']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: 'ru_RU.UTF-8'
plugins:
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 277048] Re: test failure: test_http.SmartHTTPTunnellingTest.test_http_send_smart_request (dictionary changed size during iteration)

On Tue, Dec 9, 2008 at 4:58 AM, pva <email address hidden> wrote:
> File "/vt/portage/tmp/portage/dev-util/bzr-1.10/work/bzr-1.10/bzrlib/transport/__init__.py", line 87, in _get_transport_modules
> for prefix, factory_list in transport_list_registry.items():
> AttributeError: 'TransportListRegistry' object has no attribute 'items'

The patch originally posted had a bug like this. A fixed version was
merged to bzr.dev, and should now be in the nightly ppa
<https://launchpad.net/~bzr-nightly-ppa/+archive> or of course you can
get it through bzr.dev

--
Martin <http://launchpad.net/~mbp/>

Jelmer Vernooij (jelmer)
Changed in bzr:
status: Fix Committed → Fix Released
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.