Status bar is displaying incorrect quota indication (infinity, full) for TeraByte quotas
Categories
(Thunderbird :: Mail Window Front End, defect, P1)
Tracking
(thunderbird_esr78 fixed, thunderbird76 wontfix, thunderbird77 affected, thunderbird78+ affected, thunderbird79 fixed)
People
(Reporter: standard8, Assigned: rnons)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files, 5 obsolete files)
|
7.78 KB,
image/png
|
Details | |
|
22.07 KB,
patch
|
rnons
:
review+
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
On Thunderbird 76, I'm getting a quota indication in the status bar that I didn't get in 68 (separate profile bug with the same account).
It says "Infinity%" and indicates red, i.e. there's no space left.
When I go to folder properties and look at the quota, it also says the same but "full".
If I go back to my Thunderbird 68 profile, in the properties dialog it says 0% full.
This is with my mozilla.com account that is hosted by Google.
Requesting tracking as this is bad UI that's on the main display and obvious regression.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
It will probably be from bug 841906. I wonder why it ends up with infinity - that certainly doesn't happen for everyone.
Maybe around here: https://hg.mozilla.org/comm-central/rev/54a83a246c9e#l1.65 or maybe something getting wrongly parsed from the imap response?
Do you have an imap log?
Comment 2•5 years ago
|
||
I can cause the "Infinity%" to occur only if I set the "limit" decoded from the gmail storage quota response to 0 in the Trunk tb code. This is my info from tb log where quota is obtain from gmail:
[(null) 11848: IMAP]: I/IMAP 0x7f4b8c662800:imap.gmail.com:S-INBOX:SendData: 11 getquotaroot "INBOX"
[(null) 11848: IMAP]: D/IMAP ReadNextLine [stream=0x7f4b8d1a8740 nb=24 needmore=0]
[(null) 11848: IMAP]: I/IMAP 0x7f4b8c662800:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT "INBOX" ""
[(null) 11848: IMAP]: D/IMAP ReadNextLine [stream=0x7f4b8d1a8740 nb=38 needmore=0]
[(null) 11848: IMAP]: I/IMAP 0x7f4b8c662800:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: * QUOTA "" (STORAGE 968704 15728640)
[(null) 11848: IMAP]: D/IMAP ReadNextLine [stream=0x7f4b8d1a8740 nb=15 needmore=0]
[(null) 11848: IMAP]: I/IMAP 0x7f4b8c662800:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: 11 OK Success
Can you tell us what yours shows for the same getquotaroot imap command. Re: https://wiki.mozilla.org/MailNews:Logging
In the log above, 968704=usage, 15728640=limit.
| Reporter | ||
Comment 3•5 years ago
|
||
Sorry for the delay, I get:
[(null) 55617: IMAP]: I/IMAP 0x13095a000:imap.gmail.com:S-INBOX:SendData: 11 getquotaroot "INBOX"
[(null) 55617: IMAP]: D/IMAP ReadNextLine [stream=0x12e640190 nb=24 needmore=0]
[(null) 55617: IMAP]: I/IMAP 0x13095a000:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT "INBOX" ""
[(null) 55617: IMAP]: D/IMAP ReadNextLine [stream=0x12e640190 nb=47 needmore=0]
[(null) 55617: IMAP]: I/IMAP 0x13095a000:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: * QUOTA "" (STORAGE 2305081 7881299347898368)
[(null) 55617: IMAP]: D/IMAP ReadNextLine [stream=0x12e640190 nb=15 needmore=0]
[(null) 55617: IMAP]: I/IMAP 0x13095a000:imap.gmail.com:S-INBOX:CreateNewLineFromSocket: 11 OK Success
So the limit is 7 petabytes.
From what I can see of the patch in bug 841906, the limit is a 32 bit unsigned limit. It also uses atoi for which it looks like the behaviour is undefined when an integer is out of range.
Comment 4•5 years ago
|
||
Can probably use atol or atoll I think to fix it. But interesting how google provides you with such a huge quota? Most I see advertised for paid G-Suite is 30T. My free account is only 15G.
I think the quota is supposed to be in KBytes so with speedcrunch I see something for yours like 8x10^^18 bytes:
7881299347898368 * 1024
= 8.070450532247928832e18
Comment 5•5 years ago
|
||
Since the number is in KB I guess the limit is 7 TB.
Comment 6•5 years ago
|
||
Gene, do you want to take this?
Comment 7•5 years ago
•
|
||
It appear to me that the imap quota RFC doesn't require that the storage number is in KB. It only shows an example with the numbers in "1024 octet" for the units of STORAGE. But it seems that has been adopted as a convention by the various imap server vendors that STORAGE is in kbytes (1024 octets).
https://tools.ietf.org/html/rfc2087#page-2
However, the Melnikov draft rfc wants to define STORAGE explicitly in KB:
https://tools.ietf.org/id/draft-melnikov-extra-quota-00.html#rfc.section.5.1
Since the number is in KB I guess the limit is 7 TB.
The raw number is 7881299347898368. This is exactly 7 Peta since a Peta is 1024 to the 5th power:
7881299347898368 /1024^5
= 7
So if gmail is reporting STORAGE in bytes and not in KB, the limit is 7 PB and not 7 TB. But if gmail is reporting the quota in KB, the STORAGE limit is actually 7*1024 PB which is also essentially unlimited I would think.
Gene, do you want to take this?
Ok, sounds like "fun". (Still working on the UTF8=ACCEPT/Skräppost problem.)
Comment 8•5 years ago
|
||
GMail reports in KB - my gmail account shows 15G quota which sounds about right.
We'll also need to adjust the JS calculations to use BigInt, since JS will only be able to handle a quota of around 8TB - after which we reach too large numbers.
| Reporter | ||
Comment 9•5 years ago
|
||
I just dug around a bit, it looks like we have 'unlimited' storage according to Google. I guess 7PB is how they express that at the moment.
Comment 10•5 years ago
|
||
GMail reports in KB - my gmail account shows 15G quota which sounds about right.
Yes, at least "free" gmail reports in KB and is exactly 15G for me too:
15728640 * 1024 /1024^3
= 15
I just dug around a bit, it looks like we have 'unlimited' storage according to Google. I guess 7PB is how they express that at the moment.
Google may be reporting a 1024*7 PB limit. I assume this a company-paid commercial account of some sort. The largest advertised account I see is for 30TB and is $300 per month: https://one.google.com/storage?hl=en
We'll also need to adjust the JS calculations to use BigInt, since JS will only be able to handle a quota of around 8TB - after which we reach too large numbers.
Thanks. I'll have to learn about this too.
Comment 11•5 years ago
|
||
Any update on this?
Comment 12•5 years ago
|
||
Sending this over to Ping.
| Assignee | ||
Comment 13•5 years ago
|
||
- Support petabyte in
formatFileSize - Use BigInt when computing folder usage percentage
| Assignee | ||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
| Assignee | ||
Comment 15•5 years ago
|
||
You're not rounding it like before. Won't that cause 10.9879879879% type of displays?
Seems not, for example 5n / 2n is 2n not 2.5n, so Number((100n * BigInt(q.usage)) / BigInt(q.limit)) is effectively equivalent to Math.floor for small integers.
next after GB is TB: terabyte
I knew something was wrong, but failed to notice I missed TB. Fixed now.
Comment 16•5 years ago
|
||
| Assignee | ||
Comment 17•5 years ago
|
||
- Changed to use
atoland replace moreu_int32withu_int64
I was hoping the compile can stop me or at least warn me when passing u_int64 to u_int32.
Comment 18•5 years ago
|
||
I think it might be better to use atoll() when you are saving into a uint64_t. Re: https://searchfox.org/comm-central/search?q=atoll%28&path=&case=false®exp=false
Also, the original code used PR_sscanf() instead of atol(). I was intending to go back to that and use something like %lld to scan into the two uint64_t's (usage and limit). PR_sscanf() also can return an error that atoll() won't.
Anyhow, I'll test the patch as is with my Dovecot server that I've set up with multiple quotaroots.
Thanks!
Comment 19•5 years ago
|
||
Seems to work fine as is with just atol(). I caused dovecot to return the same storage string as google/gmail 7881299347898368 and tb now reports the storage limit as 7168 PB. I also tested in the TB range and GB range and still looks good. The % calc looks right too.
I then changed atol to atoll and see no difference. Since I'm on a 64bit system with a 64bit build, there may be problems with 32bit, not sure. (Do we still support 32bits?)
Comment 20•5 years ago
|
||
| Assignee | ||
Comment 21•5 years ago
|
||
- Changed to atoll
- Added
/* global: BigInt */to commandglue.js
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 22•5 years ago
|
||
Added BigInt to .eslintrc
globals: {
BigInt: "readonly",
},
Or is it better to use /* global BigInt */ to where it is used?
Comment 23•5 years ago
|
||
| Assignee | ||
Comment 24•5 years ago
|
||
Changed to use /* global BigInt */.
| Assignee | ||
Updated•5 years ago
|
Comment 25•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e8ecd7792a74
Support petabyte in imap folder quote size and percentage calculations. r=mkmelin
Updated•5 years ago
|
Updated•5 years ago
|
Comment 26•5 years ago
|
||
Comment 27•5 years ago
|
||
Comment 28•5 years ago
|
||
| bugherder uplift | ||
Thunderbird 79.0b3:
https://hg.mozilla.org/releases/comm-beta/rev/1d7aea3ffc5d
Updated•5 years ago
|
Comment 29•5 years ago
•
|
||
| bugherder uplift | ||
Thunderbird 78.1.0:
https://hg.mozilla.org/releases/comm-esr78/rev/6bf50791d325
Description
•