[GH-ISSUE #261] potential out-of-memory crash #250

Closed
opened 2026-02-25 22:36:36 +03:00 by kerem · 11 comments
Owner

Originally created by @SteveKeller on GitHub (Apr 9, 2019).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/261

Software versions

  • Browser: Chromium Version 75.0.3743.0
  • Nextcloud: 15.0.5
  • Nextcloud Bookmarks app: -
  • Floccus: 3.2.16
  • Floccus sync method: XBEL/webdav

Steps to reproduce

  1. Create a nextcloud account
  2. Config Floccus with nextcloud account and webdav (just one chromium browser)
  3. Perform a sync
  4. After successful sync, lock file wasn't deleted -> sometimes only

Expected outcome

Lock file should be deleted after successful sync.

Actual outcome

Lock file still exists and has to be deleted manual, before new sync can success.

Debug log

fullURL :https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel:
Successfully ended sync process for account bookmarks@nextcloud.mydomain.com
Starting sync process for account bookmarks@nextcloud.mydomain.com
onSyncStart: begin
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock
Syncing failed with Lock Error: Unable to clear lock file, consider deleting bookmarks.xbel.lock
onSyncFail

  • Debug log provided

I have tested my credentials (basic auth) manual -> ok (HTTP DELETE request of lock file)
When sync fails the floccus plugin crashes.
This error only occurs sometimes. After closing the browser and reopen it works again.

Thanks for your input and help!

Originally created by @SteveKeller on GitHub (Apr 9, 2019). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/261 ### Software versions - Browser: Chromium Version 75.0.3743.0 - Nextcloud: 15.0.5 - Nextcloud Bookmarks app: - - Floccus: 3.2.16 - Floccus sync method: XBEL/webdav ### Steps to reproduce 1. Create a nextcloud account 2. Config Floccus with nextcloud account and webdav (just one chromium browser) 3. Perform a sync 4. After successful sync, lock file wasn't deleted -> sometimes only ### Expected outcome Lock file should be deleted after successful sync. ### Actual outcome Lock file still exists and has to be deleted manual, before new sync can success. ### Debug log fullURL :https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel: Successfully ended sync process for account bookmarks@nextcloud.mydomain.com Starting sync process for account bookmarks@nextcloud.mydomain.com onSyncStart: begin https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock https://nextcloud.mydomain.com/remote.php/webdav/bookmarks.xbel.lock Syncing failed with Lock Error: Unable to clear lock file, consider deleting bookmarks.xbel.lock onSyncFail - [x] Debug log provided I have tested my credentials (basic auth) manual -> ok (HTTP DELETE request of lock file) When sync fails the floccus plugin crashes. This error only occurs sometimes. After closing the browser and reopen it works again. Thanks for your input and help!
kerem closed this issue 2026-02-25 22:36:36 +03:00
Author
Owner

@marcelklehr commented on GitHub (Apr 9, 2019):

When sync fails the floccus plugin crashes.

Is this always the case, when sync fails? Is there any error message?

At first glance, my diagnosis would be: The crashes (although undesired) explain the lock file not being deleted, but you describe the lock file being present despite a successful sync run... :/

<!-- gh-comment-id:481473442 --> @marcelklehr commented on GitHub (Apr 9, 2019): > When sync fails the floccus plugin crashes. Is this always the case, when sync fails? Is there any error message? At first glance, my diagnosis would be: The crashes (although undesired) explain the lock file not being deleted, but you describe the lock file being present despite a successful sync run... :/
Author
Owner

@SteveKeller commented on GitHub (Apr 10, 2019):

Yes, it always the case when sync fails. -> it crashes
Only the error message in the log file as provided.

I have checked your diagnosis and it correct. After sync fails and the crash occurs, than the lock file still exists.
But when I delete the lock file manual and reload floccus and trigger syncing , it crashes immediatly again with the same error messages. It doesn't make any difference if the lock file exists or not.

So as you have guessed the real problem is the crash and not the deletion of the lock file.

<!-- gh-comment-id:481574286 --> @SteveKeller commented on GitHub (Apr 10, 2019): Yes, it always the case when sync fails. -> it crashes Only the error message in the log file as provided. I have checked your diagnosis and it correct. After sync fails and the crash occurs, than the lock file still exists. But when I delete the lock file manual and reload floccus and trigger syncing , it crashes immediatly again with the same error messages. It doesn't make any difference if the lock file exists or not. So as you have guessed the real problem is the crash and not the deletion of the lock file.
Author
Owner

@marcelklehr commented on GitHub (Apr 10, 2019):

But when I delete the lock file manual and reload floccus and trigger syncing , it crashes immediatly again with the same error messages.

So, when you delete the lock file manually, sync fails nonetheless with the error "Unable to clear lock file" and it crashes?

<!-- gh-comment-id:481661328 --> @marcelklehr commented on GitHub (Apr 10, 2019): > But when I delete the lock file manual and reload floccus and trigger syncing , it crashes immediatly again with the same error messages. So, when you delete the lock file manually, sync fails nonetheless with the error "Unable to clear lock file" and it crashes?
Author
Owner

@SteveKeller commented on GitHub (Apr 10, 2019):

Yes, exactly.

<!-- gh-comment-id:481714947 --> @SteveKeller commented on GitHub (Apr 10, 2019): Yes, exactly.
Author
Owner

@marcelklehr commented on GitHub (Apr 12, 2019):

Unfortunately I cannot replicate this. To get further debug information please do the following:

Firefox

  • Go to about:debugging
  • enable debugging
  • click on debug button next to floccus entry
  • go to floccus options and make sure the account of your choice is connected
  • trigger a sync by clicking on sync now for the account of your choice.
  • go back to the inspector window and check the logs after waiting for the sync to finish

Chrome

  • Go to chrome://extensions
  • enable Developer mode
  • click on dist/html/background.html button in floccus' entry next to "Inspect views: "
  • go to floccus options and make sure the account of your choice is connected
  • trigger a sync by clicking on sync now for the account of your choice
  • go back to the inspector window and check the logs after waiting for the sync to finish
<!-- gh-comment-id:482636231 --> @marcelklehr commented on GitHub (Apr 12, 2019): Unfortunately I cannot replicate this. To get further debug information please do the following: #### Firefox * Go to `about:debugging` * enable debugging * click on `debug` button next to floccus entry * go to floccus options and make sure the account of your choice is connected * trigger a sync by clicking on `sync now` for the account of your choice. * go back to the inspector window and check the logs after waiting for the sync to finish #### Chrome * Go to `chrome://extensions` * enable `Developer mode` * click on `dist/html/background.html` button in floccus' entry next to "Inspect views: " * go to floccus options and make sure the account of your choice is connected * trigger a sync by clicking on `sync now` for the account of your choice * go back to the inspector window and check the logs after waiting for the sync to finish
Author
Owner

@SteveKeller commented on GitHub (Apr 14, 2019):

Great guide to debug, thanks!

It turned out that floccus crashs because of a potential out-of-memory crash in chromium.

The exact location which cause the problem is in
dist/js/node_modules/conservative-normalize-url/index.js Line: 208

The parsing of one special url did not work because it's to long and this cause out-of-memory.
So I have investigated in the special url.
While parsing it the url looks like this:
'################################..........#######/login?type=samlsso_notification.do?client_id=..........'
-> way to many hash signs!

I think something went wrong while syncing/converting from browser to nextcloud file.
Real problem url looks like:
https://my.domain.com/#/login?type=samlsso_notification.do?client_id=.....
-> hashes went crazy

Another indication for out-of-memory is the file size of bookmarks.xbel!
I have about 700 bookmarks and my .xbel file size was about 64MB
-> probably due to the special url.

My Solution:

  1. Backup your bookmarks
  2. Delete lock and booksmark.xbel file on nextcloud
  3. Check if special url doesn't exists in bookmarks on chromium browser
  4. Sync Floccus with option "Trigger sync from scratch"
  5. Check file size of bookmarks.xbel -> now 75KB
  6. Works again! :D
<!-- gh-comment-id:482963716 --> @SteveKeller commented on GitHub (Apr 14, 2019): Great guide to debug, thanks! It turned out that floccus crashs because of a **potential out-of-memory crash** in chromium. The exact location which cause the problem is in dist/js/node_modules/conservative-normalize-url/index.js Line: 208 The parsing of one special url did not work because it's to long and this cause out-of-memory. So I have investigated in the special url. While parsing it the url looks like this: `'################################..........#######/login?type=samlsso_notification.do?client_id=..........' ` -> way to many hash signs! I think something went wrong while syncing/converting from browser to nextcloud file. Real problem url looks like: `https://my.domain.com/#/login?type=samlsso_notification.do?client_id=.....` -> hashes went crazy **Another indication for out-of-memory is the file size of bookmarks.xbel!** I have about 700 bookmarks and my .xbel file size was about 64MB -> probably due to the special url. ### My Solution: 1. Backup your bookmarks 2. Delete lock and booksmark.xbel file on nextcloud 3. Check if special url doesn't exists in bookmarks on chromium browser 4. Sync Floccus with option "Trigger sync from scratch" 5. Check file size of bookmarks.xbel -> now 75KB 6. Works again! :D
Author
Owner

@marcelklehr commented on GitHub (Apr 14, 2019):

Ah, yes. There was a bug that caused hash-signs to double on every sync recently. This is fixed now, so it shouldn't come up again.

<!-- gh-comment-id:482968358 --> @marcelklehr commented on GitHub (Apr 14, 2019): Ah, yes. There was a bug that caused hash-signs to double on every sync recently. This is fixed now, so it shouldn't come up again.
Author
Owner

@SteveKeller commented on GitHub (Apr 14, 2019):

Great to hear that!

Will the next release contain this bugfix?

<!-- gh-comment-id:482969199 --> @SteveKeller commented on GitHub (Apr 14, 2019): Great to hear that! Will the next release contain this bugfix?
Author
Owner

@marcelklehr commented on GitHub (Apr 14, 2019):

This was fixed with v3.2.15 which was released 8 days ago :)

Edit: I'm not sure why you hit the bug after this.

<!-- gh-comment-id:482970345 --> @marcelklehr commented on GitHub (Apr 14, 2019): This was fixed with [v3.2.15](https://github.com/marcelklehr/floccus/blob/develop/CHANGELOG.md#v3215) which was released 8 days ago :) Edit: I'm not sure why you hit the bug after this.
Author
Owner

@SteveKeller commented on GitHub (Apr 14, 2019):

Okey, interessing. I don't know either.
Anyway, now it works as expected :)

<!-- gh-comment-id:482977779 --> @SteveKeller commented on GitHub (Apr 14, 2019): Okey, interessing. I don't know either. Anyway, now it works as expected :)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 21, 2023):

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:1477489878 --> @github-actions[bot] commented on GitHub (Mar 21, 2023): This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#250
No description provided.