Skip to content

GC encounters unexpected error #4142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WestXu opened this issue Jul 1, 2020 · 1 comment
Closed

GC encounters unexpected error #4142

WestXu opened this issue Jul 1, 2020 · 1 comment
Labels
triage Needs to be triaged

Comments

@WestXu
Copy link

WestXu commented Jul 1, 2020

Bug Report

Output of dvc version:

$ dvc version
DVC version: 0.94.0
Python version: 3.8.1
Platform: Linux-4.19.104-microsoft-standard-x86_64-with-glibc2.10
Binary: False
Package: pip
Supported remotes: hdfs, http, https
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('9p', 'D:\\')
Repo: dvc, git
Filesystem type (workspace): ('9p', 'D:\\')

dvc configs never changed, just defaults.

BTW, not sure if related, I'm in win10 + WSL 2 setup, where other dvc commands work just fine.

Additional Information:

$ dvc gc --all-commits --verbose
2020-07-01 14:35:59,016 DEBUG: '/mnt/d/git-project/intraday_model/.dvc/updater' is outdated(
2020-07-01 14:35:59,046 DEBUG: Trying to spawn '['/home/lxuwsl/miniconda3/bin/python', '/home/lxuwsl/miniconda3/bin/dvc', 'daemon', '-q', 'updater']'
2020-07-01 14:35:59,048 DEBUG: Spawned '['/home/lxuwsl/miniconda3/bin/python', '/home/lxuwsl/miniconda3/bin/dvc', 'daemon', '-q', 'updater']'
2020-07-01 14:35:59,049 WARNING: This will remove all cache except items used in the working tree and all git commits of the current repo.
Are you sure you want to proceed? [y/n] y
2020-07-01 14:36:17,890 DEBUG: PRAGMA user_version;
2020-07-01 14:36:17,891 DEBUG: fetched: [(3,)]
2020-07-01 14:36:17,891 DEBUG: CREATE TABLE IF NOT EXISTS state (inode INTEGER PRIMARY KEY, mtime TEXT NOT NULL, size TEXT NOT NULL, md5 TEXT NOT NULL, timestamp TEXT NOT NULL)
2020-07-01 14:36:17,892 DEBUG: CREATE TABLE IF NOT EXISTS state_info (count INTEGER)
2020-07-01 14:36:17,893 DEBUG: CREATE TABLE IF NOT EXISTS link_state (path TEXT PRIMARY KEY, inode INTEGER NOT NULL, mtime TEXT NOT NULL)
2020-07-01 14:36:17,894 DEBUG: INSERT OR IGNORE INTO state_info (count) SELECT 0 WHERE NOT EXISTS (SELECT * FROM state_info)
2020-07-01 14:36:17,895 DEBUG: PRAGMA user_version = 3;
2020-07-01 14:37:21,689 DEBUG: SELECT count from state_info WHERE rowid=?
2020-07-01 14:37:21,690 DEBUG: fetched: [(2929,)]
2020-07-01 14:37:21,690 DEBUG: UPDATE state_info SET count = ? WHERE rowid = ?
2020-07-01 14:37:21,742 ERROR: unexpected error
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/main.py", line 49, in main
    ret = cmd.run()
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/command/gc.py", line 50, in run
    self.repo.gc(
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/repo/__init__.py", line 30, in wrapper
    ret = f(repo, *args, **kwargs)
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/repo/gc.py", line 66, in gc
    repo.used_cache(
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/repo/__init__.py", line 291, in used_cache
    used_cache = stage.get_used_cache(
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/stage/__init__.py", line 761, in get_used_cache
    cache.update(out.get_used_cache(*args, **kwargs))
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/output/base.py", line 432, in get_used_cache
    if self.exists:
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/output/base.py", line 168, in exists
    return self.remote.exists(self.path_info)
  File "/home/lxuwsl/miniconda3/lib/python3.8/site-packages/dvc/remote/local.py", line 97, in exists
    assert is_working_tree(self.repo.tree)
AssertionError
------------------------------------------------------------

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
@ghost ghost added the triage Needs to be triaged label Jul 1, 2020
@skshetry
Copy link
Collaborator

skshetry commented Jul 1, 2020

Hi @WestXu. This has been fixed in >=1.0. Please upgrade using pip install --upgrade dvc.

Duplicate of #4062

Related: #3857 #3812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants