Permissions problems on knits can cause too many concurrent connection

Bug #118569 reported by Rob Holland
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

trunk/ $ bzr push
Using saved location: bzr+ssh://foo/foo/trunk/
/ [============================== ] Fetch phase 1/4bzr: ERROR: exceptions.ValueError: I/O operation on closed file

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 721, in run_bzr_catch_errors
    sys.stdout.flush()
ValueError: I/O operation on closed file

bzr 0.16.0 on python 2.4.4.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'serve', '--inet', '--directory=/', '--allow-writes']

** please send this report to <email address hidden>
Traceback (most recent call last):
  File "/usr/bin/bzr", line 111, in ?
    sys.stdout.flush()
ValueError: I/O operation on closed file
bzr: ERROR: bzrlib.errors.TooManyConcurrentRequests: The medium '<bzrlib.smart.medium.SmartSSHClientMedium object at 0x12613b0>' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.

Traceback (most recent call last):
  File "/opt/local/lib/python2.4/site-packages/bzrlib/commands.py", line 718, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/commands.py", line 679, in run_bzr
    ret = run(*run_argv)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/commands.py", line 375, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/builtins.py", line 820, in run
    push_result = br_from.push(br_to, overwrite)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/branch.py", line 1548, in push
    target.unlock()
  File "/opt/local/lib/python2.4/site-packages/bzrlib/remote.py", line 919, in unlock
    self._unlock(branch_token, repo_token)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/remote.py", line 886, in _unlock
    repo_token)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/smart/client.py", line 30, in call
    result, protocol = self.call_expecting_body(method, *args)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/smart/client.py", line 42, in call_expecting_body
    request = self._medium.get_request()
  File "/opt/local/lib/python2.4/site-packages/bzrlib/smart/medium.py", line 412, in get_request
    return SmartClientStreamMediumRequest(self)
  File "/opt/local/lib/python2.4/site-packages/bzrlib/smart/medium.py", line 566, in __init__
    raise errors.TooManyConcurrentRequests(self._medium)
TooManyConcurrentRequests: The medium '<bzrlib.smart.medium.SmartSSHClientMedium object at 0x12613b0>' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the currently open request.

bzr 0.16.0 on python 2.4.4.final.0 (darwin)
arguments: ['/opt/local/bin/bzr', 'push']

** please send this report to <email address hidden>

This looks like it may be due to bad file permissions (which were my fault, not bzr's):

trunk/ $ bzr push sftp://foo/foo/trunk/
bzr: ERROR: Permission denied: 'ef/file.txt-20070603132427-69hrrdt822alk021-6.knit': [Errno 13] Permission denied

After fixing those permissions, the push completed succesfully.

Revision history for this message
John A Meinel (jameinel) wrote :

What machine is the server running on (OS, etc)?

What it actually seems to be happening is the bzr public client gets an exception and is shutting down, and then tries to flush stdout (but it seems to already be closed). So it is hiding the real exception.

Thanks for the bug report. Is it possible for you to reliably reproduce it? (like by doing bzr init/add/commit; chmod -R; bzr push bzr+ssh://localhost/...) ?

Having a simple script to reproduce the bug makes it much easier to fix.

John A Meinel (jameinel)
Changed in bzr:
importance: Undecided → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Rob Holland (rob-inversepath) wrote : Re: [Bug 118569] Re: Permissions problems on knits can cause too many concurrent connection

On Mon, Jun 04, 2007 at 02:07:03PM -0000, John A Meinel wrote:
> What machine is the server running on (OS, etc)?

The server is using Gentoo, python 2.4.4, bzr 0.16.

> Thanks for the bug report. Is it possible for you to reliably reproduce
> it? (like by doing bzr init/add/commit; chmod -R; bzr push
> bzr+ssh://localhost/...) ?

bzr init testing
cd testing
touch test
bzr add test
bzr commit -m "test"
bzr branch . ../testing-branch
sudo chown -R nobody:nobody ../testing-branch/.bzr/repository/knits
echo rabbits > test
bzr commit -m "test"
bzr push bzr+ssh://localhost/path/to/testing
*concurrent connection limit stack trace*

> Having a simple script to reproduce the bug makes it much easier to fix.

Hope that helps.

Thanks,

Rob

Revision history for this message
John Dong (jdong) wrote :

I can confirm that this happens over bzr+ssh:// where the knit directory has incorrect permissions. This is on bzr 0.18, the traceback is almost identical

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

Revision history for this message
James Westby (james-w) wrote :

Apparently confirmed.

Changed in bzr:
status: Invalid → Confirmed
Jelmer Vernooij (jelmer)
tags: added: hpss knits
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.