Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

crash after logout #2480

Closed
PKEv opened this issue Oct 28, 2015 · 16 comments
Closed

crash after logout #2480

PKEv opened this issue Oct 28, 2015 · 16 comments
Labels
C-bug The issue contains a bug report C-crash The issue contains a crash report P-medium

Comments

@PKEv
Copy link
Contributor

PKEv commented Oct 28, 2015

if logout from context menu in tray - program crash

@zetok
Copy link
Contributor

zetok commented Oct 30, 2015

Can reproduce on Gentoo with Qt 5.4.2.

Problem disappeared for @tux3 after update to Qt 5.5.1 on Linux.

Given that, @Zer0-One should see whether using it for qTox builds on jenkins is feasible (no regressions, etc).

@zetok zetok added C-bug The issue contains a bug report upstream The problem is with a component from a 3rd party labels Oct 30, 2015
@agilob
Copy link
Contributor

agilob commented Oct 30, 2015

Can you give stacktrace? I cant reproduce it :<

@ovalseven8
Copy link
Contributor

When I logout in the profile menu in qTox, everything works fine. But when I use the tray context menu, it doesn't work.

Perhaps because of that error that occurs?

*** Error in `./qtox': malloc(): memory corruption (fast): 0x0000000003db12ff ***

Additional information:

#0  0x00007ffff5536cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff553a0d8 in __GI_abort () at abort.c:89
#2  0x00007ffff5573394 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff5681b28 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff557e0f7 in malloc_printerr (action=<optimized out>, str=0x7ffff5681ec8 "malloc(): memory corruption (fast)", ptr=<optimized out>) at malloc.c:4996
#4  0x00007ffff5580e04 in _int_malloc (av=0x7ffff58be760 <main_arena>, bytes=16) at malloc.c:3359
#5  0x00007ffff55827b0 in __GI___libc_malloc (bytes=16) at malloc.c:2891
#6  0x00007ffff75a0e42 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#7  0x00007ffff759edd7 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#8  0x00007ffff75a03ff in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#9  0x00007ffff75a0512 in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#10 0x0000000000d57360 in ?? ()
#11 0x00000000011321e8 in ?? ()
#12 0x0000000000de7359 in ?? ()
#13 0x0000000000de7c26 in ?? ()
#14 0x0000000000df0724 in ?? ()
#15 0x0000000000e3fdba in ?? ()
#16 0x0000000000e423ab in ?? ()
#17 0x0000000000debdac in ?? ()
#18 0x0000000000df0f70 in ?? ()
#19 0x0000000001828dcb in ?? ()
#20 0x0000000001139105 in ?? ()
#21 0x000000000113ac65 in ?? ()
#22 0x000000000111df14 in ?? ()
#23 0x0000000000da2050 in ?? ()
#24 0x00007ffff629fe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff62a0048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff62a00ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x0000000001875227 in ?? ()
#28 0x0000000001826699 in ?? ()
#29 0x000000000182ea1c in ?? ()
#30 0x000000000044f85a in ?? ()
#31 0x00007ffff5521ec5 in __libc_start_main (main=0x44ee00, argc=1, argv=0x7fffffffe098, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffe088) at libc-start.c:287
#32 0x0000000000450bda in ?? ()

@ovalseven8
Copy link
Contributor

@agilob @tux3

Further information:
When you want to restart qTox after you logged out using the new context menu (crashed), the command ./qtox doesn't work the first time:

src/ipc.cpp:258 : Debug: Previous owner timed out, taking ownership 991278542588902868 -> 10054594020571218546

You have to type in ./qtox once again, then qTox is starting.

@agilob
Copy link
Contributor

agilob commented Nov 5, 2015

@ovalseven8 what desktop evn. do you use?

@ovalseven8
Copy link
Contributor

@agilob: I am using Lubuntu 14.04. But I don't think that it has something to do with LXDE etc.

@agilob
Copy link
Contributor

agilob commented Nov 5, 2015

on kde5 and gnome3 it works fine, it's DE or Qt version.

@ovalseven8
Copy link
Contributor

Compiled qTox on Kubuntu 15.10 (Qt 5.4.2) and everything works well. So, perhaps it has something to do with the DE. What we know so far is that it's definitely not an upstream issue.

Nonetheless, perhaps could someone look through the information I posted here. @agilob @tux3
I'm not sure, but the information looks like it's fixable anyway!

@agilob
Copy link
Contributor

agilob commented Nov 6, 2015

@dmshynk maybe do you know anything about it?

@TheNain38
Copy link
Contributor

It also happens for me on Windows 8.1 64-bits 09a9b16

@towlie
Copy link
Contributor

towlie commented Nov 6, 2015

Also happens on windows 7 with qt 5.5.1

@towlie
Copy link
Contributor

towlie commented Nov 7, 2015

@dmshynk No it doesn't fix it.
Strange is that it only crashes if you logout from tray. So I guess something goes wrong when it removes the tray while the context menu is open?

@towlie
Copy link
Contributor

towlie commented Nov 7, 2015

This is my backtrace: Windows 7 qt5.5.0
https://gist.github.com/towlie/9b919c61630e1762721f

@tux3
Copy link
Member

tux3 commented Nov 7, 2015

@towlie Thanks for the debug backtrace, now I think I understand the problem, lemme write that down in a 5AM braindump so I don't forget.
When someone clicks on the logout button in the system tray icon, it calls the function that destroys everything while we're sitting on a call stack that goes through the system tray icon to handle Qt's mouse event. By the time we're done logging out, Qt resumes doing its event magic and finds out the world disappeared under its feet, so that would be the blatant use after free that crashed in your backtrace.
So let's do it async. Get logout event, freeze the GUI, find a better call stack (Nexus queud slot?), and kill things from there.

@zetok
Copy link
Contributor

zetok commented Jun 29, 2016

Still reproducible on 4f493c5

[20:52:10.831] src/persistence/profile.cpp:308 : Debug: Saving tox save to  "/home/zetok/.config/tox/zetok.tox"
[Thread 0x7fffbf7fe700 (LWP 9565) exited]
[Thread 0x7fffbe71c700 (LWP 9566) exited]
[20:52:11.509] src/persistence/settings.cpp:505 : Debug: Saving personal settings at  "/home/zetok/.config/tox/zetok.ini"
[Thread 0x7fffd99b4700 (LWP 9414) exited]
*** Error in `/usr/bin/qtox': malloc(): memory corruption (fast): 0x000055555c1c094f ***
======= Backtrace: =========
/lib64/libc.so.6(+0x769ff)[0x7ffff2bac9ff]
/lib64/libc.so.6(+0x7ca76)[0x7ffff2bb2a76]
/lib64/libc.so.6(+0x7ef45)[0x7ffff2bb4f45]
/lib64/libc.so.6(__libc_malloc+0x8c)[0x7ffff2bb66fc]
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6(_Znwm+0x2f)[0x7ffff322ee3f]
/usr/lib64/libQt5Core.so.5(_ZN7QLocale6systemEv+0x2f)[0x7ffff3815dff]
/usr/lib64/libQt5Core.so.5(_ZNK5QTime8toStringERK7QString+0x42)[0x7ffff37f25ea]
/usr/bin/qtox(+0x61c55)[0x5555555b5c55]
/usr/lib64/libQt5Core.so.5(+0x95969)[0x7ffff3799969]
/usr/lib64/libQt5Core.so.5(+0x95b2e)[0x7ffff3799b2e]
/usr/lib64/libQt5Core.so.5(_ZNK14QMessageLogger5fatalEPKcz+0xc3)[0x7ffff379b653]
/usr/lib64/libQt5Core.so.5(+0x91fde)[0x7ffff3795fde]
/usr/lib64/libQt5Core.so.5(_ZN15QtSharedPointer20ExternalRefCountData9getAndRefEPK7QObject+0xb4)[0x7ffff3836794]
/usr/lib64/libQt5Widgets.so.5(+0x1cfb47)[0x7ffff4459b47]
/usr/lib64/libQt5Widgets.so.5(+0x1d270b)[0x7ffff445c70b]
/usr/lib64/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xac)[0x7ffff43ee19c]
/usr/lib64/libQt5Widgets.so.5(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x342)[0x7ffff43f3dd2]
/usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x9c)[0x7ffff398149c]
/usr/lib64/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE+0x40d)[0x7ffff3e5833d]
/usr/lib64/libQt5Gui.so.5(_ZN22QGuiApplicationPrivate24processWindowSystemEventEPN29QWindowSystemInterfacePrivate17WindowSystemEventE+0x10d)[0x7ffff3e5a0bd]
/usr/lib64/libQt5Gui.so.5(_ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x48)[0x7ffff3e3bb10]
/usr/lib64/libQt5XcbQpa.so.5(+0x747f3)[0x7fffe26927f3]
/usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x23b)[0x7fffeb64e283]
/usr/lib64/libglib-2.0.so.0(+0x4d570)[0x7fffeb64e570]
/usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x42)[0x7fffeb64e642]
/usr/lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x6e)[0x7ffff39d9e5e]
/usr/lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x113)[0x7ffff397f6e3]
/usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0xa6)[0x7ffff3987e1e]
/usr/bin/qtox(main+0x12b7)[0x5555555b7336]
/lib64/libc.so.6(__libc_start_main+0x114)[0x7ffff2b56714]
/usr/bin/qtox(+0x50249)[0x5555555a4249]
======= Memory map: ========
555555554000-555555b7c000 r-xp 00000000 fd:00 1180241                    /usr/bin/qtox
555555d7b000-555555d8d000 r--p 00627000 fd:00 1180241                    /usr/bin/qtox
555555d8d000-555555d8e000 rw-p 00639000 fd:00 1180241                    /usr/bin/qtox
555555d8e000-55555ca8e000 rw-p 00000000 00:00 0                          [heap]
7fffaf84a000-7fffafc4b000 rw-p 00000000 00:00 0 
7fffafc4b000-7fffb0000000 r--p 00000000 fd:00 13000896                   /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf
7fffb0000000-7fffb0230000 rw-p 00000000 00:00 0 
7fffb0230000-7fffb4000000 ---p 00000000 00:00 0 
7fffb4000000-7fffb4021000 rw-p 00000000 00:00 0 
7fffb4021000-7fffb8000000 ---p 00000000 00:00 0 
7fffb8000000-7fffb8021000 rw-p 00000000 00:00 0 
7fffb8021000-7fffbc000000 ---p 00000000 00:00 0 
7fffbc0ec000-7fffbc318000 rw-p 00000000 00:00 0 
7fffbc318000-7fffbd363000 r--p 00000000 fd:00 13001080                   /usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc
7fffbd363000-7fffbdf1c000 r--p 00000000 fd:00 3145732                    /usr/share/fonts/unifont/unifont.ttf
7fffbdf1c000-7fffbdf1d000 ---p 00000000 00:00 0 
7fffbdf1d000-7fffbe71d000 rw-p 00000000 00:00 0 
7fffbed14000-7fffbed97000 rw-p 00000000 00:00 0 
7fffbee18000-7fffbee7f000 r--p 00000000 fd:00 2903886                    /usr/share/fonts/noto/NotoEmoji-Regular.ttf
7fffbee7f000-7fffbeffe000 rw-p 00000000 00:00 0 
7fffbeffe000-7fffbefff000 ---p 00000000 00:00 0 
7fffbefff000-7fffbf7ff000 rw-p 00000000 00:00 0 
7fffbf7ff000-7fffbf800000 ---p 00000000 00:00 0 
7fffbf800000-7fffc0000000 rw-p 00000000 00:00 0 
7fffc0000000-7fffc0e36000 rw-p 00000000 00:00 0 
7fffc0e36000-7fffc4000000 ---p 00000000 00:00 0 
7fffc4049000-7fffc41ae000 rw-p 00000000 00:00 0 
7fffc4363000-7fffc4464000 rw-p 00000000 00:00 0 
7fffc4464000-7fffc4465000 ---p 00000000 00:00 0 
7fffc4465000-7fffc4c65000 rw-p 00000000 00:00 0 
7fffc4c65000-7fffc4c69000 r-xp 00000000 fd:00 1321341                    /usr/lib64/libtxc_dxtn.so
7fffc4c69000-7fffc4e68000 ---p 00004000 fd:00 1321341                    /usr/lib64/libtxc_dxtn.so
7fffc4e68000-7fffc4e69000 r--p 00003000 fd:00 1321341                    /usr/lib64/libtxc_dxtn.so
7fffc4e69000-7fffc4e6a000 rw-p 00004000 fd:00 1321341                    /usr/lib64/libtxc_dxtn.so
7fffc4e6a000-7fffc4e6b000 ---p 00000000 00:00 0 
7fffc4e6b000-7fffc566b000 rw-p 00000000 00:00 0 
7fffc566b000-7fffc56bf000 r-xp 00000000 fd:00 12992538                   /lib64/libncurses.so.5.9
7fffc56bf000-7fffc58bf000 ---p 00054000 fd:00 12992538                   /lib64/libncurses.so.5.9
7fffc58bf000-7fffc58c3000 r--p 00054000 fd:00 12992538                   /lib64/libncurses.so.5.9
7fffc58c3000-7fffc58c4000 rw-p 00058000 fd:00 12992538                   /lib64/libncurses.so.5.9
7fffc58c4000-7fffc59bf000 r-xp 00000000 fd:00 1317992                    /usr/lib64/libLLVMSupport.so.3.8.0
7fffc59bf000-7fffc5bbf000 ---p 000fb000 fd:00 1317992                    /usr/lib64/libLLVMSupport.so.3.8.0
7fffc5bbf000-7fffc5bc6000 r--p 000fb000 fd:00 1317992                    /usr/lib64/libLLVMSupport.so.3.8.0
7fffc5bc6000-7fffc5bc7000 rw-p 00102000 fd:00 1317992                    /usr/lib64/libLLVMSupport.so.3.8.0
7fffc5bc7000-7fffc5bc9000 rw-p 00000000 00:00 0 
7fffc5bc9000-7fffc5e74000 r-xp 00000000 fd:00 1317994                    /usr/lib64/libLLVMCore.so.3.8.0
7fffc5e74000-7fffc6074000 ---p 002ab000 fd:00 1317994                    /usr/lib64/libLLVMCore.so.3.8.0
7fffc6074000-7fffc6089000 r--p 002ab000 fd:00 1317994                    /usr/lib64/libLLVMCore.so.3.8.0
7fffc6089000-7fffc608a000 rw-p 002c0000 fd:00 1317994                    /usr/lib64/libLLVMCore.so.3.8.0
7fffc608a000-7fffc6119000 r-xp 00000000 fd:00 1318016                    /usr/lib64/libLLVMMC.so.3.8.0
7fffc6119000-7fffc6319000 ---p 0008f000 fd:00 1318016                    /usr/lib64/libLLVMMC.so.3.8.0
7fffc6319000-7fffc631d000 r--p 0008f000 fd:00 1318016                    /usr/lib64/libLLVMMC.so.3.8.0
7fffc631d000-7fffc631e000 rw-p 00093000 fd:00 1318016                    /usr/lib64/libLLVMMC.so.3.8.0
7fffc631e000-7fffc6365000 r-xp 00000000 fd:00 1318000                    /usr/lib64/libLLVMBitReader.so.3.8.0
7fffc6365000-7fffc6564000 ---p 00047000 fd:00 1318000                    /usr/lib64/libLLVMBitReader.so.3.8.0
7fffc6564000-7fffc6566000 r--p 00046000 fd:00 1318000                    /usr/lib64/libLLVMBitReader.so.3.8.0
7fffc6566000-7fffc6567000 rw-p 00048000 fd:00 1318000                    /usr/lib64/libLLVMBitReader.so.3.8.0
7fffc6567000-7fffc659b000 r-xp 00000000 fd:00 1318015                    /usr/lib64/libLLVMMCParser.so.3.8.0
7fffc659b000-7fffc679b000 ---p 00034000 fd:00 1318015                    /usr/lib64/libLLVMMCParser.so.3.8.0
7fffc679b000-7fffc679c000 r--p 00034000 fd:00 1318015                    /usr/lib64/libLLVMMCParser.so.3.8.0
7fffc679c000-7fffc679d000 rw-p 00035000 fd:00 1318015                    /usr/lib64/libLLVMMCParser.so.3.8.0
7fffc679d000-7fffc6811000 r-xp 00000000 fd:00 1318019                    /usr/lib64/libLLVMObject.so.3.8.0
7fffc6811000-7fffc6a10000 ---p 00074000 fd:00 1318019                    /usr/lib64/libLLVMObject.so.3.8.0
7fffc6a10000-7fffc6a13000 r--p 00073000 fd:00 1318019                    /usr/lib64/libLLVMObject.so.3.8.0
7fffc6a13000-7fffc6a14000 rw-p 00076000 fd:00 1318019                    /usr/lib64/libLLVMObject.so.3.8.0
7fffc6a14000-7fffc6a5f000 r-xp 00000000 fd:00 1318089                    /usr/lib64/libLLVMRuntimeDyld.so.3.8.0
7fffc6a5f000-7fffc6c5f000 ---p 0004b000 fd:00 1318089                    /usr/lib64/libLLVMRuntimeDyld.so.3.8.0
7fffc6c5f000-7fffc6c62000 r--p 0004b000 fd:00 1318089                    /usr/lib64/libLLVMRuntimeDyld.so.3.8.0
7fffc6c62000-7fffc6c63000 rw-p 0004e000 fd:00 1318089                    /usr/lib64/libLLVMRuntimeDyld.so.3.8.0
7fffc6c63000-7fffc6ec2000 r-xp 00000000 fd:00 1318014                    /usr/lib64/libLLVMAnalysis.so.3.8.0
7fffc6ec2000-7fffc70c1000 ---p 0025f000 fd:00 1318014                    /usr/lib64/libLLVMAnalysis.so.3.8.0
7fffc70c1000-7fffc70cc000 r--p 0025e000 fd:00 1318014                    /usr/lib64/libLLVMAnalysis.so.3.8.0
7fffc70cc000-7fffc70cd000 rw-p 00269000 fd:00 1318014                    /usr/lib64/libLLVMAnalysis.so.3.8.0
7fffc70cd000-7fffc70ce000 rw-p 00000000 00:00 0 
7fffc70ce000-7fffc70de000 r-xp 00000000 fd:00 1318088                    /usr/lib64/libLLVMTarget.so.3.8.0
7fffc70de000-7fffc72de000 ---p 00010000 fd:00 1318088                    /usr/lib64/libLLVMTarget.so.3.8.0
7fffc72de000-7fffc72df000 r--p 00010000 fd:00 1318088                    /usr/lib64/libLLVMTarget.so.3.8.0
7fffc72df000-7fffc72e0000 rw-p 00011000 fd:00 1318088                    /usr/lib64/libLLVMTarget.so.3.8.0
7fffc72e0000-7fffc7303000 r-xp 00000000 fd:00 1318025                    /usr/lib64/libLLVMExecutionEngine.so.3.8.0
7fffc7303000-7fffc7502000 ---p 00023000 fd:00 1318025                    /usr/lib64/libLLVMExecutionEngine.so.3.8.0
7fffc7502000-7fffc7504000 r--p 00022000 fd:00 1318025                    /usr/lib64/libLLVMExecutionEngine.so.3.8.0
7fffc7504000-7fffc7505000 rw-p 00024000 fd:00 1318025                    /usr/lib64/libLLVMExecutionEngine.so.3.8.0
7fffc7505000-7fffc7512000 r-xp 00000000 fd:00 1318027                    /usr/lib64/libLLVMMCJIT.so.3.8.0
7fffc7512000-7fffc7712000 ---p 0000d000 fd:00 1318027                    /usr/lib64/libLLVMMCJIT.so.3.8.0
7fffc7712000-7fffc7713000 r--p 0000d000 fd:00 1318027                    /usr/lib64/libLLVMMCJIT.so.3.8.0
7fffc7713000-7fffc7714000 rw-p 0000e000 fd:00 1318027                    /usr/lib64/libLLVMMCJIT.so.3.8.0
7fffc7714000-7fffc771d000 r-xp 00000000 fd:00 1319109                    /usr/lib64/libLLVMX86Utils.so.3.8.0
7fffc771d000-7fffc791c000 ---p 00009000 fd:00 1319109                    /usr/lib64/libLLVMX86Utils.so.3.8.0
7fffc791c000-7fffc791d000 r--p 00008000 fd:00 1319109                    /usr/lib64/libLLVMX86Utils.so.3.8.0
7fffc791d000-7fffc791e000 rw-p 00009000 fd:00 1319109                    /usr/lib64/libLLVMX86Utils.so.3.8.0
7fffc791e000-7fffc796c000 r-xp 00000000 fd:00 1319089                    /usr/lib64/libLLVMX86AsmPrinter.so.3.8.0
7fffc796c000-7fffc7b6b000 ---p 0004e000 fd:00 1319089                    /usr/lib64/libLLVMX86AsmPrinter.so.3.8.0
7fffc7b6b000-7fffc7b6c000 r--p 0004d000 fd:00 1319089                    /usr/lib64/libLLVMX86AsmPrinter.so.3.8.0
7fffc7b6c000-7fffc7b6d000 rw-p 0004e000 fd:00 1319089                    /usr/lib64/libLLVMX86AsmPrinter.so.3.8.0
7fffc7b6d000-7fffc7b6e000 r-xp 00000000 fd:00 1319108                    /usr/lib64/libLLVMX86Info.so.3.8.0
7fffc7b6e000-7fffc7d6d000 ---p 00001000 fd:00 1319108                    /usr/lib64/libLLVMX86Info.so.3.8.0
7fffc7d6d000-7fffc7d6e000 r--p 00000000 fd:00 1319108                    /usr/lib64/libLLVMX86Info.so.3.8.0
7fffc7d6e000-7fffc7d6f000 rw-p 00001000 fd:00 1319108                    /usr/lib64/libLLVMX86Info.so.3.8.0
7fffc7d6f000-7fffc7d75000 r-xp 00000000 fd:00 1318017                    /usr/lib64/libLLVMMCDisassembler.so.3.8.0
7fffc7d75000-7fffc7f75000 ---p 00006000 fd:00 1318017                    /usr/lib64/libLLVMMCDisassembler.so.3.8.0
7fffc7f75000-7fffc7f76000 r--p 00006000 fd:00 1318017                    /usr/lib64/libLLVMMCDisassembler.so.3.8.0
7fffc7f76000-7fffc7f77000 rw-p 00007000 fd:00 1318017                    /usr/lib64/libLLVMMCDisassembler.so.3.8.0
7fffc7f77000-7fffc806f000 r-xp 00000000 fd:00 1319107                    /usr/lib64/libLLVMX86Desc.so.3.8.0
7fffc806f000-7fffc826e000 ---p 000f8000 fd:00 1319107                    /usr/lib64/libLLVMX86Desc.so.3.8.0
7fffc826e000-7fffc8353000 r--p 000f7000 fd:00 1319107                    /usr/lib64/libLLVMX86Desc.so.3.8.0
7fffc8353000-7fffc8354000 rw-p 001dc000 fd:00 1319107                    /usr/lib64/libLLVMX86Desc.so.3.8.0
7fffc8354000-7fffc8355000 rw-p 00000000 00:00 0 
7fffc8355000-7fffc8384000 r-xp 00000000 fd:00 1318003                    /usr/lib64/libLLVMBitWriter.so.3.8.0
7fffc8384000-7fffc8583000 ---p 0002f000 fd:00 1318003                    /usr/lib64/libLLVMBitWriter.so.3.8.0
7fffc8583000-7fffc8584000 r--p 0002e000 fd:00 1318003                    /usr/lib64/libLLVMBitWriter.so.3.8.0
7fffc8584000-7fffc8585000 rw-p 0002f000 fd:00 1318003                    /usr/lib64/libLLVMBitWriter.so.3.8.0
7fffc8585000-7fffc8681000 r-xp 00000000 fd:00 1318004                    /usr/lib64/libLLVMTransformUtils.so.3.8.0
7fffc8681000-7fffc8880000 ---p 000fc000 fd:00 1318004                    /usr/lib64/libLLVMTransformUtils.so.3.8.0
7fffc8880000-7fffc8884000 r--p 000fb000 fd:00 1318004                    /usr/lib64/libLLVMTransformUtils.so.3.8.0
7fffc8884000-7fffc8885000 rw-p 000ff000 fd:00 1318004                    /usr/lib64/libLLVMTransformUtils.so.3.8.0
7fffc8885000-7fffc88d0000 r-xp 00000000 fd:00 1319177                    /usr/lib64/libLLVMProfileData.so.3.8.0
7fffc88d0000-7fffc8acf000 ---p 0004b000 fd:00 1319177                    /usr/lib64/libLLVMProfileData.so.3.8.0
7fffc8acf000-7fffc8ad1000 r--p 0004a000 fd:00 1319177                    /usr/lib64/libLLVMProfileData.so.3.8.0
7fffc8ad1000-7fffc8ad2000 rw-p 0004c000 fd:00 1319177                    /usr/lib64/libLLVMProfileData.so.3.8.0
7fffc8ad2000-7fffc8b65000 r-xp 00000000 fd:00 1318005                    /usr/lib64/libLLVMInstrumentation.so.3.8.0
7fffc8b65000-7fffc8d64000 ---p 00093000 fd:00 1318005                    /usr/lib64/libLLVMInstrumentation.so.3.8.0
7fffc8d64000-7fffc8d67000 r--p 00092000 fd:00 1318005                    /usr/lib64/libLLVMInstrumentation.so.3.8.0
7fffc8d67000-7fffc8d68000 rw-p 00095000 fd:00 1318005                    /usr/lib64/libLLVMInstrumentation.so.3.8.0
7fffc8d68000-7fffc8d6a000 rw-p 00000000 00:00 0 
7fffc8d6a000-7fffc8e36000 r-xp 00000000 fd:00 1318006                    /usr/lib64/libLLVMInstCombine.so.3.8.0
7fffc8e36000-7fffc9036000 ---p 000cc000 fd:00 1318006                    /usr/lib64/libLLVMInstCombine.so.3.8.0
7fffc9036000-7fffc9038000 r--p 000cc000 fd:00 1318006                    /usr/lib64/libLLVMInstCombine.so.3.8.0
7fffc9038000-7fffc9039000 rw-p 000ce000 fd:00 1318006                    /usr/lib64/libLLVMInstCombine.so.3.8.0
7fffc9039000-7fffc91ec000 r-xp 00000000 fd:00 1318010                    /usr/lib64/libLLVMScalarOpts.so.3.8.0
7fffc91ec000-7fffc93ec000 ---p 001b3000 fd:00 1318010                    /usr/lib64/libLLVMScalarOpts.so.3.8.0
7fffc93ec000-7fffc93f2000 r--p 001b3000 fd:00 1318010                    /usr/lib64/libLLVMScalarOpts.so.3.8.0
7fffc93f2000-7fffc93f3000 rw-p 001b9000 fd:00 1318010                    /usr/lib64/libLLVMScalarOpts.so.3.8.0
7fffc93f3000-7fffc93f5000 rw-p 00000000 00:00 0 
7fffc93f5000-7fffc972e000 r-xp 00000000 fd:00 1317997                    /usr/lib64/libLLVMCodeGen.so.3.8.0
7fffc972e000-7fffc992e000 ---p 00339000 fd:00 1317997                    /usr/lib64/libLLVMCodeGen.so.3.8.0
7fffc992e000-7fffc993c000 r--p 00339000 fd:00 1317997                    /usr/lib64/libLLVMCodeGen.so.3.8.0
7fffc993c000-7fffc993d000 rw-p 00347000 fd:00 1317997                    /usr/lib64/libLLVMCodeGen.so.3.8.0
7fffc993d000-7fffc9942000 rw-p 00000000 00:00 0 
7fffc9942000-7fffc99cd000 r-xp 00000000 fd:00 1317998                    /usr/lib64/libLLVMAsmPrinter.so.3.8.0
7fffc99cd000-7fffc9bcd000 ---p 0008b000 fd:00 1317998                    /usr/lib64/libLLVMAsmPrinter.so.3.8.0
7fffc9bcd000-7fffc9bd0000 r--p 0008b000 fd:00 1317998                    /usr/lib64/libLLVMAsmPrinter.so.3.8.0
7fffc9bd0000-7fffc9bd1000 rw-p 0008e000 fd:00 1317998                    /usr/lib64/libLLVMAsmPrinter.so.3.8.0
7fffc9bd1000-7fffc9e04000 r-xp 00000000 fd:00 1317993                    /usr/lib64/libLLVMSelectionDAG.so.3.8.0
7fffc9e04000-7fffca004000 ---p 00233000 fd:00 1317993                    /usr/lib64/libLLVMSelectionDAG.so.3.8.0
7fffca004000-7fffca008000 r--p 00233000 fd:00 1317993                    /usr/lib64/libLLVMSelectionDAG.so.3.8.0
7fffca008000-7fffca009000 rw-p 00237000 fd:00 1317993                    /usr/lib64/libLLVMSelectionDAG.so.3.8.0
7fffca009000-7fffca00a000 rw-p 00000000 00:00 0 
7fffca00a000-7fffca253000 r-xp 00000000 fd:00 1319104                    /usr/lib64/libLLVMX86CodeGen.so.3.8.0
7fffca253000-7fffca452000 ---p 00249000 fd:00 1319104                    /usr/lib64/libLLVMX86CodeGen.so.3.8.0
7fffca452000-7fffca45b000 r--p 00248000 fd:00 1319104                    /usr/lib64/libLLVMX86CodeGen.so.3.8.0
7fffca45b000-7fffca45c000 rw-p 00251000 fd:00 1319104                    /usr/lib64/libLLVMX86CodeGen.so.3.8.0
7fffca45c000-7fffca502000 r-xp 00000000 fd:00 1319087                    /usr/lib64/libLLVMX86AsmParser.so.3.8.0
7fffca502000-7fffca701000 ---p 000a6000 fd:00 1319087                    /usr/lib64/libLLVMX86AsmParser.so.3.8.0
7fffca701000-7fffca702000 r--p 000a5000 fd:00 1319087                    /usr/lib64/libLLVMX86AsmParser.so.3.8.0
7fffca702000-7fffca703000 rw-p 000a6000 fd:00 1319087                    /usr/lib64/libLLVMX86AsmParser.so.3.8.0
7fffca703000-7fffca867000 r-xp 00000000 fd:00 1319096                    /usr/lib64/libLLVMX86Disassembler.so.3.8.0
7fffca867000-7fffcaa67000 ---p 00164000 fd:00 1319096                    /usr/lib64/libLLVMX86Disassembler.so.3.8.0
7fffcaa67000-7fffcaa68000 r--p 00164000 fd:00 1319096                    /usr/lib64/libLLVMX86Disassembler.so.3.8.0
7fffcaa68000-7fffcaa69000 rw-p 00165000 fd:00 1319096                    /usr/lib64/libLLVMX86Disassembler.so.3.8.0
7fffcaa69000-7fffcaa6c000 r-xp 00000000 fd:00 1318091                    /usr/lib64/libLLVMBPFAsmPrinter.so.3.8.0
7fffcaa6c000-7fffcac6b000 ---p 00003000 fd:00 1318091                    /usr/lib64/libLLVMBPFAsmPrinter.so.3.8.0
7fffcac6b000-7fffcac6c000 r--p 00002000 fd:00 1318091                    /usr/lib64/libLLVMBPFAsmPrinter.so.3.8.0
7fffcac6c000-7fffcac6d000 rw-p 00003000 fd:00 1318091                    /usr/lib64/libLLVMBPFAsmPrinter.so.3.8.0
7fffcac6d000-7fffcac6e000 r-xp 00000000 fd:00 1318092                    /usr/lib64/libLLVMBPFInfo.so.3.8.0
7fffcac6e000-7fffcae6d000 ---p 00001000 fd:00 1318092                    /usr/lib64/libLLVMBPFInfo.so.3.8.0
7fffcae6d000-7fffcae6e000 r--p 00000000 fd:00 1318092                    /usr/lib64/libLLVMBPFInfo.so.3.8.0
7fffcae6e000-7fffcae6f000 rw-p 00001000 fd:00 1318092                    /usr/lib64/libLLVMBPFInfo.so.3.8.0
7fffcae6f000-7fffcae76000 r-xp 00000000 fd:00 1318093                    /usr/lib64/libLLVMBPFDesc.so.3.8.0
7fffcae76000-7fffcb076000 ---p 00007000 fd:00 1318093                    /usr/lib64/libLLVMBPFDesc.so.3.8.0
7fffcb076000-7fffcb078000 r--p 00007000 fd:00 1318093                    /usr/lib64/libLLVMBPFDesc.so.3.8.0
7fffcb078000-7fffcb079000 rw-p 00009000 fd:00 1318093                    /usr/lib64/libLLVMBPFDesc.so.3.8.0
7fffcb079000-7fffcb099000 r-xp 00000000 fd:00 1318090                    /usr/lib64/libLLVMBPFCodeGen.so.3.8.0
7fffcb099000-7fffcb298000 ---p 00020000 fd:00 1318090                    /usr/lib64/libLLVMBPFCodeGen.so.3.8.0
7fffcb298000-7fffcb29b000 r--p 0001f000 fd:00 1318090                    /usr/lib64/libLLVMBPFCodeGen.so.3.8.0
7fffcb29b000-7fffcb29c000 rw-p 00022000 fd:00 1318090                    /usr/lib64/libLLVMBPFCodeGen.so.3.8.0
7fffcb29c000-7fffcb29d000 r-xp 00000000 fd:00 1318095                    /usr/lib64/libLLVMCppBackendInfo.so.3.8.0
7fffcb29d000-7fffcb49c000 ---p 00001000 fd:00 1318095                    /usr/lib64/libLLVMCppBackendInfo.so.3.8.0
7fffcb49c000-7fffcb49d000 r--p 00000000 fd:00 1318095                    /usr/lib64/libLLVMCppBackendInfo.so.3.8.0
7fffcb49d000-7fffcb49e000 rw-p 00001000 fd:00 1318095                    /usr/lib64/libLLVMCppBackendInfo.so.3.8.0
7fffcb49e000-7fffcb4bd000 r-xp 00000000 fd:00 1318094                    /usr/lib64/libLLVMCppBackendCodeGen.so.3.8.0
7fffcb4bd000-7fffcb6bd000 ---p 0001f000 fd:00 1318094                    /usr/lib64/libLLVMCppBackendCodeGen.so.3.8.0
7fffcb6bd000-7fffcb6be000 r--p 0001f000 fd:00 1318094                    /usr/lib64/libLLVMCppBackendCodeGen.so.3.8.0
7fffcb6be000-7fffcb6bf000 rw-p 00020000 fd:00 1318094                    /usr/lib64/libLLVMCppBackendCodeGen.so.3.8.0
7fffcb6bf000-7fffcb6e4000 r-xp 00000000 fd:00 1318385                    /usr/lib64/libLLVMAMDGPUAsmPrinter.so.3.8.0
7fffcb6e4000-7fffcb8e3000 ---p 00025000 fd:00 1318385                    /usr/lib64/libLLVMAMDGPUAsmPrinter.so.3.8.0
7fffcb8e3000-7fffcb8e4000 r--p 00024000 fd:00 1318385                    /usr/lib64/libLLVMAMDGPUAsmPrinter.so.3.8.0
7fffcb8e4000-7fffcb8e5000 rw-p 00025000 fd:00 1318385                    /usr/lib64/libLLVMAMDGPUAsmPrinter.so.3.8.0
7fffcb8e5000-7fffcb8e6000 r-xp 00000000 fd:00 1318436                    /usr/lib64/libLLVMAMDGPUInfo.so.3.8.0
7fffcb8e6000-7fffcbae5000 ---p 00001000 fd:00 1318436                    /usr/lib64/libLLVMAMDGPUInfo.so.3.8.0
7fffcbae5000-7fffcbae6000 r--p 00000000 fd:00 1318436                    /usr/lib64/libLLVMAMDGPUInfo.so.3.8.0
7fffcbae6000-7fffcbae7000 rw-p 00001000 fd:00 1318436                    /usr/lib64/libLLVMAMDGPUInfo.so.3.8.0
7fffcbae7000-7fffcbae9000 r-xp 00000000 fd:00 1318574                    /usr/lib64/libLLVMAMDGPUUtils.so.3.8.0
7fffcbae9000-7fffcbce8000 ---p 00002000 fd:00 1318574                    /usr/lib64/libLLVMAMDGPUUtils.so.3.8.0
7fffcbce8000-7fffcbce9000 r--p 00001000 fd:00 1318574                    /usr/lib64/libLLVMAMDGPUUtils.so.3.8.0
7fffcbce9000-7fffcbcea000 rw-p 00002000 fd:00 1318574                    /usr/lib64/libLLVMAMDGPUUtils.so.3.8.0
7fffcbcea000-7fffcbda8000 r-xp 00000000 fd:00 1318448                    /usr/lib64/libLLVMAMDGPUDesc.so.3.8.0
7fffcbda8000-7fffcbfa8000 ---p 000be000 fd:00 1318448                    /usr/lib64/libLLVMAMDGPUDesc.so.3.8.0
7fffcbfa8000-7fffcbfff000 r--p 000be000 fd:00 1318448                    /usr/lib64/libLLVMAMDGPUDesc.so.3.8.0
7fffcbfff000-7fffcc000000 rw-p 00115000 fd:00 1318448                    /usr/lib64/libLLVMAMDGPUDesc.so.3.8.0
Program received signal SIGABRT, Aborted.
0x00007ffff2b69e3b in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
55  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff2b69e3b in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff2b6b3c0 in __GI_abort () at abort.c:89
#2  0x00007ffff2baca04 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff2caa2c8 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff2bb2a76 in malloc_printerr (action=3, str=0x7ffff2caa908 "malloc(): memory corruption (fast)", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5000
#4  0x00007ffff2bb4f45 in _int_malloc (av=av@entry=0x7ffff2ed7b80 <main_arena>, bytes=bytes@entry=16) at malloc.c:3380
#5  0x00007ffff2bb66fc in __GI___libc_malloc (bytes=16) at malloc.c:2907
#6  0x00007ffff322ee3f in operator new (sz=sz@entry=16) at /var/tmp/portage/sys-devel/gcc-4.9.3/work/gcc-4.9.3/libstdc++-v3/libsupc++/new_op.cc:49
#7  0x00007ffff3815dff in QLocalePrivate::create (numberOptions=0, data=0x7ffff3bdb480 <(anonymous namespace)::Q_QGS_globalLocaleData::innerFunction()::holder>) at tools/qlocale_p.h:306
#8  QLocale::system () at tools/qlocale.cpp:2027
#9  0x00007ffff37f25ea in QTime::toString (this=0x7fffffffcdf0, format=...) at tools/qdatetime.cpp:1640
#10 0x00005555555b5c55 in logMessageHandler (type=QtFatalMsg, ctxt=..., msg=...) at src/main.cpp:62
#11 0x00007ffff3799969 in qt_message_print (msgType=msgType@entry=QtFatalMsg, context=..., message=...) at global/qlogging.cpp:1543
#12 0x00007ffff3799b2e in qt_message(QtMsgType, const QMessageLogContext &, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, context=..., 
    msg=msg@entry=0x7ffff3a34c48 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=ap@entry=0x7fffffffcf70) at global/qlogging.cpp:266
