dirstate cannot handle versioned files that become fifo's.

Bug #438569 reported by Felix Möller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Robert Collins
2.0
Fix Released
Medium
Robert Collins

Bug Description

I did cd /etc; bzr init; bzr add *; bzr ci -m initial several days ago.

Today I did an bzr diff /etc and it gave me:
# bzr diff /etc/
bzr: ERROR: exceptions.Exception: unknown kind fifo

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1045, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bzrlib/builtins.py", line 1913, in run
    extra_trees=extra_trees, using=using)
  File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 432, in show_diff_trees
    return differ.show_diff(specific_files, extra_trees)
  File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 839, in show_diff
    return self._show_diff(specific_files, extra_trees)
  File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 862, in _show_diff
    executable) in sorted(iterator, key=changes_key):
  File "_dirstate_helpers_pyx.pyx", line 1349, in _dirstate_helpers_pyx.ProcessEntryC.__next__
  File "_dirstate_helpers_pyx.pyx", line 1614, in _dirstate_helpers_pyx.ProcessEntryC._iter_next
  File "_dirstate_helpers_pyx.pyx", line 1704, in _dirstate_helpers_pyx.ProcessEntryC._loop_one_block
  File "_dirstate_helpers_pyx.pyx", line 1175, in _dirstate_helpers_pyx.ProcessEntryC._process_entry
Exception: unknown kind fifo

bzr 1.18.1 on python 2.6 (linux2)
arguments: ['/usr/bin/bzr', 'diff', '/etc/']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.UTF-8'
plugins:
  launchpad /usr/lib/python2.6/site-packages/bzrlib/plugins/launchpad [1.18.1]
  netrc_credential_store /usr/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [1.18.1]
  qbzr /usr/lib/python2.6/site-packages/bzrlib/plugins/qbzr [0.15dev]
*** 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.

# bzr version
Bazaar (bzr) 1.18.1
  Python interpreter: /usr/bin/python 2.6
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/site-packages/bzrlib
  Bazaar configuration: /root/.bazaar
  Bazaar log file: /root/.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Tags: dirstate

Related branches

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 438569] [NEW] bzr gives internal error on fifo

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Felix Möller wrote:
> Public bug reported:
>
> I did cd /etc; bzr init; bzr add *; bzr ci -m initial several days ago.
>
> Today I did an bzr diff /etc and it gave me:
> # bzr diff /etc/
> bzr: ERROR: exceptions.Exception: unknown kind fifo
>
> Traceback (most recent call last):
> File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 835, in exception_to_return_code
> return the_callable(*args, **kwargs)
> File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1030, in run_bzr
> ret = run(*run_argv)
> File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 647, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1045, in ignore_pipe
> result = func(*args, **kwargs)
> File "/usr/lib/python2.6/site-packages/bzrlib/builtins.py", line 1913, in run
> extra_trees=extra_trees, using=using)
> File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 432, in show_diff_trees
> return differ.show_diff(specific_files, extra_trees)
> File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 839, in show_diff
> return self._show_diff(specific_files, extra_trees)
> File "/usr/lib/python2.6/site-packages/bzrlib/diff.py", line 862, in _show_diff
> executable) in sorted(iterator, key=changes_key):
> File "_dirstate_helpers_pyx.pyx", line 1349, in _dirstate_helpers_pyx.ProcessEntryC.__next__
> File "_dirstate_helpers_pyx.pyx", line 1614, in _dirstate_helpers_pyx.ProcessEntryC._iter_next
> File "_dirstate_helpers_pyx.pyx", line 1704, in _dirstate_helpers_pyx.ProcessEntryC._loop_one_block
> File "_dirstate_helpers_pyx.pyx", line 1175, in _dirstate_helpers_pyx.ProcessEntryC._process_entry
> Exception: unknown kind fifo
>

Interesting. My best guess is that you added something that used to be a
file, and has since turned into a FIFO. (We automatically skip over FIFO
during add, but something at a given path can always turn into something
else.)

Thanks for the report.

  status confirmed
  importance high

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAkrCHWwACgkQJdeBCYSNAAPdVgCYlb/q2xcLH25dtOvNR8yELh8l
RwCfTOs0br/X1KY/WOnKjcRwopjQsaU=
=pR4t
-----END PGP SIGNATURE-----

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
tags: added: dirstate
Revision history for this message
Robert Collins (lifeless) wrote :

I agree with John's analysis. I think we have to handle the file becoming a fifo somewhat more gracefully - perhaps raising a BzrCommandError saying that a versioned file has become unversionable.

summary: - bzr gives internal error on fifo
+ dirstate cannot handle versioned files that become fifo's.
Revision history for this message
Robert Collins (lifeless) wrote :

Bumping to medium, few users will encounter this and there are no data integrity implications that i can see.

Changed in bzr:
importance: High → Medium
Changed in bzr:
status: Confirmed → Fix Committed
assignee: nobody → Robert Collins (lifeless)
Andrew Bennetts (spiv)
Changed in bzr:
status: Fix Committed → Fix Released
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 2.1.0b1
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.