Crash while committing

Bug #958551 reported by Maarten Bezemer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-builddeb (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am using both the daily build (version 2.5.0~bzr6511.6186~ppa4022~oneiric1) and the oneiric-proposed (version 2.4.2-0ubuntu1), the crash happens (reproducible) with both versions.

$ bzr commit --fixes lp:958534 --fixes lp:902339
Committing to: /home/maarten/src/packaging/samba/samba/
modified .pc/applied-patches
added .pc/documentation2.patch
...and a lot more...
modified examples/tridge/smb.conf
modified swat/lang/tr/help/welcome.html
bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2431: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1141, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, 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/builtins.py", line 3670, in run
    lossy=lossy)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 218, in commit
    result = WorkingTree.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/mutabletree.py", line 211, in commit
    *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commit.py", line 290, in commit
    lossy=lossy)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *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/commit.py", line 447, in _commit
    self.rev_id = self.builder.commit(self.message)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 209, in commit
    self.repository._add_revision(rev)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1068, in _add_revision
    text = self._serializer.write_revision_to_string(revision)
  File "/usr/lib/python2.7/dist-packages/bzrlib/chk_serializer.py", line 99, in write_revision_to_string
    ("message", encode_utf8(rev.message)[0]),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2431: ordinal not in range(128)

The attachment contains the full crash report.

I working directory that I cannot commit is made by:
 1) bzr branch lp:ubuntu/samba
 2) bzr branch lp:debian/samba samba-debian
 3) cd samba
 4) bzr merge ../samba-debian
 5) edit debian changelog
 6) bzr commit

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

Thanks for the report, can you describe exactly how you supplied the commit message, and was it partially populated from the debian changelog? If so, can you attach the message you used?

This looks similar to bug 839426 and the underlying issue is related to bug 663593, a byte string is getting through the commit builder and breaking things a lower level.

Changed in bzr (Ubuntu):
status: New → Incomplete
Revision history for this message
Maarten Bezemer (veger) wrote :

After I issued the 'bzr commit' command, it showed the output I posted.
After the ' modified swat/lang/tr/help/welcome.html' line:
 - it took some time.
 - It briefly showed '| Saving data locally - Stage 2/5 ' (and it wnet away again).
 - Soon after that the crash output was shown.

I did not had the change to enter a commit message yet. You question gave me the idea to trying to directly enter a commit message in the command:

$ bzr commit -m "test"

which works (no crash).
Please let me know if you require more tests/information.

Changed in bzr (Ubuntu):
status: Incomplete → New
Revision history for this message
Maarten Bezemer (veger) wrote :

Note: I you wish, I can archive the complete working directory and send it, so you can experiment yourself.

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

Thanks Maarten. I'd really like to know what the commit message causing the issue was. If you can reproduce this, there are a couple of ways to go about doing that, perhaps the easiest would be:

$ BZR_PDB=1 bzr commit
... gets you into pdb debugger
> p repr(rev.message)

And include that (potentially large) output here.

Finally, can you try updating to the latest version of the bzr-builddeb plugin and see if the error still occurs, or comes in a different form? The hook that automatically filled out the commit message has been removed, so it should be possible to save what appears in the editor and attach it here. Thanks.

Revision history for this message
Maarten Bezemer (veger) wrote :

It is indeed solved with the update of bzr-builddeb. But I suppose that removing the hook is not a real fix?

I have the output of the BDB method and the commit message after the update attached.

Revision history for this message
Maarten Bezemer (veger) wrote :
Revision history for this message
Wouter van Heyst (larstiq) wrote : Re: [+lp] [Bug 958551] Re: Crash while committing

Hey Maarten!

On Mon, Mar 19, 2012 at 17:31:43 -0000, Maarten Bezemer wrote:
> ** Attachment added: "commit-message.txt.gz"
> https://bugs.launchpad.net/ubuntu/+source/bzr/+bug/958551/+attachment/2898622/+files/commit-message.txt.gz

That is:

    * Slovak (Ivan Mas\\xc3\\xa1r)

which decodes into

    u'* Slovak (Ivan Mas\xe1r)'

which then prints like

    * Slovak (Ivan Masár)

but in the commit message after the update gets mangled as

    * Slovak (Ivan Masár)

which is the latin1 decoding of the bytestring.

Cheers,
Wouter

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

This does seem to be the fixed builddeb issue just with a different traceback.

affects: bzr (Ubuntu) → bzr-builddeb (Ubuntu)
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.