Open Bug 1585978 Opened 5 years ago Updated 2 months ago

Used storage space for saved cookies and site data is abnormal in some circumstances

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P3)

defect

Tracking

()

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I'm on Mac, using the latest nightly build. I was investigating another bug at the time, here's roughly what I did:

  • Used Time Machine to restore my main profile from a previous day to a new directory. I only restored the ~/Library/Application Support/Firefox/Profiles/<profile folder> section, not the cache.
  • Added the new profile directory to profiles.ini
  • Started Firefox with the new profile.

When I went into preferences, at some stage, I noticed that the cookies and site data were on about 17 exabytes. This was obviously not quite right.

I later restarted and it then showed a reasonable 189MB.

FWIW, integer overflow of -1 for 64-bit is apparently 18,446,744,073,709,551,615 , which if divided by 1024 * 1024 * 1024 (from bytes to gb) is that number. So I suspect that's what's going on... somewhere.

(In reply to :Gijs (he/him) from comment #1)

FWIW, integer overflow of -1 for 64-bit is apparently 18,446,744,073,709,551,615 , which if divided by 1024 * 1024 * 1024 (from bytes to gb) is that number. So I suspect that's what's going on... somewhere.

Jan Varga said the same thing :) He might have an idea of what can cause this.

Flags: needinfo?(jvarga)
Priority: -- → P3
See Also: → 1591265

Yeah, I'll try to fix this before enabling LSNG on release.

Flags: needinfo?(jvarga)

Just one question here: does this in any way likely affect cookies functionality somehow? I have a weird bug for instance that I'm always logged off from matrix on Nightly restart. Just checking if those can be related or not.

I don't think it's related. I suspect this is only a usage calculation problem when we end up with a negative big int which is then interpreted as insanely large positive number.

(In reply to Jan Varga [:janv] from comment #7)

I don't think it's related. I suspect this is only a usage calculation problem when we end up with a negative big int which is then interpreted as insanely large positive number.

Per some of the debugging in bug 1743017 the quota usage per origin is reporting negative numbers; that seems like it could potentially mislead other code about how much space is still available for that origin?

Although it's good to have reproducible steps such as in comment 0, I can't imagine everyone seeing this has gone through the steps in that comment, there must be different ways of hitting this problem...

Flags: needinfo?(jvarga)

Jens, can this be prioritized? It's causing other side effects than just "funny" numbers, cf. bug 1749985.

Severity: normal → --
Flags: needinfo?(jstutte)
Summary: Used storage space for saved cookies and site data is abnormal after restoring a profile to a new directory → Used storage space for saved cookies and site data is abnormal in some circumstances

Jan, do we have some QM_TRY in place to see these failures in order to have a feeling, how often this happens in the wild?

Flags: needinfo?(jstutte)

see exactly the same issue on openSUSE Tumbleweed, FF 101.0.1
Absolut disk usage:
docb@X1E:~> du -sh .mozilla/firefox
1,6G .mozilla/firefox

I clearly did not juggle around with profiles....

Severity: -- → S3

The severity field for this bug is relatively low, S3. However, the bug has 4 duplicates.
:jjalkanen, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jjalkanen)

The severity S3 seems appropriate.

Flags: needinfo?(jjalkanen)

The code which deals with usage calculation needs to be checked if some kind of overflow can happen. For example we can get a negative overall usage which then gets converted from a signed integer to unsigned integer, resulting in reporting insane total usage.

Flags: needinfo?(jvarga)
Duplicate of this bug: 1879256
Duplicate of this bug: 1878977
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: