Bug 439634 - Segfault on launch/invalid memory access
Summary: Segfault on launch/invalid memory access
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-08 09:38 UTC by Martin Sandsmark
Modified: 2024-04-22 03:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sandsmark 2021-07-08 09:38:22 UTC
Only seems to trigger with ASAN enabled, might be because it is trying to use uninitialized memory and ASAN zeroes out memory AFAIK:

==447177==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000068 (pc 0x55ddebab2a31 bp 0x7ffcd73eeca0 sp 0x7ffcd73eec90 T0)
==447177==The signal is caused by a READ memory access.
==447177==Hint: address points to the zero page.
    #0 0x55ddebab2a31 in Konsole::TerminalDisplay::lines() const ../src/terminalDisplay/TerminalDisplay.h:174
    #1 0x55ddebab1664 in Konsole::TerminalScrollBar::setScroll(int, int) ../src/terminalDisplay/TerminalScrollBar.cpp:57
    #2 0x55ddeba6a4fd in Konsole::TerminalDisplay::updateImage() ../src/terminalDisplay/TerminalDisplay.cpp:526
    #3 0x55ddebaa0f02 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Konsole::TerminalDisplay::*)()>::call(void (Konsole::TerminalDisplay::*)(), Konsole::TerminalDisplay*, void**) /usr/include/qt/QtCore/qobjectdefs_impl.h:152
    #4 0x55ddeba9fee9 in void QtPrivate::FunctionPointer<void (Konsole::TerminalDisplay::*)()>::call<QtPrivate::List<>, void>(void (Konsole::TerminalDisplay::*)(), Konsole::TerminalDisplay*, void**) /usr/include/qt/QtCore/qobjectdefs_impl.h:185
    #5 0x55ddeba9dc51 in QtPrivate::QSlotObject<void (Konsole::TerminalDisplay::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt/QtCore/qobjectdefs_impl.h:418
    #6 0x7fd3a2f9275a  (/usr/lib/libQt5Core.so.5+0x2f075a)
    #7 0x55ddeb8eeede in Konsole::ScreenWindow::outputChanged() src/konsoleprivate_autogen/EWIEGA46WW/moc_ScreenWindow.cpp:186
    #8 0x55ddeb9810c4 in Konsole::ScreenWindow::notifyOutputChanged() ../src/ScreenWindow.cpp:331
    #9 0x55ddeb929ea5 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Konsole::ScreenWindow::*)()>::call(void (Konsole::ScreenWindow::*)(), Konsole::ScreenWindow*, void**) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e5ea5)
    #10 0x55ddeb92950d in void QtPrivate::FunctionPointer<void (Konsole::ScreenWindow::*)()>::call<QtPrivate::List<>, void>(void (Konsole::ScreenWindow::*)(), Konsole::ScreenWindow*, void**) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e550d)
    #11 0x55ddeb928661 in QtPrivate::QSlotObject<void (Konsole::ScreenWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e4661)
    #12 0x7fd3a2f9275a  (/usr/lib/libQt5Core.so.5+0x2f075a)
    #13 0x55ddeb8eb0f8 in Konsole::Emulation::outputChanged() src/konsoleprivate_autogen/EWIEGA46WW/moc_Emulation.cpp:530
    #14 0x55ddeb925141 in Konsole::Emulation::showBulk() ../src/Emulation.cpp:268
    #15 0x55ddeb9298e7 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Konsole::Emulation::*)()>::call(void (Konsole::Emulation::*)(), Konsole::Emulation*, void**) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e58e7)
    #16 0x55ddeb92942a in void QtPrivate::FunctionPointer<void (Konsole::Emulation::*)()>::call<QtPrivate::List<>, void>(void (Konsole::Emulation::*)(), Konsole::Emulation*, void**) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e542a)
    #17 0x55ddeb927fdb in QtPrivate::QSlotObject<void (Konsole::Emulation::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/sandsmark/src/konsole/build/bin/konsole+0x2e3fdb)
    #18 0x7fd3a2f9275a  (/usr/lib/libQt5Core.so.5+0x2f075a)
    #19 0x7fd3a2f9672a in QTimer::timeout(QTimer::QPrivateSignal) (/usr/lib/libQt5Core.so.5+0x2f472a)
    #20 0x7fd3a2f8841e in QObject::event(QEvent*) (/usr/lib/libQt5Core.so.5+0x2e641e)
    #21 0x7fd3a3ad8d61 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x15ad61)
    #22 0x7fd3a2f5b3a9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x2b93a9)
    #23 0x7fd3a2fb334c in QTimerInfoList::activateTimers() (/usr/lib/libQt5Core.so.5+0x31134c)
    #24 0x7fd3a2fb1828 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x30f828)
    #25 0x7fd39a56737e  (/usr/lib/libQt5XcbQpa.so.5+0x6337e)
    #26 0x7fd3a2f59d1b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2b7d1b)
    #27 0x7fd3a2f62283 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x2c0283)
    #28 0x55ddeb8d6d14 in main ../src/main.cpp:220
    #29 0x7fd3a2786b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #30 0x55ddeb8d3dad in _start (/home/sandsmark/src/konsole/build/bin/konsole+0x28fdad)
Comment 1 Martin Sandsmark 2021-07-08 09:44:31 UTC
git bisect says this introduced the crash: 2c1a4113e1f3b728a377f9288518fd214fc47d24
Comment 2 Martin Sandsmark 2021-07-08 09:54:42 UTC
Seems like the commit broke ODR and made some global static mess, and probably what causes both this and https://bugs.kde.org/show_bug.cgi?id=439633 (which crashes without ASAN as well):

=================================================================
==454108==ERROR: AddressSanitizer: odr-violation (0x55e42e3b1bc0):
  [1] size=48 'staticMetaObject' src/session/konsolesession_autogen/EWIEGA46WW/moc_SessionManager.cpp:112:38
  [2] size=48 'staticMetaObject' src/session/konsolesession_autogen/EWIEGA46WW/moc_SessionManager.cpp:112:38
These globals were registered at these points:
  [1]:
    #0 0x7f8a524583fa in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341
    #1 0x55e42dffed3d in _sub_I_00099_1 (/home/sandsmark/src/konsole/build/bin/konsole+0x4c2d3d)
    #2 0x55e42e16c22c in __libc_csu_init (/home/sandsmark/src/konsole/build/bin/konsole+0x63022c)

  [2]:
    #0 0x7f8a524583fa in __asan_register_globals /build/gcc/src/gcc/libsanitizer/asan/asan_globals.cpp:341
    #1 0x7f8a51c60bb1 in _sub_I_00099_1 (/home/sandsmark/src/konsole/build/bin/libkonsoleapp.so.21+0x377bb1)
    #2 0x7f8a52e49e2d in call_init (/lib64/ld-linux-x86-64.so.2+0xfe2d)
Comment 3 Kurt Hindenburg 2024-03-23 04:14:53 UTC
let us know if this is still an issue
Comment 4 Bug Janitor Service 2024-04-07 03:47:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2024-04-22 03:47:28 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!