Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing upon search #1254

Closed
frozenstuff opened this issue Dec 6, 2017 · 23 comments
Closed

Crashing upon search #1254

frozenstuff opened this issue Dec 6, 2017 · 23 comments

Comments

@frozenstuff
Copy link

frozenstuff commented Dec 6, 2017

Expected Behavior

Search should not crash the program.

Current Behavior

Searching will immediately close the program on Linux Mint 18.3 Cinnamon.

clip

Context

Search did not crash before 2.2.2. I have to re-open Keepass and enter my key as if I was starting the program up.

Debug Info

KeePassXC - Version 2.2.2
Revision: 6d46717

Libraries:

  • Qt 5.5.1
  • libgcrypt 1.6.5

Operating system: Linux Mint 18.3
CPU architecture: x86_64
Kernel: linux 4.14.0-041400-generic

Enabled extensions:

  • KeePassHTTP
  • Auto-Type
  • YubiKey
@droidmonkey
Copy link
Member

Does this happen in any database, even a brand new one? Any search term at all?

@frozenstuff
Copy link
Author

Just made a new blank database. It did not crash then.

I quit and reopened my other database. Any search time at all will crash it, even before I finish typing.

@droidmonkey
Copy link
Member

How did you create your database, was it from keepass 2?

@frozenstuff
Copy link
Author

I created both databases within Keepassxc.

@droidmonkey
Copy link
Member

Yikes, i fear the only way for us to debug this is to send us your broken database.... Are you able to compile the application in debug mode and run it through a debugger?

@frozenstuff
Copy link
Author

That sounds a bit beyond my scope but I could do it if you have some sort of tutorial. And obviously the database has all my passwords so I'm a little weary of sending that...

If my database is at risk of breaking/corrupting, is it easy to fix by creating a new database then doing an export/import?

@droidmonkey
Copy link
Member

droidmonkey commented Dec 8, 2017

I could build a debug version that works in Mint 18.3 and provide it to you with simple instructions on how to run it in the debugger. Will likely get to that this weekend. We definitely want to fix the crash, so don't delete the database. This would only cause problems if the program crashed before you could save your database after any changes.

@TheZ3ro
Copy link
Contributor

TheZ3ro commented Dec 8, 2017

Alternatively you can:
(- Always make a backup of your current database and store it safely)

  • Make another copy of your database and open it
  • Delete entries one-by-one in the second copy until KeePassXC don't crash anymore
  • The entry you just deleted is the one that crash the DB

Then you can report to us if this entry has some problem or strange field.

@droidmonkey
Copy link
Member

droidmonkey commented Dec 8, 2017

OK, please download the following build of KeePassXC and perform the below steps https://www.dropbox.com/s/cqyhjqdybousnou/keepassxc-2.2.2-debug.tar.gz

  1. Extract the files to your downloads folder (or where ever) and then open a terminal in the keepassxc-debug/bin folder.

  2. Type in gdb ./keepassxc then when you get to the (gdb) prompt type in r <enter>.

  3. KeePassXC will open, now select your database, unlock it, and initiate a search. This should crash the application and you'll be dropped back into the terminal at the (gdb) prompt.

  4. Type in bt <enter> and copy/paste the output to this issue. This is the backtrace which shows exactly where the application crashed. It looks like this:

(gdb) bt
#0  0x00007ffff5cc570d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007ffff4c4a38c in g_main_context_iterate (priority=2147483647, n_fds=10, fds=0x555555f7dae0, timeout=<optimized out>, context=0x7fffe40016f0)
    at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:4135
#2  0x00007ffff4c4a38c in g_main_context_iterate (context=context@entry=0x7fffe40016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmain.c:3835
  1. Type in q <enter> and then y <enter> if necessary. You are done!

@frozenstuff
Copy link
Author

frozenstuff commented Dec 10, 2017

Thanks for the help. If it makes any difference, Keepassxc froze instead and Mint said the program wasn't responding. Normally it just disappears. Here's the output:

(gdb) bt
#0 0x00007ffff67f1ae8 in QSortFilterProxyModel::parent(QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1 0x00007ffff792ef7b in QTreeView::isIndexHidden(QModelIndex const&) const ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2 0x00007ffff7930ea7 in QTreeView::visualRect(QModelIndex const&) const ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3 0x00007ffff78d75da in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff78d7ae8 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007fffedd909d9 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6 0x00007fffedd90f49 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7 0x00007fffedd963ac in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8 0x00007ffff6a9babe in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9 0x00007ffff6a9d26e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007ffff6856c01 in QObject::event(QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff769305c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff7698516 in QApplication::notify(QObject*, QEvent*) ()

@droidmonkey
Copy link
Member

droidmonkey commented Dec 10, 2017

That's odd, it stopped in qt code. See if you can get it to stop/crash a couple of times and see if the output of bt is any different.

The next best option is to do what @TheZ3ro mentioned... Copy your db snd then delete entries or groups one by one to see when it stops crashing.

@frozenstuff
Copy link
Author

Crashed a couple more times. Looks the same:

Thread 1 "keepassxc" received signal SIGSEGV, Segmentation fault.
0x00007ffff67f1ae8 in QSortFilterProxyModel::parent(QModelIndex const&) const
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
(gdb) bt
#0 0x00007ffff67f1ae8 in QSortFilterProxyModel::parent(QModelIndex const&) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1 0x00007ffff792ef7b in QTreeView::isIndexHidden(QModelIndex const&) const ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2 0x00007ffff7930ea7 in QTreeView::visualRect(QModelIndex const&) const ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3 0x00007ffff78d75da in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff78d7ae8 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007fffedd909d9 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6 0x00007fffedd90f49 in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7 0x00007fffedd963ac in ?? ()
from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8 0x00007ffff6a9babe in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9 0x00007ffff6a9d26e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007ffff6856c01 in QObject::event(QEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff769305c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff7698516 in QApplication::notify(QObject*, QEvent*) ()

@phoerious
Copy link
Member

phoerious commented Dec 10, 2017

It's probably the same issue as #335, which may be the same as or related to https://bugreports.qt.io/browse/QTBUG-52601
I had another guy on IRC this week with the same problem on Mint 18.1.
You should try out the AppImage, which should work without crashes.

@frozenstuff
Copy link
Author

Huh, mine crashes between groups too. I used to use it but stopped so I never noticed.

@dmiwell
Copy link

dmiwell commented Jan 18, 2018

Thanks @phoerious

AppImage seems to work fine for me on Mint 18.3. I don't get crashes.

@thomaspasser
Copy link

thomaspasser commented Jan 18, 2018

I have the same problem:

Thread 1 "keepassxc" received signal SIGSEGV, Segmentation fault.
0x00007ffff6a03ae8 in QSortFilterProxyModel::parent(QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff6a03ae8 in QSortFilterProxyModel::parent(QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007ffff7b40f7b in QTreeView::isIndexHidden(QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2  0x00007ffff7b42ea7 in QTreeView::visualRect(QModelIndex const&) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#3  0x00007ffff7ae95da in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff7ae9ae8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007fffefaf39d9 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6  0x00007fffefaf3f49 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7  0x00007fffefaf93ac in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8  0x00007ffff6cadabe in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007ffff6caf26e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#10 0x00007ffff6a68c01 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007ffff78a505c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff78aa516 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff6a3938b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff6a3b786 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff6a8f3c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff5406197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007ffff54063f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff540649c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff6a8f7cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff6a36b4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff6a3ebec in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x0000555555596e38 in main (argc=1, argv=0x7fffffffde48) at /home/*****/builds/keepassxc-2.2.4/src/main.cpp:153
(gdb)

@phoerious
Copy link
Member

It's the same problem and a bug in Qt 5.5. To get rid of it, either use the AppImage or upgrade to an Ubuntu version that ships at least 5.6.

@phoerious
Copy link
Member

Closing this, since it appears to be the same issue and we cannot fix it.

@clippclopp
Copy link

clippclopp commented May 25, 2018

@phoerious

Some more info to share on the above as I have been running KeepassXC successfully on Mint 18.3 and also experienced the same issues as above.

I have multiple devices running identical mirrors of Linux Mint. Same libraries, programs, etc. This issue described by the OP has occurred 3x now on different machines for me at the application level.

The database crash isn't reproduced on other machines and I can use the databases just fine on "working" machines. Meanwhile the machine experiencing the crashes has the same behaviour with any KeepassXC database. Including new ones created for testing. A full, clean install of the OS resolves the issue, but beyond that have not been able to fix.

As weird as this may sound, I believe the issue happens when I update too many entries too fast while having the "automatic save on every change" and/or "backup database before saving" features enabled. It seems that if a change is made before the previous change is finished saving, the application crashes. And anytime the application is launched going forward, it crashes on searches and directory/folder navigation.

I can't seem to pinpoint where it's getting hung up, but it doesn't seem to be the QT issue as mentioned earlier (at least in my case) since I'm successfully running the same database on the same version of Linux Mint on other machines (exactly the same).

It isn't until something goes haywire once on the particular KeepassXC install that it then continues to have issues. Or there's a unusual coincidence.

@phoerious
Copy link
Member

It is a Qt bug and we cannot fix it. Mint 18.3 is also based on Ubuntu 16.04, which has Qt 5.5. Use our AppImage if you cannot upgrade your system.

@droidmonkey
Copy link
Member

For the record, you can't possibly do anything with KeePassXC until the save is complete since it's a synchronous function.

@clippclopp
Copy link

clippclopp commented May 25, 2018

Ok got it. Thank you both for the reply. So strange it works without a hitch on some devices running Mint 18.3 but not others. I'll use the AppImage for now and try upgrading the system to see if that resolve.

Edit: Also forgot to note that the Linux Mint device that KeepassXC is crashing on only crashes for one user. Installs for other regular and sudo users on the same device are not experiencing the crash issue.

@lagagain
Copy link

Note the temp solution:

I got the same question, and my OS is LinuxMint 18.3. Before today I haven't the question, but it happened today(I guess because that some Qt composes upgrade auto, but not sure).

And using AppImage is good, no this question. If someone gets the same question, can use AppImage temp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants