-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.8, 6.5.1, 6.6, 6.7, 6.8, 6.9
-
None
-
-
27f939da8 (dev), fd456b46c (6.10), 113fdd928 (6.9), 238114e46 (tqtc/lts-6.8), 3a67f2347 (tqtc/lts-6.5)
When cache files are expired, existing open file descriptors to those files are not removed, causing a leak of file descriptors.
This was initially reported and fixed as QTBUG-36076, but the issue was re-introduced in QTBUG-111397. More specifically, commit e5f295c8a removes the following lines in QNetworkDiskCache::expire:
- if (cached.path.contains(PREPARED_SLASH)) { - auto matchesCacheItem = [&cached](QCacheItem *item) { - return item && item->file && item->file->fileName() == cached.path; - }; - auto itemIt = std::find_if(d->inserting.cbegin(), d->inserting.cend(), matchesCacheItem); - if (itemIt != d->inserting.cend()) { - auto &tempfile = (*itemIt)->file; - delete tempfile; - tempfile = nullptr; - } - }
which were responsible for avoiding the leak.
- is duplicated by
-
QTBUG-138746 QNetworkAccessManager with QNetworkDiskCache leaves open files on 404 error
-
- Closed
-
For Gerrit Dashboard: QTBUG-135641 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
664273,3 | Http: Remove incomplete cache-objects on destruction | dev | qt/qtbase | Status: MERGED | +2 | 0 |
665411,2 | Http: Remove incomplete cache-objects on destruction | 6.10 | qt/qtbase | Status: MERGED | +2 | 0 |
665749,2 | Http: Remove incomplete cache-objects on destruction | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
666096,2 | Http: Remove incomplete cache-objects on destruction | tqtc/lts-6.8 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
666463,2 | Http: Remove incomplete cache-objects on destruction | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |