Closed
Bug 1279987
Opened 9 years ago
Closed 7 years ago
Cache entries is full [b2g]
Categories
(Core :: Networking: Cache, defect, P5)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: liweijia, Unassigned)
Details
(Whiteboard: [necko-would-take])
I can see 4591 files in /cache/entries which can't create any file or dir.
While doing a factory reset. no way to create /cache/recovery folder.
and clear() is failed too.
https://dxr.mozilla.org/mozilla-central/source/b2g/components/RecoveryService.js#85
Updated•9 years ago
|
Summary: Cache entries is full → Cache entries is full [b2g]
Whiteboard: [necko-would-take]
![]() |
||
Comment 1•9 years ago
|
||
Viga, I'm not sure I fully understand the report. Do you have some more data, like any console warnings or NS_ENSURE_* failures logged? What exactly "clear() is failed too" means?
Flags: needinfo?(liweijia)
The log as follow.
06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: factoryReset wipe
06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Found 2 volumes
06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Got volume: sdcard at /storage/sdcard
06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Got volume: sdcard1 at /storage/sdcard1
06-10 15:35:33.375 W/GeckoConsole( 254): [JavaScript Error: "uncaught exception: 2147500037"]
06-10 15:35:33.585 E/librecovery( 254): Unable to create recovery directory "/cache/recovery": No space left on device
06-10 15:35:33.585 I/Gecko ( 254): -*- RecoveryService: Error: Factory reset failed. Trying again after clearing cache.
06-10 15:35:33.585 E/librecovery( 254): Unable to create recovery directory "/cache/recovery": No space left on device
06-10 15:35:33.585 I/Gecko ( 254): -*- RecoveryService: Error: Factory reset failed again
My initial idea is, the /cache inode is running out. If you delete one file, then you can create only one.
Flags: needinfo?(liweijia)
![]() |
||
Comment 3•9 years ago
|
||
(In reply to Viga from comment #2)
> The log as follow.
> 06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: factoryReset wipe
> 06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Found 2 volumes
> 06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Got volume:
> sdcard at /storage/sdcard
> 06-10 15:35:33.365 I/Gecko ( 254): -*- RecoveryService: Got volume:
> sdcard1 at /storage/sdcard1
> 06-10 15:35:33.375 W/GeckoConsole( 254): [JavaScript Error: "uncaught
> exception: 2147500037"]
> 06-10 15:35:33.585 E/librecovery( 254): Unable to create recovery directory
> "/cache/recovery": No space left on device
> 06-10 15:35:33.585 I/Gecko ( 254): -*- RecoveryService: Error: Factory
> reset failed. Trying again after clearing cache.
> 06-10 15:35:33.585 E/librecovery( 254): Unable to create recovery directory
> "/cache/recovery": No space left on device
> 06-10 15:35:33.585 I/Gecko ( 254): -*- RecoveryService: Error: Factory
> reset failed again
This doesn't say much.
>
>
> My initial idea is, the /cache inode is running out. If you delete one file,
> then you can create only one.
OK, if you are certain about the cause, we could try doing something with it.
Michal, is there any way to track the number of free inodes?
We have some code that hard-limits the number of files we create under cache2/entries when we are using FAT32 file system, which has a hard-limit for number of files in a single directory which we can easily overrun. It could be used for any limitation, if know the right number.
Flags: needinfo?(honzab.moz) → needinfo?(michal.novotny)
Comment 4•9 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #3)
> Michal, is there any way to track the number of free inodes?
statvfs but I don't think this is useful information. It'll change every time some other application created a new file on the FS.
> We have some code that hard-limits the number of files we create under
> cache2/entries when we are using FAT32 file system, which has a hard-limit
> for number of files in a single directory which we can easily overrun. It
> could be used for any limitation, if know the right number.
We don't limit number of files on FAT32. We just try to recover in case of specific failure. https://dxr.mozilla.org/mozilla-central/rev/5f95858f8ddf21ea2271a12810332efd09eff138/netwerk/cache2/CacheFileIOManager.cpp#3807
Adding the right error code here might solve the problem.
Flags: needinfo?(michal.novotny)
I can still see 48.4M space left, when I can't create any more file/dir with the failure "No space left on device". I remove a very small file, then I can create one bigger file. It tells that the error message isn't right. But indeed I can't created anymore.
Flags: needinfo?(michal.novotny)
Comment 6•9 years ago
|
||
Why did you ni me? I don't see any question to answer.
The question is if the file number isn't limited, how to explain my test?
the issue whole logic is, when doing a factory reset. it tries to create one more dir called recovery.
But failed. then it tries to do a clear, failed again because clear() tries to create files before remove some files.
Comment 8•9 years ago
|
||
We don't limit number of files, but it is of course limited by FS. Just check number of free inodes on your FS. The fact that clear() needs to create a new file before the cache can be cleared causes the problem here. Easiest solution here is to create the filesystem with better bytes/inode ratio. Btw this normally isn't an issue on desktop or android because FS holding the cache is larger enough so even a very bad bytes/entry ratio isn't a problem.
Flags: needinfo?(michal.novotny)
Comment 9•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Comment 10•7 years ago
|
||
Mass closing as we are no longer working on b2g/firefox os.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Comment 11•7 years ago
|
||
Mass closing as we are no longer working on b2g/firefox os.
You need to log in
before you can comment on or make changes to this bug.
Description
•