Opened on 04/20/2014 at 04:03:52 PM
Closed on 04/29/2014 at 09:11:40 AM
Last modified on 05/02/2014 at 05:36:38 AM
#361 closed defect (fixed)
chrome: settings lost if browser crashes
Reported by: | pbosakov | Assignee: | |
---|---|---|---|
Priority: | P2 | Milestone: | Adblock-Plus-1.8-for-Chrome-Opera-Safari |
Module: | Platform | Keywords: | |
Cc: | smultron45@gmail.com, trev, greiner | Blocked By: | |
Blocking: | Platform: | ||
Ready: | no | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Environment
Windows XP SP2
Chrome 34.0.1847.116 m
Adblock Plus 1.7.4
Bulgarian list+EasyList
How to reproduce
- Run Chrome on a PC with a limited amount of RAM and no swap file
- Use Chrome until it crashes due to low memory (e.g. opening too many tabs)
- Restart Chrome
Observed behaviour
Adblock Plus settings (filter subscription, etc.) lost
Expected behaviour
Adblock Plus should retain its settings after a browser crash, like all other Chrome add-ons do.
Attachments (0)
Change History (12)
comment:1 Changed on 04/20/2014 at 04:42:33 PM by mapx
- Cc smultron45@gmail.com added
comment:2 Changed on 04/21/2014 at 07:45:37 AM by mapx
- Priority changed from Unknown to P2
comment:3 Changed on 04/21/2014 at 07:46:24 AM by mapx
- Summary changed from settings lost if browser crashes to chrome: settings lost if browser crashes
comment:4 Changed on 04/22/2014 at 05:49:11 AM by trev
- Cc trev greiner added
comment:5 follow-up: ↓ 6 Changed on 04/23/2014 at 04:21:21 PM by greiner
- Resolution set to worksforme
- Status changed from new to closed
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 8 Changed on 04/23/2014 at 06:33:52 PM by trev
Replying to greiner:
@pbosakov Have you checked whether Adblock Plus was the only extension that loses its settings? If yes, could you please list your extensions and indicate which of those (if any) suffer from the same issue?
That's unlikely - not too many extensions use the FileSystem API, and localeStorage probably isn't affected.
Did you try crashing (killing?) Chrome after changes like subscription update or disabling a subscription?
comment:7 Changed on 04/23/2014 at 07:59:42 PM by pbosakov
Thanks, now I notice that indeed it does not happen every time. Apparently there are other factors involved. I will let you know if I find a sure way to reproduce the issue.
comment:8 in reply to: ↑ 6 Changed on 04/25/2014 at 09:52:39 AM by greiner
- Component changed from Unknown to Platform
- Resolution worksforme deleted
- Status changed from closed to reopened
Replying to trev:
Did you try crashing (killing?) Chrome after changes like subscription update or disabling a subscription?
With only a few MB left in RAM and toggling a subscription repeatedly off and on the extension eventually crashes (not necessarily the whole browser) and on restart all filterlists are gone while other settings (those stored via localStorage) are still there.
In my tests I was able to reproduce this behavior on each try and therefore I reopen this issue and continue my investigation based on that.
comment:9 Changed on 04/28/2014 at 08:58:55 PM by greiner
- Review URL(s) modified (diff)
- Status changed from reopened to reviewing
comment:10 Changed on 04/29/2014 at 09:11:40 AM by trev
- Resolution set to fixed
- Status changed from reviewing to closed
Should hopefully be fixed: https://hg.adblockplus.org/adblockpluschrome/rev/d8e418ee860c
comment:11 Changed on 04/29/2014 at 09:22:46 AM by trev
For reference, the analysis performed by greiner indicated that truncating a file makes Chrome write all pending changes to disk whereas an actual write operation keeps the data in cache and only writes it to disk at some later point. Our code overwriting a file was originally calling truncate(0) and writing the data then - a crash after the write operation would cause the cache with the file data to be lost and the file would stay at zero size. The new code is writing the data first and only truncating the file after that, it no longer seems to suffer from this issue.
comment:12 Changed on 05/02/2014 at 05:36:38 AM by trev
- Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
I tested different kinds of low-memory scenarios but couldn't reproduce this issue. For instance with the following test setup I was able to crash Chrome and Adblock Plus but the settings were always left intact.
256MB RAM (no paging file)
Windows XP SP3
Chrome 34.0.1847.116 m
Adblock Plus 1.7.4
@pbosakov Have you checked whether Adblock Plus was the only extension that loses its settings? If yes, could you please list your extensions and indicate which of those (if any) suffer from the same issue?