Bug 391318 - Konsole crash when saving very large output log
Summary: Konsole crash when saving very large output log
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 17.08.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-03-02 21:51 UTC by A. Wilcox (awilfox)
Modified: 2018-03-29 15:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A. Wilcox (awilfox) 2018-03-02 21:51:24 UTC
Application: konsole (17.08.2)
 (Compiled from sources)
Qt Version: 5.9.1
Frameworks Version: 5.41.0
Operating System: Linux 4.14.8-mc2-easy x86_64

-- Information about the crash:
This is on Adelie Linux, a Linux distribution based on the musl libc.

- What I was doing when the application crashed:
I was attempting to save an output log (around 1.3 GB) of a very large build job, and Konsole crashed.

-- Backtrace:
Application: Konsole (konsole), signal: Aborted
[KCrash Handler]
#8  0x00007f70611c3127 in __syscall4 (a4=<optimized out>, a3=<optimized out>, a2=<optimized out>, a1=<optimized out>, n=<optimized out>) at ./arch/x86_64/syscall_arch.h:38
#9  __restore_sigs (set=set@entry=0x7ffce9b669f0) at src/signal/block.c:43
#10 0x00007f70611c327a in raise (sig=sig@entry=6) at src/signal/raise.c:13
#11 0x00007f706118ff1e in abort () at src/exit/abort.c:9
#12 0x00007f705cf7a028 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#13 0x00007f705cf76e7a in __cxxabiv1::__terminate(void (*)()) () from /usr/lib/libstdc++.so.6
#14 0x00007f705cf76ec4 in std::terminate() () from /usr/lib/libstdc++.so.6
#15 0x00007f705cf773f8 in __cxa_throw () from /usr/lib/libstdc++.so.6
#16 0x00007f705d344e62 in qBadAlloc() () from /usr/lib/libQt5Core.so.5
#17 0x00007f705d3e0345 in QString::reallocData(unsigned int, bool) () from /usr/lib/libQt5Core.so.5
#18 0x00007f7060ca78c8 in QString::reserve (asize=1177486864, this=0x7ffce9b66be8) at /usr/include/QtCore/qstring.h:1089
#19 Konsole::PlainTextDecoder::decodeLine (this=0x56297a0c91c0, characters=0x7f7060f244a0 <Konsole::Screen::copyLineToStream(int, int, int, Konsole::TerminalCharacterDecoder*, bool, bool, bool) const::characterBuffer>, count=1177486864) at /usr/src/packages/user/konsole/src/konsole-17.08.2/src/TerminalCharacterDecoder.cpp:83
#20 0x00007f7060c8347c in Konsole::Screen::copyLineToStream (this=this@entry=0x56297bcbdcc0, line=line@entry=549888, start=<optimized out>, count=1177486864, count@entry=-1, decoder=decoder@entry=0x56297a0c91c0, appendNewLine=appendNewLine@entry=true, preserveLineBreaks=true, trimTrailingSpaces=false) at /usr/src/packages/user/konsole/src/konsole-17.08.2/src/Screen.cpp:1280
#21 0x00007f7060c8373a in Konsole::Screen::writeToStream (this=0x56297bcbdcc0, decoder=0x56297a0c91c0, startIndex=<optimized out>, endIndex=<optimized out>, preserveLineBreaks=true, trimTrailingSpaces=false) at /usr/src/packages/user/konsole/src/konsole-17.08.2/src/Screen.cpp:1164
#22 0x00007f7060c9cfcd in Konsole::SaveHistoryTask::jobDataRequested (this=<optimized out>, job=<optimized out>, data=...) at /usr/src/packages/user/konsole/src/konsole-17.08.2/src/SessionController.cpp:1795
#23 0x00007f705d57170b in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#24 0x00007f705be76154 in KIO::TransferJob::dataReq(KIO::Job*, QByteArray&) () from /usr/lib/libKF5KIOCore.so.5
#25 0x00007f705be76dc7 in KIO::TransferJob::slotDataReq() () from /usr/lib/libKF5KIOCore.so.5
#26 0x00007f705be779e1 in ?? () from /usr/lib/libKF5KIOCore.so.5
#27 0x00007f705d5713c7 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#28 0x00007f705be47e2e in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib/libKF5KIOCore.so.5
#29 0x00007f705be463a8 in KIO::SlaveInterface::dispatch() () from /usr/lib/libKF5KIOCore.so.5
#30 0x00007f705be4b269 in KIO::Slave::gotInput() () from /usr/lib/libKF5KIOCore.so.5
#31 0x00007f705bed93a5 in ?? () from /usr/lib/libKF5KIOCore.so.5
#32 0x00007f705d5713c7 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#33 0x00007f705bde5a5e in ?? () from /usr/lib/libKF5KIOCore.so.5
#34 0x00007f705d571fd1 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#35 0x00007f705e517fdc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x56297a2e25c0, e=0x56297a1d1e60) at kernel/qapplication.cpp:3717
#36 0x00007f705e51f8d9 in QApplication::notify (this=0x7f7060f27fe0, receiver=0x56297a2e25c0, e=0x56297a1d1e60) at kernel/qapplication.cpp:3476
#37 0x00007f705d544fc0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#38 0x00007f705d547d9d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#39 0x00007f705d59b3e3 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib/libQt5Core.so.5
#40 0x00007f7057747a9a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0x00007f7057747d28 in ?? () from /usr/lib/libglib-2.0.so.0
#42 0x00007f7057747ddf in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#43 0x00007f705d59a9af in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#44 0x00007f705d542f2a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#45 0x00007f705d54bf74 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#46 0x00007f7060f4ff27 in kdemain (argc=<optimized out>, argv=<optimized out>) at /usr/src/packages/user/konsole/src/konsole-17.08.2/src/main.cpp:190
#47 0x00007f706118f866 in __libc_start_main (main=0x562979458670 <main>, argc=1, argv=0x7ffce9b67b38) at src/env/__libc_start_main.c:74
#48 0x00005629794586b8 in _start_c (p=<optimized out>) at crt/crt1.c:17
#49 0x0000562979458690 in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2018-03-29 15:57:00 UTC
Does the output log file have very long lines? Konsole writes in batches of 500 lines, but if those add to more then 1G characters (2 GByte UTF-16) it will fail.