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

Keepass crashes on startup (AOT Assertion Fail) #10191

Open
klockeph opened this issue Aug 20, 2018 · 5 comments
Open

Keepass crashes on startup (AOT Assertion Fail) #10191

klockeph opened this issue Aug 20, 2018 · 5 comments
Assignees

Comments

@klockeph
Copy link

klockeph commented Aug 20, 2018

Steps to Reproduce

  1. get an arch-based distro
  2. install keepass and mod_mono from AUR
  3. try to run keepass

Current Behavior

Keepass crashes on startup

Expected Behavior

It shouldn't crash (or at least give a good error message why it does)

On which platforms did you notice this

[ ] macOS
[x] Linux (Manjaro, Kernel 4.18)
[ ] Windows

Version Used:

Mono JIT compiler version 5.14.0 (makepkg/f3a2216b65a Fri Aug 17 18:51:18 CEST 2018)

Stacktrace

* Assertion at aot-runtime.c:2459, condition `is_ok (error)' not met, function:decode_cached_class_info, Image out of date

Stacktrace:

  at <unknown> <0xffffffff>
  at KeePass.Program.Main (string[]) [0x00000] in <5d66ba0251d14667a0c40657d4207b0f#24F2AD31-CBA3-BEF0-77C8-0E39E25C90C4>:0
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x0004e] in <5d66ba0251d14667a0c40657d4207b0f#24F2AD31-CBA3-BEF0-77C8-0E39E25C90C4>:0
/proc/self/maps:
414e6000-414f6000 rwxp 00000000 00:00 0 
41b1c000-41b2c000 rwxp 00000000 00:00 0 
56187889d000-5618788c7000 r--p 00000000 08:06 1194922                    /usr/bin/mono-sgen
5618788c7000-561878bb2000 r-xp 0002a000 08:06 1194922                    /usr/bin/mono-sgen
561878bb2000-561878cd3000 r--p 00315000 08:06 1194922                    /usr/bin/mono-sgen
561878cd3000-561878cdb000 r--p 00435000 08:06 1194922                    /usr/bin/mono-sgen
561878cdb000-561878cdf000 rw-p 0043d000 08:06 1194922                    /usr/bin/mono-sgen
561878cdf000-561878cf5000 rw-p 00000000 00:00 0 
56187a18d000-56187a2c8000 rw-p 00000000 00:00 0                          [heap]
7f47fc000000-7f47fc021000 rw-p 00000000 00:00 0 
7f47fc021000-7f4800000000 ---p 00000000 00:00 0 
7f4800ce6000-7f4800d5c000 r--p 00000000 08:06 2103774                    /usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
7f4800d5c000-7f480105e000 r--p 00000000 08:06 2103812                    /usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
7f480105e000-7f4801321000 r--p 00000000 08:06 2103814                    /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
7f4801321000-7f48015e5000 r--p 00000000 08:06 2103810                    /usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
7f48015e5000-7f480191d000 r-xp 00000000 08:06 1315844                    /usr/share/keepass/KeePass.exe.so
7f480191d000-7f4801b1c000 ---p 00338000 08:06 1315844                    /usr/share/keepass/KeePass.exe.so
7f4801b1c000-7f4801b1d000 r--p 00337000 08:06 1315844                    /usr/share/keepass/KeePass.exe.so
7f4801b1d000-7f4801b1e000 rw-p 00338000 08:06 1315844                    /usr/share/keepass/KeePass.exe.so
7f4801b1e000-7f4801b40000 rw-p 00000000 00:00 0 
7f4801b40000-7f4801e33000 r--p 00000000 08:06 1315838                    /usr/share/keepass/KeePass.exe
7f4801e33000-7f4801e34000 ---p 00000000 00:00 0 
7f4801e34000-7f4801e35000 rw-p 00000000 00:00 0 
7f4801e35000-7f4801e3d000 ---p 00000000 00:00 0 
7f4801e3d000-7f48020b4000 rw-p 00000000 00:00 0 
7f48020b8000-7f48020b9000 r--p 00000000 08:06 1980237                    /usr/lib/mono/4.5/mscorlib.dll.so
7f48020b9000-7f4802506000 r-xp 00001000 08:06 1980237                    /usr/lib/mono/4.5/mscorlib.dll.so
7f4802506000-7f4802804000 r--p 0044e000 08:06 1980237                    /usr/lib/mono/4.5/mscorlib.dll.so
7f4802804000-7f4802805000 r--p 0074b000 08:06 1980237                    /usr/lib/mono/4.5/mscorlib.dll.so
7f4802805000-7f4802806000 rw-p 0074c000 08:06 1980237                    /usr/lib/mono/4.5/mscorlib.dll.so
7f4802806000-7f480282d000 rw-p 00000000 00:00 0 
7f480282d000-7f4802bff000 r--p 00000000 08:06 1980236                    /usr/lib/mono/4.5/mscorlib.dll
7f4802bff000-7f4803bff000 rw-p 00000000 00:00 0 
7f4803bff000-7f4803c00000 ---p 00000000 00:00 0 
7f4803c00000-7f4804800000 rw-p 00000000 00:00 0 
7f480483c000-7f480483f000 r--p 00000000 08:06 2103241                    /usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
7f480483f000-7f4804873000 rw-p 00000000 00:00 0 
7f4804873000-7f48048d2000 ---p 00000000 00:00 0 
7f48048d2000-7f4804c0a000 r--p 00000000 08:06 1267830                    /usr/lib/locale/locale-archive
7f4804c0a000-7f4804c0f000 rw-p 00000000 00:00 0 
7f4804c0f000-7f4804c31000 r--p 00000000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804c31000-7f4804d7c000 r-xp 00022000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804d7c000-7f4804dc8000 r--p 0016d000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804dc8000-7f4804dc9000 ---p 001b9000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804dc9000-7f4804dcd000 r--p 001b9000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804dcd000-7f4804dcf000 rw-p 001bd000 08:06 1187141                    /usr/lib/libc-2.28.so
7f4804dcf000-7f4804dd3000 rw-p 00000000 00:00 0 
7f4804dd3000-7f4804dd6000 r--p 00000000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804dd6000-7f4804de7000 r-xp 00003000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804de7000-7f4804dea000 r--p 00014000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804dea000-7f4804deb000 ---p 00017000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804deb000-7f4804dec000 r--p 00017000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804dec000-7f4804ded000 rw-p 00018000 08:06 1180991                    /usr/lib/libgcc_s.so.1
7f4804ded000-7f4804df3000 r--p 00000000 08:06 1190518                    /usr/lib/libpthread-2.28.so
7f4804df3000-7f4804e02000 r-xp 00006000 08:06 1190518                    /usr/lib/libpthread-2.28.so
7f4804e02000-7f4804e08000 r--p 00015000 08:06 1190518                    /usr/lib/libpthread-2.28.so
7f4804e08000-7f4804e09000 r--p 0001a000 08:06 1190518                    /usr/lib/libpthread-2.28.so
7f4804e09000-7f4804e0a000 rw-p 0001b000 08:06 1190518                    /usr/lib/libpthread-2.28.so
7f4804e0a000-7f4804e0e000 rw-p 00000000 00:00 0 
7f4804e0e000-7f4804e0f000 r--p 00000000 08:06 1187150                    /usr/lib/libdl-2.28.so
7f4804e0f000-7f4804e10000 r-xp 00001000 08:06 1187150                    /usr/lib/libdl-2.28.so
7f4804e10000-7f4804e11000 r--p 00002000 08:06 1187150                    /usr/lib/libdl-2.28.so
7f4804e11000-7f4804e12000 r--p 00002000 08:06 1187150                    /usr/lib/libdl-2.28.so
7f4804e12000-7f4804e13000 rw-p 00003000 08:06 1187150                    /usr/lib/libdl-2.28.so
7f4804e13000-7f4804e15000 r--p 00000000 08:06 1207694                    /usr/lib/librt-2.28.so
7f4804e15000-7f4804e19000 r-xp 00002000 08:06 1207694                    /usr/lib/librt-2.28.so
7f4804e19000-7f4804e1b000 r--p 00006000 08:06 1207694                    /usr/lib/librt-2.28.so
7f4804e1b000-7f4804e1c000 r--p 00007000 08:06 1207694                    /usr/lib/librt-2.28.so
7f4804e1c000-7f4804e1d000 rw-p 00008000 08:06 1207694                    /usr/lib/librt-2.28.so
7f4804e1d000-7f4804e2a000 r--p 00000000 08:06 1188117                    /usr/lib/libm-2.28.so
7f4804e2a000-7f4804ecb000 r-xp 0000d000 08:06 1188117                    /usr/lib/libm-2.28.so
7f4804ecb000-7f4804fa0000 r--p 000ae000 08:06 1188117                    /usr/lib/libm-2.28.so
7f4804fa0000-7f4804fa1000 r--p 00182000 08:06 1188117                    /usr/lib/libm-2.28.so
7f4804fa1000-7f4804fa2000 rw-p 00183000 08:06 1188117                    /usr/lib/libm-2.28.so
7f4804fa2000-7f4804fa8000 rw-p 00000000 00:00 0 
7f4804fa8000-7f4804feb000 rw-p 00000000 00:00 0 
7f4804feb000-7f4804fec000 rw-s 00000000 00:17 66                         /dev/shm/mono.10909
7f4804fec000-7f4804fee000 r--p 00000000 08:06 1187130                    /usr/lib/ld-2.28.so
7f4804fee000-7f480500d000 r-xp 00002000 08:06 1187130                    /usr/lib/ld-2.28.so
7f480500d000-7f4805015000 r--p 00021000 08:06 1187130                    /usr/lib/ld-2.28.so
7f4805015000-7f4805016000 r--p 00028000 08:06 1187130                    /usr/lib/ld-2.28.so
7f4805016000-7f4805017000 rw-p 00029000 08:06 1187130                    /usr/lib/ld-2.28.so
7f4805017000-7f4805018000 rw-p 00000000 00:00 0 
7ffe20ae0000-7ffe20ae8000 ---p 00000000 00:00 0 
7ffe212be000-7ffe212df000 rw-p 00000000 00:00 0                          [stack]
7ffe2137d000-7ffe21380000 r--p 00000000 00:00 0                          [vvar]
7ffe21380000-7ffe21382000 r-xp 00000000 00:00 0                          [vdso]

Native stacktrace:

	mono(+0xcb17b) [0x56187896817b]
	/usr/lib/libpthread.so.0(+0x123c0) [0x7f4804dff3c0]
	/usr/lib/libc.so.6(gsignal+0x10f) [0x7f4804c46d7f]
	/usr/lib/libc.so.6(abort+0x125) [0x7f4804c31672]
	mono(+0x2a20d) [0x5618788c720d]
	mono(monoeg_g_logv+0x4e) [0x561878ba84ae]
	mono(monoeg_assertion_message+0xe5) [0x561878ba8695]
	mono(+0xb7085) [0x561878954085]
	mono(+0xbc146) [0x561878959146]
	mono(mono_class_init+0x13e) [0x561878a4df2e]
	mono(+0x246263) [0x561878ae3263]
	mono(+0x24657a) [0x561878ae357a]
	mono(+0x2467d5) [0x561878ae37d5]
	mono(mono_method_verify+0x7447) [0x561878aed847]
	mono(+0x147ade) [0x5618789e4ade]
	mono(+0x14a7e6) [0x5618789e77e6]
	mono(+0x14cc35) [0x5618789e9c35]
	mono(+0x2f413) [0x5618788cc413]
	mono(+0xce877) [0x56187896b877]
	mono(+0xcf3ac) [0x56187896c3ac]
	[0x41b1c393]

Debug info from gdb:

[New LWP 10910]
[New LWP 10911]
warning: File "/usr/bin/mono-sgen-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/bin/mono-sgen-gdb.py
line to your configuration file "/home/philipp/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/philipp/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f4804dfed42 in waitpid () from /usr/lib/libpthread.so.0
  Id   Target Id         Frame 
* 1    Thread 0x7f4804c0a780 (LWP 10909) "mono" 0x00007f4804dfed42 in waitpid () from /usr/lib/libpthread.so.0
  2    Thread 0x7f48043ff700 (LWP 10910) "SGen worker" 0x00007f4804dfaafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
  3    Thread 0x7f4802033700 (LWP 10911) "Finalizer" 0x00007f4804dfd436 in do_futex_wait.constprop () from /usr/lib/libpthread.so.0

Thread 3 (Thread 0x7f4802033700 (LWP 10911)):
#0  0x00007f4804dfd436 in do_futex_wait.constprop () from /usr/lib/libpthread.so.0
#1  0x00007f4804dfd538 in __new_sem_wait_slow.constprop.0 () from /usr/lib/libpthread.so.0
#2  0x0000561878b25ad9 in ?? ()
#3  0x0000561878ad7f5c in ?? ()
#4  0x00007f4804df4a9d in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007f4804d0aa43 in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7f48043ff700 (LWP 10910)):
#0  0x00007f4804dfaafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x0000561878b88824 in ?? ()
#2  0x00007f4804df4a9d in start_thread () from /usr/lib/libpthread.so.0
#3  0x00007f4804d0aa43 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f4804c0a780 (LWP 10909)):
#0  0x00007f4804dfed42 in waitpid () from /usr/lib/libpthread.so.0
#1  0x0000561878968232 in ?? ()
#2  <signal handler called>
#3  0x00007f4804c46d7f in raise () from /usr/lib/libc.so.6
#4  0x00007f4804c31672 in abort () from /usr/lib/libc.so.6
#5  0x00005618788c720d in ?? ()
#6  0x0000561878ba84ae in monoeg_g_logv ()
#7  0x0000561878ba8695 in monoeg_assertion_message ()
#8  0x0000561878954085 in ?? ()
#9  0x0000561878959146 in ?? ()
#10 0x0000561878a4df2e in mono_class_init ()
#11 0x0000561878ae3263 in ?? ()
#12 0x0000561878ae357a in ?? ()
#13 0x0000561878ae37d5 in ?? ()
#14 0x0000561878aed847 in mono_method_verify ()
#15 0x00005618789e4ade in ?? ()
#16 0x00005618789e77e6 in ?? ()
#17 0x00005618789e9c35 in ?? ()
#18 0x00005618788cc413 in ?? ()
#19 0x000056187896b877 in ?? ()
#20 0x000056187896c3ac in ?? ()
#21 0x0000000041b1c393 in ?? ()
#22 0x000056187a1b2215 in ?? ()
#23 0x0000561878a985f0 in ?? ()
#24 0x0000000000000000 in ?? ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

[1]    10909 abort (core dumped)  keepass
@klockeph klockeph changed the title Keepass crashes on startup ( Keepass crashes on startup (AOT Assertion Fail) Aug 20, 2018
@piratenpanda
Copy link

uninstalling and reinstalling keepass got rid of this error for me on arch

@klockeph
Copy link
Author

@piratenpanda oh wow, that actually did the trick... Thanks!

@psi-4ward
Copy link

Thanks!

@lewurm
Copy link
Contributor

lewurm commented Aug 30, 2018

That sounds like a packaging issue then. Like the assert says: Image out of date. Maybe assemblies haven't been recompiled (by the AOT compiler) when the package got updated? Another workaround could be to pass -O=-aot to disable loading stuff from the AOT image at all. This can be sneaked in like this:

$ MONO_ENV_OPTIONS=-O=-aot <keepass-binary-name> <args>

My theory is the following happened:

  1. mono version A is installed on the system
  2. keepass is installed, uses the AOT compiler to precompile assemblies
  3. mono gets updated to version B
  4. AOT images compiled by mono version A aren't compatible with version B.

Could someone verify this theory? The fix would be that every package that depends on mono must be reinstalled. Not sure if you can express that in PKGBUILD and also it sounds horrible.

Regardless, AOT is not necessary for keepass imho, so best to avoid it.

@fuelflo
Copy link

fuelflo commented Sep 11, 2019

Yupp, I had the same problem.

  1. mono 6.0.0.319 and keepass 2.42.1: working fine
  2. after upgrade to mono 6.0.0.327: aot insertion fail

x) going back to mono 6.0.0.319: keepass works fine again
y) reinstalling keepass after upgrade to mono 6.0.0.327: keepass also works again

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

7 participants