Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync gets stuck at procFiles #132

Closed
Saduff opened this issue Oct 19, 2022 · 6 comments
Closed

Sync gets stuck at procFiles #132

Saduff opened this issue Oct 19, 2022 · 6 comments

Comments

@Saduff
Copy link

Saduff commented Oct 19, 2022

Hi, first of all, thank you very much for this essential plugin! 馃檪

Since version 0.15.6 of the plugin, syncing gets stuck at procFiles like this:
procFiles

I have to close Obsidian and reopen it for the sync to complete successfully. Downgrading to 0.15.5 fixes the issue. I didn't see anything useful in the logs.

@vrtmrz
Copy link
Owner

vrtmrz commented Oct 19, 2022

Thank you for asking me!
May I ask exact versions of plug-ins (I'm guessing 0.15.10 and 0.16.0) and Obsidian's debug information?
You can copy it from the Debug info dialogue. And it can be shown from the command palette by Show debug info command.

And If you are synchronising hidden files, please try disabling Monitor changes to internal files. this is the primal difference between v0.15 and v0.16.

@Saduff
Copy link
Author

Saduff commented Oct 19, 2022

Ah, sorry, I messed up the version numbers in the first post late last night. Fixed it now.

Here's Obsidian's debug info:

SYSTEM INFO:
	Obsidian version: v1.0.0
	Installer version: v1.0.0
	Operating system: #1 SMP PREEMPT_DYNAMIC Thu, 13 Oct 2022 18:58:49 +0000 6.0.1-arch2-1
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 7
	Plugins enabled: 7
		1: Self-hosted LiveSync v0.15.5
		2: Style Settings v0.4.12
		3: CodeMirror Options v0.9.5
		4: Advanced Tables v0.17.3
		5: Excalidraw v1.7.25
		6: Paste URL into selection v1.7.0
		7: Advanced Slides v1.18.1

I currently have version 0.15.5 of the plugin installed, because that's the last working version for me. Starting from version 0.15.6 and above, syncing gets stuck at procFiles (which seems to have been introduced in version 0.15.6?).

@vrtmrz
Copy link
Owner

vrtmrz commented Oct 20, 2022

Thank you for the detailed information! And sorry for misguessing versions.

The big difference between 0.15.5 and 0.15.6 is this -- The file processing method has been improved changed. Thank you for your investigation!
Since the version, the plugin will process files one by one following changes on the storage. but I'm wondering what and why has stuck while processing.

May I ask you the following questions?

  • Always is the same file getting stuck?
  • What operation makes this circumstance?
  • Are you enabling Verbose Log? If you do not, please enable it once.
  • Is something shown in the DevTools? You can open DevTools by Ctrl+Shift+i.
    • There is a known-bug that keeps showing old status at these versions. Could you please try pasting and running this script app.plugins.plugins["obsidian-livesync"].refreshStatusText(); on the DevTools? If it disappears, it is simply a display problem. it has been fixed at v0.16.1

@Saduff
Copy link
Author

Saduff commented Oct 21, 2022

Always is the same file getting stuck?

No, doesn't matter which file I change.

What operation makes this circumstance?

I only have "Sync on Save" and "Sync on Start" turned on, so this happens when I save the modified file and sync begins.

"Verbose Log" was disabled. Enabled it now, but don't see anything new. Only see this in the log:

Content saved:Todo.md ,pieces:33 (new:0, skip:33, cache:0)
DB <- STORAGE (plain) Todo.md

After restarting Obsidian, so it syncs on start, these are the last lines in the log:

UPDATE STORAGE done.
CHECK FILE STATUS:35/135
CHECK FILE STATUS:35/135 exec.
STORAGE -> DB :Todo.md
1666329427 > 1666329001
CHECK FILE STATUS:35/135 : 50/100
Content saved:Todo.md ,pieces:32 (new:0, skip:32, cache:0)
DB <- STORAGE (plain) Todo.md
CHECK FILE STATUS:35/135 : 100/100
CHECK FILE STATUS:35/135 done.
CHECK FILE STATUS:0/135
CHECK FILE STATUS:0/135 exec.
CHECK FILE STATUS:0/135 done.
Initialized, NOW TRACKING!
Replication closed
Oneshot Sync begin... (sync)
Replication activated
replication paused
Replication completed

Don't see anything interesting in the DevTools console, just the same log entries. I updated to the latest 0.16.1 for these tests, so it shouldn't be the display issue. Running the refreshStatusText() doesn't change anything.

Also, for some reason, the hourglass icon shows 2 even though I only changed one file. Not sure if that's normal behavior.

@vrtmrz
Copy link
Owner

vrtmrz commented Oct 21, 2022

@Saduff
Thank you for the detailed information! (I am also thinking that perhaps we need configuration reporting tools)

And from your information, I noticed this behaviour.
If Sync on save is enabled, saving files raises replication while in procFiles. but replication tries flushing the queue of batch saving.
And flushing is processed by procFiles. so it will wait until it's been unlocked. It had been deadlocked.

It has been fixed at v0.16.2.

I would like to thank you again for the accurate and informative investigation!

@Saduff
Copy link
Author

Saduff commented Oct 21, 2022

I confirm the issue is fixed with v0.16.2. Thanks for the quick fix! 馃檪

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

No branches or pull requests

2 participants