Errno 22 on seek in pack operation

Bug #1158229 reported by Bob Wansink
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

We have been experiencing an "errno 22: Invalid argument" error in several operations in bazaar (update, revert, pack). After debugging it appeared that the error was in /bzrlib/transport/__init__.py, on line 718. This is a seek() operation which crashes on large files on our (samba) network disk during the pack operation, which is called by several other operations.

We tried to repair this by reading in larger chunks of the file, but this also generates an "errno 22". We finally fixed it using the following modification:

323c323
< _bytes_to_read_before_seek = 0
---
> _bytes_to_read_before_seek = 100000000
716a717
> print c_offset.start, c_offset.length
718c719,723
< data = fp.read(c_offset.length)
---
> max_read = 10000000 # 10MB
> data = ""
> while len(data) < c_offset.length:
> data += fp.read(min(max_read, c_offset.length - len(data)))
> # data = fp.read(c_offset.length)

Revision history for this message
Bob Wansink (bobwansink) wrote :
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.