Summary: | baloo_file_extractor crashes whenever the index exceeds 5G in size | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-baloo | Reporter: | Hao Zhang <theivorytower> |
Component: | Baloo File Daemon | Assignee: | Christoph Cullmann <christoph> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | christoph, don.waterloo+kde, kredba, marvin24, pinak.ahuja, vindrg |
Priority: | NOR | ||
Version: | 5.23.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/baloo/b0890aca71aa4f0fdabe65ee7b7fbd0bc844d8b8 | Version Fixed In: | 5.27 |
Sentry Crash Report: | |||
Attachments: | Patch to fix this bug |
Description
Hao Zhang
2016-06-18 23:00:04 UTC
Can this bug be related to Bug 359038? Since info.me_last_pgno got reused. When the size of the index is 5G, "balooctl status" only shows a size of 1G. Please ignore my previous comment, since info.me_last_pgno was not really reused. But I solved Bug 359038 and please see my comment there. When I compiled baloo in debug mode, I got the following error before baloo_file_extractor crashes: ASSERT failure in PositionDB::put: "MDB_MAP_FULL: Environment mapsize limit reached", file /home/hao/build/baloo/src/baloo-5.23.0/src/engine/positiondb.cpp, line 80 The relevant code is in line 97 of the file src/engine/database.cpp mdb_env_set_mapsize(m_env, static_cast<size_t>(1024) * 1024 * 1024 * 5); // 5 gb The size of the database is HARDCODED to be 5gb!! Is there any specific reason this size cannot be larger? 5gb is far from enough if there are lots of files to index. Created attachment 99637 [details]
Patch to fix this bug
This bug is fixed with the attached patch.
Thanks for the patch! Cleaned it up a bit (e.g. no overflow in computation on 32-bit and usage of size_t) https://git.reviewboard.kde.org/r/128885/ Feel free to comment there! *** Bug 364133 has been marked as a duplicate of this bug. *** *** Bug 352260 has been marked as a duplicate of this bug. *** *** Bug 359038 has been marked as a duplicate of this bug. *** Git commit b0890aca71aa4f0fdabe65ee7b7fbd0bc844d8b8 by Christoph Cullmann. Committed on 11/09/2016 at 16:54. Pushed by cullmann into branch 'master'. Increase size limit of baloo index for 64-bit machines CHANGELOG: On 64-bit systems baloo allows now > 5 GB index storage. Increase size limit of baloo index for 64-bit machines to avoid crashs after > 5GB of index size. (Better would be additional out-of-space handling, but ATM baloo has zero checks for that) The size limit for 32-bit is still 1GB, like before (there was a silent overflow from 5GB to 1GB in the computation), people with large homes will still get random segfaults on 32-bit. Patch based on patch from Hao Zhang, Bug 364475 REVIEW: 128885 M +11 -1 src/engine/database.cpp M +14 -14 src/engine/databasesize.h M +1 -1 src/engine/transaction.cpp M +2 -2 src/tools/balooctl/statuscommand.cpp http://commits.kde.org/baloo/b0890aca71aa4f0fdabe65ee7b7fbd0bc844d8b8 Thanks for very useful error detection + patch proposal to Hao Zhang! Will this fix land into Kubuntu 16.04? Or should I create bug report in https://bugs.launchpad.net/ubuntu/+source/baloo for Kbuntu maintainers..? Thanks. It is fixed in 5.27. If this version is not in 16.04, Ubuntu has to do back port. For some reason, it even crashes now a bit earlier here. I've created bug report asking for backport. Posting for reference: https://bugs.launchpad.net/ubuntu/+source/baloo/+bug/1637610 |