wireapp / wire-desktop

:computer: Wire for desktop
https://wire.com/download/
GNU General Public License v3.0
1.08k stars 236 forks source link

wire-desktop constantly writing to disk #2108

Closed WDGroll closed 5 years ago

WDGroll commented 5 years ago

Since the last wire-desktop update wire is constantly writing to disk, even when put into background.

Output from iotop -o --batch:

Total DISK READ :       0.00 B/s | Total DISK WRITE :      26.57 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:      75.92 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
  496 be/3 root        0.00 B/s    7.59 K/s  0.00 % 12.13 % [jbd2/sdb1-8]
 3659 be/4 wolf-die    0.00 B/s   11.39 K/s  0.00 %  0.08 % wire-desktop [TaskSchedulerFo]
 3661 be/4 wolf-die    0.00 B/s    7.59 K/s  0.00 %  0.05 % wire-desktop [TaskSchedulerFo]
Total DISK READ :       0.00 B/s | Total DISK WRITE :      15.12 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:      60.47 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
  496 be/3 root        0.00 B/s    0.00 B/s  0.00 % 12.27 % [jbd2/sdb1-8]
 3191 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.30 % [kworker/0:2]
 3661 be/4 wolf-die    0.00 B/s    7.56 K/s  0.00 %  0.05 % wire-desktop [TaskSchedulerFo]
 3659 be/4 wolf-die    0.00 B/s    7.56 K/s  0.00 %  0.05 % wire-desktop [TaskSchedulerFo]
Total DISK READ :       0.00 B/s | Total DISK WRITE :      15.12 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:      60.46 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
  496 be/3 root        0.00 B/s    0.00 B/s  0.00 % 11.13 % [jbd2/sdb1-8]
 3659 be/4 wolf-die    0.00 B/s   15.12 K/s  0.00 %  0.10 % wire-desktop [TaskSchedulerFo]

This did not happen with the preceding versions.

Wire version: 3.5.2881 / 2019.01.17.1508 Operating system: Debian GNU/Linux 9.6 Which antivirus software do you have installed: none

What steps will reproduce the problem?

  1. Just starting wire-desktop

What is the expected result? A calm and quiet wire window.

What is the actual result? Constantly working harddisk and flickering HDD-LED. Wire itself works as usual, but the periodic noise of the disk accesses is annoying.

Please provide any additional information below. Attach a screenshot if possible.

Fogelholk commented 5 years ago

Seems to have the same problem here since the last update, seeing the HDD-light flicker constantly so I checked iotop.

Total DISK READ :       0.00 B/s | Total DISK WRITE :     585.76 K/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:     573.96 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
13937 be/4 linus       0.00 B/s  141.53 K/s  0.00 %  3.48 % wire-desktop --hidden [TaskSchedulerFo]
 1497 be/4 linus       0.00 B/s  381.33 K/s  0.00 %  0.00 % firefox --sm-client-id 10e6da7269000153587494600000009530078 [DOM Worker]
15918 be/4 root        0.00 B/s   23.59 K/s  0.00 %  0.00 % [kworker/u8:2-events_unbound]
17802 be/4 root        0.00 B/s   39.31 K/s  0.00 %  0.00 % [kworker/u8:8-events_power_efficient]
Total DISK READ :       0.00 B/s | Total DISK WRITE :       5.10 M/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       7.39 M/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
13937 be/4 linus       0.00 B/s  140.97 K/s  0.00 %  2.86 % wire-desktop --hidden [TaskSchedulerFo]
  352 be/4 root        0.00 B/s    4.83 M/s  0.00 %  0.75 % [btrfs-transacti]
  302 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.50 % [dmcrypt_write/2]
17802 be/4 root        0.00 B/s   23.50 K/s  0.00 %  0.36 % [kworker/u8:8-i915]
 1203 be/4 linus       0.00 B/s   31.33 K/s  0.00 %  0.00 % firefox --sm-client-id 10e6da7269000153587494600000009530078 [Cache2 I/O]
13247 be/4 root        0.00 B/s   39.16 K/s  0.00 %  0.00 % [kworker/u8:3-events_power_efficient]
15918 be/4 root        0.00 B/s   15.66 K/s  0.00 %  0.00 % [kworker/u8:2-btrfs-endio-write]
16327 be/4 root        0.00 B/s   15.66 K/s  0.00 %  0.00 % [kworker/u8:6-btrfs-endio-write]

Wire version: 3.4.2879 / 2019.01.17.1508 Operating system: Arch Linux 4.20.0-arch1-1-ARCH Which antivirus software do you have installed: none

cgibbard commented 5 years ago

I also have this issue -- messed around with iotop and lsof a bunch to try to work out what it's doing, but haven't managed to figure out a whole lot yet. It's really getting quite annoying -- sort of the Chinese water torture of software bugs as my disk clicks about twice a second continuously with the Wire client running.

I'm running 3.5.2881/2019.01.17.1508 on Linux Mint 19.1

bbunk commented 5 years ago

I see the same disk activity. Ubuntu-18.04.1 LTS with gnome-shell desktop wire-3.5.2881

downgraded to wire-3.4.2879 wire-3.3.2872 => same behavior

On my netbook: Ubuntu-14.04.5 LTS with unity desktop wire-3.5.2881 => same behavior

The latest version of wire is NOT to blame, IMHO. Ubuntu release + desktop don't appear to be responsible either. Whatever triggered the problem recently, any ideas?

I started wire-desktop with strace: strace wire-desktop 2>/tmp/strace.out strace -f wire-desktop 2>/tmp/strace-f.out As usual, this produces a huge amount of output (too much to be posted). I don't understand the details, maybe someone familiar with the source has a clue.

Tuj3Bz90dV commented 5 years ago

I have noticed the same issue. strace indicates that most of the writes that don't go to pipes are of the form

write(181<~/.config/Wire/IndexedDB/https_app.wire.com_0.indexeddb.leveldb/000351.log>, "...", 7) = 7
write(181<~/.config/Wire/IndexedDB/https_app.wire.com_0.indexeddb.leveldb/000351.log>, "...", 313) = 313
fdatasync(181<~/.config/Wire/IndexedDB/https_app.wire.com_0.indexeddb.leveldb/000351.log>) = 0
Tuj3Bz90dV commented 5 years ago

The contents of the log file itself seem to be entirely comprised of

0006d5d0  28 40 62 ae cc 0a ff 12  ff 0d 6f 22 0a 6d 79 52  |(@b.......o".myR|
0006d5e0  65 76 69 73 69 6f 6e 49  88 15 22 04 74 79 70 65  |evisionI..".type|
0006d5f0  22 05 6c 6f 63 61 6c 22  0d 6c 61 73 74 48 65 61  |".local".lastHea|
0006d600  72 74 42 65 61 74 4e 00  00 1e 62 e5 86 76 42 22  |rtBeatN...b..vB"|
0006d610  0f 64 65 6c 65 74 65 54  69 6d 65 53 74 61 6d 70  |.deleteTimeStamp|
0006d620  30 22 08 69 73 4d 61 73  74 65 72 49 02 22 02 69  |0".isMasterI.".i|
0006d630  64 49 18 7b 06 01 0d 00  01 0b 02 03 00 00 00 00  |dI.{............|

which I gather to be a SyncNode from Dexie. I don't understand how this relates to Wire.

ffflorian commented 5 years ago

Hi, this might be due to some changes we did to the internal handling of the IndexedDB through Dexie. We are investigating.

atomrc commented 5 years ago

Nice catch @WDGroll and @Tuj3Bz90dV ! There, indeed, seems to be that kind of issue with Dexie Observables. https://github.com/dfahlander/Dexie.js/issues/598

Since we don't really need the tab syncing feature, we will consider rolling back to using dexie's raw CRUD hooks a soon as possible.

Thanks again for the report.