Bug 389625 - baloo_file crashes in Baloo::DocumentUrlDB::put()
Summary: baloo_file crashes in Baloo::DocumentUrlDB::put()
Status: RESOLVED DUPLICATE of bug 389848
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Baloo File Daemon (show other bugs)
Version: 5.18.0
Platform: unspecified Linux
: VHI crash
Target Milestone: ---
Assignee: baloo-bugs-null
Keywords: drkonqi
: 397450 (view as bug list)
Depends on:
Reported: 2018-01-30 02:49 UTC by Michael Putt
Modified: 2018-11-01 20:44 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Putt 2018-01-30 02:49:40 UTC
Application: baloo_file (5.18.0)

Qt Version: 5.5.1
Operating System: Linux 4.4.0-109-generic x86_64
Distribution: Ubuntu 16.04.3 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I plugged in a SanDisk Pro Ultra 128GB flash drive, performed a 'sudo dd if=/dev/sdd of=RHEL7.ddimg bs=512 count=27265024' and Baloo crashed.  This command was intended to copy the MBR, partition table, and first partition of the USB flash drive with a RHEL 7 installation.  /dev/sdd1 was the only partition and it was ~13 GiB in size.
- Unusual behavior I noticed:
Baloo crashed and KDE gave me a window saying so.
- Custom settings of the application:
What happened, step-by-step:
  1. Inserted the SanDisk Ultra 128 GB drive into a USB 3.0 port
  2. Opened Konsole and typed "cat /proc/partitions" to determine what the drive assignment was.  The USB drive was assigned "/dev/sdd" with a single partition.
  3. Typed "sudo fdisk -l /dev/sdd" to obtain the 'End' column of the first partition.  I used the 'End' column, plus 1 block to give 27265024.  With a block size of 512 bytes, I continued to step 4.
  4. Typed "sudo dd if=/dev/sdd of=RHEL7.ddimg bs=512 count=272650234" to obtain the MBR, partition table, and first partition of the USB drive.
  5. Baloo crashes.  Can't stop the fever.  Baloo just infects and eats your face off.

The crash can be reproduced every time.

-- Backtrace:
Application: Baloo File Indexing Daemon (baloo_file), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fb0a26e9900 (LWP 27762))]

Thread 2 (Thread 0x7faf56f40700 (LWP 28201)):
[KCrash Handler]
#6  0x00007fb0a0729428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#7  0x00007fb0a072b02a in __GI_abort () at abort.c:89
#8  0x00007fb09ef2e002 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#9  0x00007fb09ef236a5 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#10 0x00007fb09ef24863 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#11 0x00007fb09ef24ac9 in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#12 0x00007fb09ef266df in ?? () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#13 0x00007fb09ef29805 in mdb_cursor_put () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#14 0x00007fb09ef2c260 in mdb_put () from /usr/lib/x86_64-linux-gnu/liblmdb.so.0
#15 0x00007fb0a18bdedd in Baloo::IdTreeDB::put(unsigned long long, QVector<unsigned long long>) () from /usr/lib/x86_64-linux-gnu/libKF5BalooEngine.so.5
#16 0x00007fb0a18bb540 in Baloo::DocumentUrlDB::add(unsigned long long, unsigned long long, QByteArray const&) () from /usr/lib/x86_64-linux-gnu/libKF5BalooEngine.so.5
#17 0x00007fb0a18bb916 in Baloo::DocumentUrlDB::put(unsigned long long, QByteArray const&) () from /usr/lib/x86_64-linux-gnu/libKF5BalooEngine.so.5
#18 0x00007fb0a18d30ea in Baloo::WriteTransaction::addDocument(Baloo::Document const&) () from /usr/lib/x86_64-linux-gnu/libKF5BalooEngine.so.5
#19 0x000000000041cc86 in Baloo::NewFileIndexer::run() ()
#20 0x00007fb0a11eb2d3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007fb0a11ee7be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007fb09fe516ba in start_thread (arg=0x7faf56f40700) at pthread_create.c:333
#23 0x00007fb0a07fb41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fb0a26e9900 (LWP 27762)):
#0  0x00007fb0a07eb27d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007fb099800073 in ?? () from /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.111
#2  0x00007fb09da026f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb09d9bee74 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb09d9bf330 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb09d9bf49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007fb0a14257eb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007fb0a13ccb4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fb0a13d4bec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x000000000041698c in main ()

Reported using DrKonqi
Comment 1 Michael Heidelbach 2018-02-02 11:09:01 UTC
On the first glance this looks like very interesting bug.
I'll investigate, but it will take some time.

Please be patient and for the time being do this:
Open a console
  in a second console
  $ balooctl monitor

$ balooctl suspend
(Do your dd stuff)
$ balooctl resume

  baloo should list the files it is indexing in console #2
  Please report what happened

If that doesn't help try the balooctl start/stop pair instead of suspend/resume.
Ensure baloo_file and baloo_file_extractor are not running after balooctl stop.
Comment 2 Dominik Haumann 2018-04-14 01:57:43 UTC
@Michael: This bug was reported since many years many times. You can find a list of duplicates in bug 389848, where you can also find more backtraces.

I am not closing this as duplicate of bug #389848 since you added a comment here to work on this.
Comment 3 Nate Graham 2018-10-17 16:02:06 UTC
*** Bug 397450 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-11-01 18:31:03 UTC
*** Bug 400498 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Brüns 2018-11-01 20:44:55 UTC
Fixed in lmdb upstream and openSUSE lmdb RPMs, see 389848 for details. For any other distribution, ask the respective LMDB maintainers to cherry-pick the fix.

*** This bug has been marked as a duplicate of bug 389848 ***