firefox can not restore session from too large valid sessionstore.js




7 years ago
7 years ago


(Reporter: crass, Unassigned)


11 Branch

Firefox Tracking Flags

(Not tracked)



(1 attachment)



7 years ago
Created attachment 615140 [details]
sessionstore.js reproducing this bug

When loading a very large, yet json-valid, sessionstore.js on startup, firefox will fail to load the previous session with the error "JSON.parse: unexpected end of data".  Attached is a contrived example which illustrates this.  I know that the json is perfectly valid, from other json decoders.  I haven't figured out the lower bound on the size of the file that produces this bug, but I know its less than 150Mb.

Another interesting thing to note, if the "Session Manager" addon is used, then it can load this session data (assuming you prefix the file with the right headers).
Attachment #615140 - Attachment mime type: application/octet-stream → text/plain
Attachment #615140 - Attachment mime type: text/plain → application/octet-stream
I'm actually surprised you get that error... We have a hardcoded 100mb limit on session files because we thought that was sufficiently high to cover all cases.

Session Manager reads the file on it's own, I guess without any such limits.

I don't think we need to make Firefox capable of loading sessionstore.js files over 100mb - even that is crazy high. It's really a very difficult file size to even reach, let alone maintain a usable Firefox instance with that data loaded. If Session Manager wants to provide that capability, it's welcome to, but on it's own Firefox will not.
Last Resolved: 7 years ago
Resolution: --- → WONTFIX

Comment 2

7 years ago
Paul, I first encountered this error with sessionstore.js file that was entirely produced by firefox!  I still have this file, but am reluctant to upload it due to privacy and security concerns.  I've not really identified why this file grew so large, but killing the last session state is not acceptable imo.  What's interesting is that there were only about 200 tabs, where I've had sessions with 500 that weren't as large.

I think that there is most definitely an issue here, if only the way this is being handled.  There should be no JSON.parse error.  It makes me think there's some problem with handling very large json encoded streams.

Comment 3

7 years ago
Also, with 200 tabs, I'm regularly seeing 60Mb sessionstore.js file sizes.  It seems only a matter of time before 100Mb becomes a legitimate size, especially if you consider bug 669603 and other bloat mentioned in its parent 669034.

What's the rationale for putting an artificial and arbitrary limit like this in firefox?  From an end user perspective your response takes away from FF's image as a user driven project that is accessible and transparent.  I'm hearing, "this arbitrary limit exists because we picked a high number and that's the way it will stay because I say so".  I hope you can rectify this by providing an adequate explanation.

I'm sure glad no one listened to Bill Gate when he said 640k memory was all that computers would ever need.
You need to log in before you can comment on or make changes to this bug.