#13 0x00007ffff379b653 in QMessageLogger::fatal (this=this@entry=0x7fffffffd060, msg=msg@entry=0x7ffff3a34c48 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:778
#14 0x00007ffff3795fde in qt_assert_x (where=where@entry=0x7ffff3a3f082 "QWeakPointer", what=what@entry=0x7ffff3a36360 "Detected QWeakPointer creation in a QObject being deleted", 
    file=file@entry=0x7ffff3a3f065 "tools/qsharedpointer.cpp", line=line@entry=1328) at global/qglobal.cpp:2974
#15 0x00007ffff3836794 in QtSharedPointer::ExternalRefCountData::getAndRef (obj=obj@entry=0x555556208be0) at tools/qsharedpointer.cpp:1328
#16 0x00007ffff4459b47 in QWeakPointer<QObject>::QWeakPointer<QObject> (ptr=0x555556208be0, this=<optimized out>) at ../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:696
#17 QWeakPointer<QObject>::assign<QObject> (ptr=0x555556208be0, this=0x7ffff498c530 <qt_last_mouse_receiver>) at ../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:692
#18 QPointer<QWidget>::operator= (p=0x555556208be0, this=0x7ffff498c530 <qt_last_mouse_receiver>) at ../../include/QtCore/../../src/corelib/kernel/qpointer.h:67
#19 QWidgetWindow::handleMouseEvent (this=this@entry=0x55555608b670, event=event@entry=0x7fffffffd6f0) at kernel/qwidgetwindow.cpp:453
#20 0x00007ffff445c70b in QWidgetWindow::event (this=0x55555608b670, event=0x7fffffffd6f0) at kernel/qwidgetwindow.cpp:210
#21 0x00007ffff43ee19c in QApplicationPrivate::notify_helper (this=this@entry=0x555555db3010, receiver=receiver@entry=0x55555608b670, e=e@entry=0x7fffffffd6f0) at kernel/qapplication.cpp:3716
#22 0x00007ffff43f3dd2 in QApplication::notify (this=0x7fffffffdbe0, receiver=0x55555608b670, e=0x7fffffffd6f0) at kernel/qapplication.cpp:3499
#23 0x00007ffff398149c in QCoreApplication::notifyInternal (this=0x7fffffffdbe0, receiver=receiver@entry=0x55555608b670, event=event@entry=0x7fffffffd6f0) at kernel/qcoreapplication.cpp:965
#24 0x00007ffff3e5833d in QCoreApplication::sendSpontaneousEvent (event=0x7fffffffd6f0, receiver=0x55555608b670) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227
#25 QGuiApplicationPrivate::processMouseEvent (e=0x55555c76f310) at kernel/qguiapplication.cpp:1789
#26 0x00007ffff3e5a0bd in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x55555c76f310) at kernel/qguiapplication.cpp:1581
#27 0x00007ffff3e3bb10 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:625
#28 0x00007fffe26927f3 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:70
#29 0x00007fffeb64e283 in g_main_dispatch (context=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#30 g_main_context_dispatch (context=context@entry=0x7fffdc0016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#31 0x00007fffeb64e570 in g_main_context_iterate (context=context@entry=0x7fffdc0016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#32 0x00007fffeb64e642 in g_main_context_iteration (context=0x7fffdc0016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#33 0x00007ffff39d9e5e in QEventDispatcherGlib::processEvents (this=0x555555df4820, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#34 0x00007ffff397f6e3 in QEventLoop::exec (this=this@entry=0x7fffffffdac0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#35 0x00007ffff3987e1e in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#36 0x00005555555b7336 in main (argc=3, argv=0x7fffffffdd48) at src/main.cpp:289

anoadragon453 pushed a commit to anoadragon453/qTox that referenced this issue Jul 8, 2016
Fixes qTox#2480

The GUI was deleting itself on logout, but was doing while deep inside the middle of GUI code, resulting in a series of use-after-free on the return path. We now freeze the GUI and logout asynchronously in a more suitable call stack.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-bug The issue contains a bug report C-crash The issue contains a crash report P-medium
Projects
None yet
Development

No branches or pull requests

8 participants
@agilob @zetok @tux3 @PKEv @towlie @ovalseven8 @TheNain38 and others