Closed Bug 670064 Opened 13 years ago Closed 13 years ago

Repeated (but brief) lock-ups when Firefox Sync is enabled

Categories

(Firefox :: Sync, defect)

All
Other
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cheery.egg6079, Unassigned)

Details

(Whiteboard: [sync-places-hang?])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110615151330 Steps to reproduce: (Not sure if i've selected the right component, sorry if not.) Ever since i enabled Firefox Sync in FF4 i have been experiencing frequent and repeated lock-ups on my Windows 7 netbook. These lock-ups occur maybe once every 5 to 10 minutes, and typically last about 60 seconds (sometimes more). During this time i note that the Task Manager shows Firefox at 50% CPU (although it seems to have rather high CPU usage anyway), and if i try to click something the title bar will show 'Not Responding'. No other applications are affected, and when the lock-up stops everything goes back to normal (for a while). The lock-ups do not occur on my Mac or the four Windows XP-based machines i use Sync on at work -- they only happen on my netbook. (Therefore it is possible that the problem is at least partially related to the netbook's lower specs, but i was able to use Xmarks for 2 or 3 years and had no problems with that, so i would be surprised if Sync inherently requires much better hardware...) In order to troubleshoot this i've done the following: 1. Tried disabling all extensions and plug-ins via the Add-ons tab -- No change. 2. Tried running in Safe Mode specifically -- No change. 3. Tried creating a new profile -- I used the new profile for a few days with no lock-ups. Then i installed one extension and used it a few more days, still no lock-ups. Then i turned Sync on, and the lock-ups returned. 4. Tried creating a new profile again -- Same results as above. As soon as Sync is enabled, the lock-ups start up again. Another thing i've noted is that even if i DISABLE Sync, the lock-ups continue. On one of the profiles i tested, i tried unticking all of the options in the Sync preferences pane (History, Passwords, &c.) and then working for a while with that, but the problem persisted. On the two other profiles, i tried doing 'Deactivate this device', but again the problem persisted. So to my untrained eyes it sort of seems like Sync somehow 'taints' my Firefox profile irreparably once it's turned on. I also tried enabling the Sync log, and the only thing i noticed with that is that it seems extremely slow. After watching it for 16 minutes it finally got to a point where it said that it was synching '100 - 200 out of 5000 records', which suggests to me that maybe the past 16 minutes had been spent on 1 to 99? Of course i may be misreading it Lastly, i have posted about this problem on MozillaZine also; i'm not sure if it's helpful, but here's the link: http://forums.mozillazine.org/viewtopic.php?f=38&t=2242391 Actual results: 1. Enable Firefox Sync. 2. Repeated lock-ups. Expected results: 1. Enable Firefox Sync. 2. No lock-ups!
(In reply to comment #0) > Ever since i enabled Firefox Sync in FF4 i have been experiencing frequent > and repeated lock-ups on my Windows 7 netbook. These lock-ups occur maybe > once every 5 to 10 minutes... Sync performs some operations during syncing that will block the main thread of Firefox. A lot of work for Firefox 4 went into reducing the frequency and duration of those blocks; still more went into Firefox 5, so I would certainly suggest you upgrade if you can. Firefox 4 is now considered old. It's possible that your netbook has sufficiently slow I/O to make some of these operations take an extraordinarily long time, but given that we test Sync on Android phones, that seems unlikely. > The lock-ups do not occur on my Mac or the four Windows XP-based machines i > use Sync on at work -- they only happen on my netbook. (Therefore it is > possible that the problem is at least partially related to the netbook's > lower specs, but i was able to use Xmarks for 2 or 3 years and had no > problems with that, so i would be surprised if Sync inherently requires much > better hardware...) Sync does some stuff that Xmarks doesn't, so they're not directly comparable, but your experience certainly isn't the norm. > Another thing i've noted is that even if i DISABLE Sync, the lock-ups > continue. On one of the profiles i tested, i tried unticking all of the > options in the Sync preferences pane (History, Passwords, &c.) and then > working for a while with that, but the problem persisted. That will still perform some operations on a sync (e.g., downloading client records, checking server collections), so it's not a full disabling. > On the two other > profiles, i tried doing 'Deactivate this device', but again the problem > persisted. That's unexpected. Once you deactivate the device and restart Firefox, Sync code simply doesn't run at all. Did you restart? > I also tried enabling the Sync log, and the only thing i noticed with that > is that it seems extremely slow. That sounds like I/O might be your problem. Sync logging is disabled by default precisely to avoid the I/O overhead of writing all of those log statements. What are the specs of your netbook? > After watching it for 16 minutes it finally > got to a point where it said that it was synching '100 - 200 out of 5000 > records', which suggests to me that maybe the past 16 minutes had been spent > on 1 to 99? Of course i may be misreading it This sounds like a first sync of a large history profile. If this never finished, it would certainly explain your slowness on every sync -- if you never got past the first big download, then Sync will keep trying every time. It's possible that the netbook is just so slow that something times out. Please attach the Sync log to this bug. It's the only thing that will tell us accurately what's happening. Thanks!
Thanks for replying so quickly! > A lot of work for Firefox 4 went into reducing the frequency and duration > of those blocks; still more went into Firefox 5, so I would certainly > suggest you upgrade if you can. Firefox 4 is now considered old. Sorry, i should have been more clear. I am using Firefox 5 on all of the machines i mentioned. I just meant that the problem had started when i was on FF4. > Did you restart? I thought i did, and i've tested it again just now, and the lock-ups do persist. It is possible that they are less frequent (i am not a good judge of time so i may be imagining that), but they definitely still occur. > What are the specs of your netbook? HP Mini 210 HD Windows 7 Ultimate (32-bit) Intel Atom N450 @ 1.66 GHz 1 GB installed RAM Intel GMA 3150 > Please attach the Sync log to this bug. It's the only thing that will > tell us accurately what's happening. Could you let me know specifically which options i should enable in about:config? When i tried it before i was going off a bunch of random Google results, so i probably didn't know what i was doing. :/ PS: I'm not sure if it matters, but maybe i should have mentioned this before. The options i have enabled on all of these machines are Bookmarks, Passwords, and History. Tabs and Preferences are disabled. Also, when i click on 'View Quota' in the Sync preference pane it gives me this: Bookmarks 258 kB History 5.6 MB Passwords 154 kB 5.6 MB seems like it might be a large amount, but since Firefox gives me no context for what my quota is i can't tell. (When i search for '.' in the History/Library window and Select All it tells me that i have 12'814 items, if that is any indication.)
(In reply to comment #2) > Sorry, i should have been more clear. I am using Firefox 5 on all of the > machines i mentioned. I just meant that the problem had started when i was > on FF4. OK, thanks. > I thought i did, and i've tested it again just now, and the lock-ups do > persist. It is possible that they are less frequent (i am not a good judge > of time so i may be imagining that), but they definitely still occur. So you deactivate Sync, you see "Set Up Sync" in the Windows equivalent of the Tools menu, but you get stalls every 5 minutes? Very curious. > HP Mini 210 HD > Windows 7 Ultimate (32-bit) > Intel Atom N450 @ 1.66 GHz > 1 GB installed RAM > Intel GMA 3150 Yeah, that's anemic for running Windows, let alone Firefox with a large set of Sync data (I know you have 5,000 history records, for example). 1GB is the box-spec bare minimum amount of RAM for Win 7. It's possible you're just causing the machine to swap heavily (on a 5400rpm netbook disk). What does Task Manager show for memory and swap activity while Firefox is running and syncing? > Could you let me know specifically which options i should enable in > about:config? When i tried it before i was going off a bunch of random > Google results, so i probably didn't know what i was doing. :/ Try this: https://philikon.wordpress.com/2011/06/13/how-to-file-a-good-sync-bug/ > Bookmarks 258 kB > History 5.6 MB > Passwords 154 kB About the same as me, so probably ~150 bookmarks, 5k history items. > 5.6 MB seems like it might be a large amount, but since Firefox gives me no > context for what my quota is i can't tell. (When i search for '.' in the > History/Library window and Select All it tells me that i have 12'814 items, > if that is any indication.) Only 5,000 will be live on the server, but that's a sizable history :D
Attached file full synch log (first time) (deleted) —
Attached file delta synch log (second time) (deleted) —
Well... i hesitate to say this, because it seems absurd, but as soon as i enabled the debug log, the problem seems to have disappeared. I've been using it for almost 5 hours now and i've encountered no further lock-ups. I don't know how to explain that. :( Just in case, i have attached two synch logs: The first one is the complete log associated with my first synch (when i enabled Sync and told it to replace all of the local data). I X'ed out all of the URLs and things, hope that's OK. The second one is a 'delta' sync (or whatever the term is), which i just did a few minutes ago. Both seem to have completed OK. I think what i'll do is create ANOTHER profile and do some more testing. Will reply again maybe tomorrow or this week end....
(In reply to comment #6) > Well... i hesitate to say this, because it seems absurd, but as soon as i > enabled the debug log, the problem seems to have disappeared. I've been > using it for almost 5 hours now and i've encountered no further lock-ups. I > don't know how to explain that. :( The log shows that Sync finished after 7 or 8 minutes. After that there's negligible data to exchange, so the second sync is uneventful. I doubt it's anything to do with the debug logging, of course. Without the old logs it's hard to tell what happened. > I think what i'll do is create ANOTHER profile and do some more testing. > Will reply again maybe tomorrow or this week end.... That would be great, thank you.
Hi again, sorry for taking a while. The 'good' news, i guess, is that the problem did return the day after i last posted. Since the problem seemed to re-appear only after some time had passed, i considered that possibly that was part of the equation. So i created a new profile, did NOT set up Sync on it, and have been using it ever since. However, the problem has not re-occurred. So it definitely seems to confirm a pattern related to Sync, so far at least. The bad news is that i was not able to obtain any more conclusive information. During the day or so that i continued using my old profile (the one where the problem disappeared and then re-appeared again), i encountered several lock-ups, and i made sure to note the time and any associated sync-log entries for those two. However, both times the lock-ups occurred, the sync-log was silent. The two occasions i recorded where a lock-up occurred were at 1310162486 and 1310168626 (UNIX time obv). However, the most recent sync-log activities for those times were 1310160204474 and 1310167410566, respectively. (38- and 20-minute differences.) I'm attaching both of those logs now, in case you can make use of them, but to me they look like they completed normally. :/
Something has occurred which might possibly help track this down. I noticed today that i was starting to have the same trouble on my work computer (a full desk-top running Windows XP), which is not something i've experienced before. The lock-ups occur mostly the same as on the netbook -- 50% CPU usage, 'Not Responding' in title bar, goes back to normal within a minute or two. A new thing i have noticed, though, is that if i click on the History or Bookmarks menu at the top (since i am using XP on here i can see those by default), the browser becomes unrecoverably locked up -- it will just sit there using up 50% CPU for ever until i shut it down. That leads me to believe that maybe the problem is not the Sync function per se, but rather the data that Sync is downloading on to my machine. Perhaps it's become corrupt in some way? This would also explain why the problem continued to occur even after i disabled the Sync functionality on my other profiles. Could that be the case? If so, i imagine this then becomes a different bug....
(In reply to comment #10) > A new thing i have noticed, though, is that if i click on the History or > Bookmarks menu at the top (since i am using XP on here i can see those by > default)... The last two logs shows history items being added, nothing else. Both history and bookmarks share a common backing store (Places). I don't see any egregious timeouts in the log you provided. But it's possible that there's something in Places that's causing some latency in the UI, and that's what you're experiencing. Does accessing those menus the first time after you launch Firefox cause unresponsiveness, regardless of Sync? (Alternatively, is there a way to get the UI to lock up that doesn't rely on Sync?) The only further thing I can suggest is to get a Trace-level log for history and bookmarks, and catch a log when Sync is causing a slowdown. Could you follow the steps here: https://philikon.wordpress.com/2011/06/13/how-to-file-a-good-sync-bug/ but after Step 2, additionally set services.sync.log.logger.engine.history = Trace services.sync.log.logger.engine.bookmarks = Trace services.sync.log.appender.debugLog.rotate = false in about:config? Also add the Sync icon to your status bar: View > Toolbars > Add-on Bar Customize That'll glow blue during a sync. Now wait until you get a lock-up while that icon is blue, and immediately afterwards save about:sync-log to a file. (Note that you'll want to switch those config items back to Debug/Debug/true for normal use; they'll write a lot of logging info to disk.) Beyond this, I'll have to throw this at the Places team, see if they have any ideas. Thanks!
Accessing the menus immediately after creating a new profile does not cause the lock-ups. However, on the FF6 profile i created, even if i restarted Firefox, every single time i accessed the menus after restarting it would lock up. I reproduced that at least four or five times. I then used the Clear Recent History feature to delete all of my history, and then i unticked the History option in Sync preferences. Since then, the problem has disappeared. I also have not been able to reproduce a lock-up on any version or machine that didn't involve history synching having been activated at some point or another -- as far as i know anyway. I will try disabling history synching on my home computer, as well as the trace log you mentioned, on my netbook some time this week. Thanks again for your help!
(In reply to comment #12) > I will try disabling history synching on my home computer, as well as the > trace log you mentioned, on my netbook some time this week. Thanks again for > your help! I'd be very keen to know what the root cause is, if you have enough patience. It sounds like you have a history item that causes a problem with Places. I'd also be interested to see if you can reproduce this in Aurora (Firefox 7).
I fear that i may have accidentally changed the conditions that were causing the problem. :/ I mentioned before that i had deleted the history; i thought i had done it in a way that would prevent it from synching with the server, but i guess i didn't. All of my Sync history is gone. Since then, i have been unable to reproduce the problem at all, on any profile/version/machine. Which is good for me, i guess, and i think it does fairly conclusively point to the problem having been related to my history data... but since i've deleted it now, i'm not sure how we can get to the root cause anymore. :( I suppose all i can do is turn history synching back on and see if the problem eventually returns? But it might take me quite some time to accumulate that much history again...
(In reply to comment #14) > I mentioned before that i had deleted the history; i thought i had done it > in a way that would prevent it from synching with the server, but i guess i > didn't. All of my Sync history is gone. Yup, that's how Sync works. Everything you do on one machine, apart from disconnecting that machine from your Sync account, propagates magically to the others. Never mind! > Which is good for me, i guess, and i think it does fairly conclusively point > to the problem having been related to my history data... but since i've > deleted it now, i'm not sure how we can get to the root cause anymore. :( Indeed. I'll close this bug; please reopen if you see the problem again. > I suppose all i can do is turn history synching back on and see if the > problem eventually returns? But it might take me quite some time to > accumulate that much history again... History volume isn't likely to be the cause; almost everyone on the team has huge profiles. I recently pruned my history down to a mere 6.5k items from 20k+. There's likely to have just been one item, or one piece of DB corruption, or something created by an add-on. We'll see if it happens again! Thanks for the report.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Whiteboard: [sync-places-hang?]
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: