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

Address Sanitizer Abort on launch #402

Closed
charlesay opened this issue Apr 12, 2016 · 13 comments
Closed

Address Sanitizer Abort on launch #402

charlesay opened this issue Apr 12, 2016 · 13 comments

Comments

@charlesay
Copy link

ricochet (1.1.2-3) crashes on launch with output like this:

`qrc:/ui/MainWindow.qml:89:17: QML Loader: Binding loop detected for property "active"

==1718==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x608000315320 in thread T0:
object passed to delete has wrong type:
size of the allocated type: 96 bytes;
size of the deallocated type: 64 bytes.
#0 0x7fa87e3d7fa2 in operator delete(void_, unsigned long) /build/gcc-multilib/src/gcc-5-20160209/libsanitizer/asan/asan_new_delete.cc:108
#1 0x7fa861149a0e (/usr/lib/qt/qml/QtQuick/Controls/libqtquickcontrolsplugin.so+0x3fa0e)
#2 0x7fa861122fa5 (/usr/lib/qt/qml/QtQuick/Controls/libqtquickcontrolsplugin.so+0x18fa5)
#3 0x7fa87b83af52 in QObjectPrivate::deleteChildren() (/usr/lib/libQt5Core.so.5+0x2a8f52)
#4 0x7fa87b844523 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2b2523)
#5 0x7fa87d748fcc in QQuickItem::~QQuickItem() (/usr/lib/libQt5Quick.so.5+0x192fcc)
#6 0x7fa87d7633d5 (/usr/lib/libQt5Quick.so.5+0x1ad3d5)
#7 0x7fa87b83af52 in QObjectPrivate::deleteChildren() (/usr/lib/libQt5Core.so.5+0x2a8f52)
#8 0x7fa87b844523 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2b2523)
#9 0x7fa87d748fcc in QQuickItem::~QQuickItem() (/usr/lib/libQt5Quick.so.5+0x192fcc)
#10 0x7fa87d762925 (/usr/lib/libQt5Quick.so.5+0x1ac925)
#11 0x7fa87b83af52 in QObjectPrivate::deleteChildren() (/usr/lib/libQt5Core.so.5+0x2a8f52)
#12 0x7fa87b844523 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2b2523)
#13 0x7fa87d748fcc in QQuickItem::~QQuickItem() (/usr/lib/libQt5Quick.so.5+0x192fcc)
#14 0x7fa860ef6963 (/usr/lib/qt/qml/QtQuick/Layouts/libqquicklayoutsplugin.so+0xb963)
#15 0x7fa87b83af52 in QObjectPrivate::deleteChildren() (/usr/lib/libQt5Core.so.5+0x2a8f52)
#16 0x7fa87b844523 in QObject::~QObject() (/usr/lib/libQt5Core.so.5+0x2b2523)
#17 0x7fa87d748fcc in QQuickItem::~QQuickItem() (/usr/lib/libQt5Quick.so.5+0x192fcc)
#18 0x7fa87d763495 (/usr/lib/libQt5Quick.so.5+0x1ad495)
#19 0x7fa87b83d68f in QObject::event(QEvent_) (/usr/lib/libQt5Core.so.5+0x2ab68f)
#20 0x7fa87d74739a in QQuickItem::event(QEvent_) (/usr/lib/libQt5Quick.so.5+0x19139a)
#21 0x7fa87ce9168b in QApplicationPrivate::notify_helper(QObject_, QEvent_) (/usr/lib/libQt5Widgets.so.5+0x15568b)
#22 0x7fa87ce968f5 in QApplication::notify(QObject_, QEvent_) (/usr/lib/libQt5Widgets.so.5+0x15a8f5)
#23 0x7fa87b810517 in QCoreApplication::notifyInternal2(QObject_, QEvent_) (/usr/lib/libQt5Core.so.5+0x27e517)
#24 0x7fa87b8123d9 in QCoreApplicationPrivate::sendPostedEvents(QObject_, int, QThreadData*) (/usr/lib/libQt5Core.so.5+0x2803d9)
#25 0x7fa87b865882 (/usr/lib/libQt5Core.so.5+0x2d3882)
#26 0x7fa8790f4f06 in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x49f06)
#27 0x7fa8790f515f (/usr/lib/libglib-2.0.so.0+0x4a15f)
#28 0x7fa8790f520b in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x4a20b)
#29 0x7fa87b865c8e in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) (/usr/lib/libQt5Core.so.5+0x2d3c8e)
#30 0x7fa87b80e6f9 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) (/usr/lib/libQt5Core.so.5+0x27c6f9)
#31 0x7fa87b816b7b in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x284b7b)
#32 0x55838f3e00fd (/usr/bin/ricochet+0x2660fd)
#33 0x7fa879f6970f in __libc_start_main (/usr/lib/libc.so.6+0x2070f)
#34 0x55838f3e51a8 (/usr/bin/ricochet+0x26b1a8)

0x608000315320 is located 0 bytes inside of 96-byte region [0x608000315320,0x608000315380)
allocated by thread T0 here:
#0 0x7fa87e3d73a2 in operator new(unsigned long) /build/gcc-multilib/src/gcc-5-20160209/libsanitizer/asan/asan_new_delete.cc:60
#1 0x7fa861148a77 (/usr/lib/qt/qml/QtQuick/Controls/libqtquickcontrolsplugin.so+0x3ea77)

SUMMARY: AddressSanitizer: new-delete-type-mismatch /build/gcc-multilib/src/gcc-5-20160209/libsanitizer/asan/asan_new_delete.cc:108 operator delete(void*, unsigned long)
==1718==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==1718==ABORTING
`

@rburchell
Copy link
Contributor

Are you using the custom-built binaries, or building from source yourself? (Or a distro?)

@charlesay
Copy link
Author

I installed from the Arch User Repository[1], so it is built locally.

[1]https://aur.archlinux.org/packages/ricochet/

@rburchell
Copy link
Contributor

Ok. Can you try the provided binaries and see if you still have trouble? My first suspicion is that you have something on your system that wasn't rebuilt correctly, or a stale copy of a library somewhere.

@special
Copy link
Member

special commented Apr 13, 2016

@rburchell "a stale copy of a library" is an interesting idea: I wonder if this is happening for Arch users when they update Qt without rebuilding Ricochet. If that's true, a reinstall/rebuild of Ricochet against the newer Qt libraries should fix it.

@special
Copy link
Member

special commented Apr 13, 2016

Also, ASAN won't be on by default for release builds in the future, which will get rid of this error. See #341.

@rburchell
Copy link
Contributor

That's a good thing. But on the other hand, this ASAN error may be something much more annoying waiting to bite if it isn't a false alarm.

@charlesay
Copy link
Author

reinstalling the package from the aur didn't change the behaviour, the prebuilt binary however runs correctly

@rburchell
Copy link
Contributor

Can you install ldd, and run it against the nonworking binary?

@charlesay
Copy link
Author

sure:

linux-vdso.so.1 (0x00007fffd03bb000)
libasan.so.2 => /usr/lib/libasan.so.2 (0x00007f7c16f21000)
libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f7c16aaa000)
libprotobuf.so.9 => /usr/lib/libprotobuf.so.9 (0x00007f7c16781000)
libQt5Quick.so.5 => /usr/lib/libQt5Quick.so.5 (0x00007f7c16199000)
libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0x00007f7c1591f000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x00007f7c1519c000)
libQt5Qml.so.5 => /usr/lib/libQt5Qml.so.5 (0x00007f7c14bab000)
libQt5Network.so.5 => /usr/lib/libQt5Network.so.5 (0x00007f7c1483f000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f7c14175000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f7c13df3000)
libubsan.so.0 => /usr/lib/libubsan.so.0 (0x00007f7c130e3000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f7c12ecd000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f7c12b2c000)
libpthread.so.0 => /usr/lib/../lib/libpthread.so.0 (0x00007f7c1290f000)
libdl.so.2 => /usr/lib/../lib/libdl.so.2 (0x00007f7c1270b000)
libm.so.6 => /usr/lib/../lib/libm.so.6 (0x00007f7c12406000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f7c121f0000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f7c11f9e000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f7c11c8e000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f7c1194c000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f7c11717000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f7c1149b000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f7c1122a000)
libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f7c10fb9000)
libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x00007f7c10b3f000)
libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x00007f7c10797000)
libpcre16.so.0 => /usr/lib/libpcre16.so.0 (0x00007f7c10531000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f7c10329000)
libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f7c17fe3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7c17e91000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f7c10120000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f7c0feb0000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f7c0fc8d000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f7c0f9cd000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f7c0f7a1000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f7c0f577000)
libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f7c0f374000)
libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f7c0f171000)
libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f7c0ef63000)
libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0x00007f7c0ed5b000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f7c0eb51000)
libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0x00007f7c0e94d000)
libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f7c0e746000)
libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f7c0e543000)
libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f7c0e315000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f7c0e103000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f7c0df00000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f7c0dcfa000)
libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f7c0daf8000)
libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f7c0d8de000)
libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f7c0d6d9000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f7c0d4d3000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f7c0d2c4000)
libicudata.so.57 => /usr/lib/libicudata.so.57 (0x00007f7c0b848000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f7c0b644000)
libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f7c0b42d000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f7c0b207000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f7c0aff5000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f7c0ad13000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f7c0aaff000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f7c0a8fb000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f7c0a6f5000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f7c0a4e5000)

@special
Copy link
Member

special commented Apr 14, 2016

@mkrautz would it be easy to update the arch package to disable ASAN, before the next Ricochet release?

We will be disabling it by default as of 1.1.3 (3031a56), anyway. I'd rather wait for a few more things before releasing that, though.

@mkrautz
Copy link

mkrautz commented Apr 14, 2016

Not me. @mkroman

@mkroman
Copy link

mkroman commented Apr 19, 2016

Sorry for the delayed reply.

@special I don't maintain the ricochet AUR package, however, I sent a patch to the current maintainer and ASAN should now be disabled.

@special
Copy link
Member

special commented Apr 19, 2016

@mkroman Thanks! We'll consider this fixed, then.

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

No branches or pull requests

5 participants