Failed to run bzr

Bug #1031773 reported by IWATA Hidetaka
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

lp:bzr (r6543)

All commands crash with below traceback.

Traceback (most recent call last):
  File "C:\DEVELOP\py_envs\bzr2.6\Scripts\bzr", line 114, in <module>
    library_state = bzrlib.initialize()
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\__init__.py", line 226, in initialize
    state._start()
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\library_state.py", line 98, in _start
    self._trace.__enter__()
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\trace.py", line 654, in __enter__
    self._original_state = enable_default_logging()
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\trace.py", line 286, in enable_default_logging
    bzr_log_file = _open_bzr_log()
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\trace.py", line 247, in _open_bzr_log
    _rollover_trace_maybe(_bzr_log_filename)
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\trace.py", line 191, in _rollover_trace_maybe
    osutils.rename(trace_fname, old_fname)
  File "C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib\osutils.py", line 466, in _rename_wrapper
    (old, new))
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 0: ordinal not in range(128)

Bazaar (bzr) 2.6.0dev3
  Python interpreter: C:\DEVELOP\py_envs\bzr2.6\Scripts\python.exe 2.7.2
  Python standard library: C:\DEVELOP\py_envs\bzr2.6\lib
  Platform: Windows-7-6.1.7601-SP1
  bzrlib: C:\DEVELOP\py_envs\bzr2.6\lib\site-packages\bzrlib
  Bazaar configuration: C:/Users/iwata/AppData/Roaming/bazaar/2.0
  Bazaar log file: C:\Users\iwata\Documents\.bzr.log

--
This problem comes from several causes.

1. At first, bzr trys to rename .bzr.log to .bzr.log.old if the log file size is over the threshold.
    But this often fails. (One of major causes is that .bzr.log.old already exists, another is that tbzr or other bzr process locks it.)

2. Exception handler of osutils.rename has a problem about non-ascii characters. So bzr can't handle rename error correctly.

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

This is a regression from bug 492144 landed in r6498.

For whatever reason I mentioned in the review that the code didn't handle non-ascii filenames correctly but then landed it anyway and didn't fix in a follow up, sorry...

<https://code.launchpad.net/~rosslagerwall/bzr/492144-rename-wrapper/+merge/93485>

Changed in bzr:
importance: Undecided → High
milestone: none → 2.6b3
status: New → Confirmed
Revision history for this message
IWATA Hidetaka (hid-iwata) wrote :

OSError.strerror also can be non-ascii string in the localized Windows, just in case.

Vincent Ladeuil (vila)
Changed in bzr:
milestone: 2.6b3 → none
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: added: unicode
removed: 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.