keybase / keybase/client

Keybase CLI fails to write to disk after disk-full and online resizing

Open
#8,847 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

After filesystem to which Keybase attempts to write fills and online resizing is performed to increase available space, Keybase CLI fails as if filesystem remains full. Quitting from GUI, then restarting it, then reattempting results in success.

For example, several days after the applicable filesystem became full or nearly so, then was expanded (btrfs device add --force /dev/sda9 / && btrfs filesystem balance /), this occurred:

$  keybase follow somecontact
▶ WARNING Cannot put resolve result to disk: write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device [tags:ID2=QFPbHJjYUDF5]
▶ ERROR Cannot commit Merkle root to local DB: write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device
▶ WARNING Error in writing UPAK for 0a28b6fc46b7f261d3f70d553676b219: write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device [tags:LU=dkSpXL1WRzQC,ID2=cmiLLhuQEmuD]
▶ WARNING Failed to remove 0a28b6fc46b7f261d3f70d553676b219 v1 object from disk cache: write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device
▶ ERROR Cannot commit Merkle root to local DB: write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device
▶ ERROR write /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log: no space left on device
$ df -h /home
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       250G  202G   48G  81% /home
$ ll /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log
-rw-r--r-- 1 pmocek pmocek 2943296 Sep 27 07:36 /home/pmocek/.local/share/keybase/keybase.leveldb/000707.log
$ df -h /home/pmocek/.local/share/keybase/keybase.leveldb
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       250G  202G   48G  81% /home
$ touch  /home/pmocek/.local/share/keybase/keybase.leveldb/pmocek-test
$ echo foo >> /home/pmocek/.local/share/keybase/keybase.leveldb/pmocek-test
$ ll /home/pmocek/.local/share/keybase/keybase.leveldb/pmocek-test
-rw-rw-r-- 1 pmocek pmocek 4 Oct  5 09:33 /home/pmocek/.local/share/keybase/keybase.leveldb/pmocek-test
$ mount | grep home
/dev/sda5 on /home type btrfs (rw,noatime,ssd,space_cache,subvolid=258,subvol=/@home)
$ uname -a
Linux 12zmyv1 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ btrfs --version
btrfs-progs v4.4

Restarted GUI, then:

$ keybase follow somecontact
▶ INFO Identifying somecontact
✔ "somecontact" on twitter: https://twitter.com/somecontact/status/000000000000000000
Is this the somecontact you wanted? [Y/n] 
Publicly follow? [Y/n] 

Keybase GUI Version: 1.0.29-20170818161957+4d0259c85

my log id: 62a96302e14550dbb8a45b1c

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Keybase CLI path for keybase follow somecontact and the service's handling of writes to ~/.local/share/keybase/keybase.leveldb/, then investigate how an earlier no-space error persists after the Btrfs filesystem is expanded. Reproduce the sequence from the issue and verify that the command succeeds without restarting the GUI.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.