Bug 217429 - SIGSEGV in kernelshark: get_info_str () at src/libkshark-tepdata.c:832
Summary: SIGSEGV in kernelshark: get_info_str () at src/libkshark-tepdata.c:832
Status: NEW
Alias: None
Product: Tools
Classification: Unclassified
Component: Trace-cmd/Kernelshark (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: Default virtual assignee for Trace-cmd and kernelshark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-11 07:20 UTC by Vitaly Chikunov
Modified: 2023-06-03 08:43 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
trace.dat that causes crash in kernelshark (1.67 MB, application/octet-stream)
2023-05-12 07:08 UTC, Vitaly Chikunov
Details
test patch (1.03 KB, patch)
2023-05-17 17:19 UTC, Yordan Karadzhov
Details | Diff

Description Vitaly Chikunov 2023-05-11 07:20:45 UTC
KernelShark 2.2.0 crashes on x86_64 when opening `trace.dat` of 'all events'.

Events recorded using 
```
trace-cmd record -e all -o trace.dat sleep 0.1
```
Then
```
$ gdb --args kernelshark
GNU gdb (GDB) 11.2-alt1 (ALT Sisyphus)
...
(gdb) r
Starting program: /usr/bin/kernelshark
Loading  "trace.dat"
[New Thread 0x7fff2adfe640 (LWP 3995908)]
[Thread 0x7fff2adfe640 (LWP 3995908) exited]

Thread 1 "kernelshark" received signal SIGSEGV, Segmentation fault.
=> 0x7ffff75f3bb5 <tepdata_get_info+357>:       cmpb   $0xa,(%rax)
0x00007ffff75f3bb5 in get_info_str (event=<optimized out>, record=0x5555561ee190, stream=0x7fff18000bd0) at /usr/src/debug/kernelshark-2.2.0/src/libkshark-tepdata.c:832
832             if (seq.buffer[seq.len - 1] == '\n')
(gdb) i r rax
rax            0x5556561f0fff      93829300424703
(gdb) bt
#0  0x00007ffff75f3bb5 in get_info_str (event=<optimized out>, record=0x5555561ee190, stream=0x7fff18000bd0)
    at /usr/src/debug/kernelshark-2.2.0/src/libkshark-tepdata.c:832
#1  tepdata_get_info (stream=0x7fff18000bd0, entry=<optimized out>) at /usr/src/debug/kernelshark-2.2.0/src/libkshark-tepdata.c:874
#2  0x00007ffff7f38cd8 in KsViewModel::getValueStr (this=0x7fffffffc7d8, column=<optimized out>, row=2)
    at /usr/src/debug/kernelshark-2.2.0/src/KsModels.cpp:366
#3  0x00007ffff7f38f34 in KsViewModel::getValue (this=<optimized out>, column=<optimized out>, row=<optimized out>)
    at /usr/src/debug/kernelshark-2.2.0/src/KsModels.cpp:377
#4  0x00007ffff7f38fd1 in KsViewModel::data (this=<optimized out>, index=..., role=<optimized out>)
    at /usr/src/debug/kernelshark-2.2.0/src/KsModels.cpp:312
#5  0x00007ffff6aa6c21 in QSortFilterProxyModel::data (this=<optimized out>, index=..., role=0) at itemmodels/qsortfilterproxymodel.cpp:2294
#6  0x00007ffff7a20a28 in QModelIndex::data (arole=0, this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:460
#7  QItemDelegatePrivate::displayRect (this=this@entry=0x555555645690, index=..., option=..., decorationRect=..., checkRect=...)
    at itemviews/qitemdelegate.cpp:131
#8  0x00007ffff7a21985 in QItemDelegate::sizeHint (this=0x7fffffffc8f8, option=..., index=...) at itemviews/qitemdelegate.cpp:484
#9  0x00007ffff7a54888 in QTableViewPrivate::widthHintForIndex (this=this@entry=0x5555555c4540, index=..., hint=hint@entry=68, option=...)
    at itemviews/qtableview.cpp:1024
#10 0x00007ffff7a54b4f in QTableView::sizeHintForColumn (this=<optimized out>, column=7) at itemviews/qtableview.cpp:2425
#11 0x00007ffff7a10471 in QHeaderViewPrivate::resizeSections (this=0x555555644470, globalMode=globalMode@entry=QHeaderView::ResizeToContents,
    useGlobalMode=useGlobalMode@entry=true) at itemviews/qheaderview.cpp:3551
#12 0x00007ffff7a1089e in QHeaderView::resizeSections (this=<optimized out>, mode=mode@entry=QHeaderView::ResizeToContents)
    at itemviews/qheaderview.cpp:969
#13 0x00007ffff7a52015 in QTableView::resizeColumnsToContents (this=this@entry=0x7fffffffc7a8) at itemviews/qtableview.cpp:3194
#14 0x00007ffff7f60f33 in KsTraceViewer::_resizeToContents (this=0x7fffffffc750) at /usr/src/debug/kernelshark-2.2.0/src/KsTraceViewer.cpp:618
#15 0x00007ffff7f61940 in KsTraceViewer::loadData (this=this@entry=0x7fffffffc750, data=data@entry=0x7fffffffc730)
    at /usr/src/debug/kernelshark-2.2.0/src/KsTraceViewer.cpp:208
#16 0x00007ffff7f6fba8 in KsMainWindow::_load (this=0x7fffffffc6c0, fileName=..., append=<optimized out>)
    at /usr/src/debug/kernelshark-2.2.0/src/KsMainWindow.cpp:1334
#17 0x00007ffff7f6ff5c in KsMainWindow::loadDataFile (this=this@entry=0x7fffffffc6c0, fileName=...)
    at /usr/src/debug/kernelshark-2.2.0/src/KsMainWindow.cpp:1348
#18 0x00005555555579c6 in main (argc=<optimized out>, argv=0x7fffffffe098) at /usr/src/debug/kernelshark-2.2.0/src/kernelshark.cpp:131
```
Comment 1 Yordan Karadzhov 2023-05-11 18:01:13 UTC
Hi Vitaly,

Thanks a lot for reporting the issue. I see the bug in kernelshark that caused the crash, however this may also indicate a problem with the datafile as well. Would you upload the trace.dat file that crashes kernelshark.

cheers,
Yordan
Comment 2 Vitaly Chikunov 2023-05-11 22:57:37 UTC
I unsure it does not inadvertently contains private data since it's 'all events'. Can I send it privately to your email?
Comment 3 Vitaly Chikunov 2023-05-12 07:08:21 UTC
Created attachment 304250 [details]
trace.dat that causes crash in kernelshark

Thanks to our testers, I got `trace.dat` from test env.
Comment 4 Yordan Karadzhov 2023-05-12 16:09:52 UTC
Thanks Vitaly!
I will have a look.
Y.
Comment 5 Vitaly Chikunov 2023-05-12 23:02:29 UTC
Also, run in valgrind with the `trace.dat`:
```
$ valgrind kernelshark
==143075== Memcheck, a memory error detector
==143075== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==143075== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==143075== Command: kernelshark
==143075==
--143075-- WARNING: unhandled amd64-linux syscall: 334
--143075-- You may be able to write your own handler.
--143075-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--143075-- Nevertheless we consider this a bug.  Please report
--143075-- it at http://valgrind.org/support/bug_reports.html.
loading plugin "sched_events" from /usr/lib64/kernelshark/plugins/plugin-sched_events.so
loading plugin "event_field_plot" from /usr/lib64/kernelshark/plugins/plugin-event_field_plot.so
loading plugin "latency_plot" from /usr/lib64/kernelshark/plugins/plugin-latency_plot.so
loading plugin "kvm_combo" from /usr/lib64/kernelshark/plugins/plugin-kvm_combo.so
loading plugin "missed_events" from /usr/lib64/kernelshark/plugins/plugin-missed_events.so
Font file /usr/share/fonts/ttf/freefont/FreeSans.ttf not found.
Loading  "trace.dat"
==143075== Syscall param writev(vector[...]) points to uninitialised byte(s)
==143075==    at 0x609596D: __writev (writev.c:26)
==143075==    by 0x609596D: writev (writev.c:24)
==143075==    by 0x9731B52: UnknownInlinedFun (xcb_conn.c:296)
==143075==    by 0x9731B52: _xcb_conn_wait.part.0 (xcb_conn.c:551)
==143075==    by 0x9731C1F: UnknownInlinedFun (xcb_out.c:469)
==143075==    by 0x9731C1F: _xcb_out_send (xcb_out.c:470)
==143075==    by 0x9732E83: UnknownInlinedFun (xcb_out.c:416)
==143075==    by 0x9732E83: xcb_writev (xcb_out.c:409)
==143075==    by 0x94C0354: _XSend (xcb_io.c:587)
==143075==    by 0x94B86C9: UnknownInlinedFun (PutImage.c:795)
==143075==    by 0x94B86C9: UnknownInlinedFun (PutImage.c:861)
==143075==    by 0x94B86C9: PutSubImage (PutImage.c:899)
==143075==    by 0x94B886E: XPutImage (PutImage.c:1018)
==143075==    by 0xD398F9A: ??? (in /usr/lib64/libGLX_mesa.so.0.0.0)
==143075==    by 0xD39923C: ??? (in /usr/lib64/libGLX_mesa.so.0.0.0)
==143075==    by 0xD8ED354: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD8ED5B9: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD398119: ??? (in /usr/lib64/libGLX_mesa.so.0.0.0)
==143075==  Address 0x2baa4f80 is 1,048,320 bytes inside a block of size 1,228,800 alloc'd
==143075==    at 0x484A579: memalign (vg_replace_malloc.c:1265)
==143075==    by 0x484A689: posix_memalign (vg_replace_malloc.c:1429)
==143075==    by 0xDF26ABE: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xDF29448: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD8EDC4B: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD8F3C64: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD9B2B81: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD9B3651: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD8F3894: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD8F6E4D: ??? (in /usr/lib64/X11/modules/dri/libgallium_dri.so)
==143075==    by 0xD39828F: ??? (in /usr/lib64/libGLX_mesa.so.0.0.0)
==143075==    by 0xD39D31C: ??? (in /usr/lib64/libGLX_mesa.so.0.0.0)
==143075==
==143075== Thread 45:
==143075== Source and destination overlap in memcpy_chk(0xb651fd8, 0xb651fd0, 16)
==143075==    at 0x484FF62: __memcpy_chk (vg_replace_strmem.c:1617)
==143075==    by 0x736A395: memmove (string_fortified.h:36)
==143075==    by 0x736A395: add_event (event-parse.c:1042)
==143075==    by 0x736A395: __parse_event (event-parse.c:7856)
==143075==    by 0x736A7EF: tep_parse_event (event-parse.c:7913)
==143075==    by 0x730FF54: read_event_file (trace-input.c:734)
==143075==    by 0x730FF54: read_event_files (trace-input.c:932)
==143075==    by 0x7315BE9: handle_section (trace-input.c:1195)
==143075==    by 0x7315BE9: read_headers.constprop.0 (trace-input.c:1237)
==143075==    by 0x7315DBA: tracecmd_open_head (trace-input.c:4824)
==143075==    by 0x6374651: kshark_tep_init_input (libkshark-tepdata.c:1550)
==143075==    by 0x636E465: kshark_stream_open (libkshark.c:305)
==143075==    by 0x636E4A6: kshark_open (libkshark.c:110)
==143075==    by 0x48C646F: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:672)
==143075==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==143075==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==143075==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==143075==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==143075==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==143075==    by 0x4900BC7: operator() (std_thread.h:286)
==143075==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==143075==
==143075== Source and destination overlap in memcpy_chk(0x3256a338, 0x3256a330, 15280)
==143075==    at 0x484FF62: __memcpy_chk (vg_replace_strmem.c:1617)
==143075==    by 0x736A395: memmove (string_fortified.h:36)
==143075==    by 0x736A395: add_event (event-parse.c:1042)
==143075==    by 0x736A395: __parse_event (event-parse.c:7856)
==143075==    by 0x736A7EF: tep_parse_event (event-parse.c:7913)
==143075==    by 0x73101B8: read_ftrace_file (trace-input.c:700)
==143075==    by 0x73101B8: read_ftrace_files.constprop.0 (trace-input.c:839)
==143075==    by 0x7315BF7: handle_section (trace-input.c:1192)
==143075==    by 0x7315BF7: read_headers.constprop.0 (trace-input.c:1237)
==143075==    by 0x7315DBA: tracecmd_open_head (trace-input.c:4824)
==143075==    by 0x6374651: kshark_tep_init_input (libkshark-tepdata.c:1550)
==143075==    by 0x636E465: kshark_stream_open (libkshark.c:305)
==143075==    by 0x636E4A6: kshark_open (libkshark.c:110)
==143075==    by 0x48C646F: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:672)
==143075==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==143075==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==143075==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==143075==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==143075==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==143075==    by 0x4900BC7: operator() (std_thread.h:286)
==143075==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==143075==
==143075== Source and destination overlap in memcpy_chk(0x3145ba18, 0x3145ba10, 15328)
==143075==    at 0x484FF62: __memcpy_chk (vg_replace_strmem.c:1617)
==143075==    by 0x736A395: memmove (string_fortified.h:36)
==143075==    by 0x736A395: add_event (event-parse.c:1042)
==143075==    by 0x736A395: __parse_event (event-parse.c:7856)
==143075==    by 0x736A7EF: tep_parse_event (event-parse.c:7913)
==143075==    by 0x7326847: tracecmd_blk_hack (trace-blk-hack.c:142)
==143075==    by 0x731261C: tracecmd_init_data (trace-input.c:4366)
==143075==    by 0x6374661: kshark_tep_init_input (libkshark-tepdata.c:1555)
==143075==    by 0x636E465: kshark_stream_open (libkshark.c:305)
==143075==    by 0x636E4A6: kshark_open (libkshark.c:110)
==143075==    by 0x48C646F: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:672)
==143075==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==143075==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==143075==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==143075==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==143075==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==143075==    by 0x4900BC7: operator() (std_thread.h:286)
==143075==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==143075==    by 0x5DB78F2: execute_native_thread_routine (thread.cc:82)
==143075==
plugin "kvm_combo" failed to initialize on stream trace.dat
==143075== Thread 1:
==143075== Invalid read of size 1
==143075==    at 0x6373BB5: get_info_str (libkshark-tepdata.c:832)
==143075==    by 0x6373BB5: tepdata_get_info (libkshark-tepdata.c:874)
==143075==    by 0x48CECD7: KsViewModel::getValueStr(int, int) const (KsModels.cpp:366)
==143075==    by 0x48CEF33: KsViewModel::getValue(int, int) const (KsModels.cpp:377)
==143075==    by 0x48CEFD0: KsViewModel::data(QModelIndex const&, int) const (KsModels.cpp:312)
==143075==    by 0x59D2C20: QSortFilterProxyModel::data(QModelIndex const&, int) const (qsortfilterproxymodel.cpp:2294)
==143075==    by 0x4D61A27: data (qabstractitemmodel.h:460)
==143075==    by 0x4D61A27: QItemDelegatePrivate::displayRect(QModelIndex const&, QStyleOptionViewItem const&, QRect const&, QRect const&) const (qitemdelegate.cpp:131)
==143075==    by 0x4D62984: QItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const (qitemdelegate.cpp:484)
==143075==    by 0x4D95887: QTableViewPrivate::widthHintForIndex(QModelIndex const&, int, QStyleOptionViewItem const&) const (qtableview.cpp:1024)
==143075==    by 0x4D95B4E: QTableView::sizeHintForColumn(int) const (qtableview.cpp:2425)
==143075==    by 0x4D51470: QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode, bool) (qheaderview.cpp:3551)
==143075==    by 0x48F6F32: KsTraceViewer::_resizeToContents() (KsTraceViewer.cpp:618)
==143075==    by 0x48F793F: KsTraceViewer::loadData(KsDataStore*) (KsTraceViewer.cpp:208)
==143075==  Address 0x12db2704f is not stack'd, malloc'd or (recently) free'd
==143075==
==143075==
==143075== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==143075==  Access not within mapped region at address 0x12DB2704F
==143075==    at 0x6373BB5: get_info_str (libkshark-tepdata.c:832)
==143075==    by 0x6373BB5: tepdata_get_info (libkshark-tepdata.c:874)
==143075==    by 0x48CECD7: KsViewModel::getValueStr(int, int) const (KsModels.cpp:366)
==143075==    by 0x48CEF33: KsViewModel::getValue(int, int) const (KsModels.cpp:377)
==143075==    by 0x48CEFD0: KsViewModel::data(QModelIndex const&, int) const (KsModels.cpp:312)
==143075==    by 0x59D2C20: QSortFilterProxyModel::data(QModelIndex const&, int) const (qsortfilterproxymodel.cpp:2294)
==143075==    by 0x4D61A27: data (qabstractitemmodel.h:460)
==143075==    by 0x4D61A27: QItemDelegatePrivate::displayRect(QModelIndex const&, QStyleOptionViewItem const&, QRect const&, QRect const&) const (qitemdelegate.cpp:131)
==143075==    by 0x4D62984: QItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const (qitemdelegate.cpp:484)
==143075==    by 0x4D95887: QTableViewPrivate::widthHintForIndex(QModelIndex const&, int, QStyleOptionViewItem const&) const (qtableview.cpp:1024)
==143075==    by 0x4D95B4E: QTableView::sizeHintForColumn(int) const (qtableview.cpp:2425)
==143075==    by 0x4D51470: QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode, bool) (qheaderview.cpp:3551)
==143075==    by 0x48F6F32: KsTraceViewer::_resizeToContents() (KsTraceViewer.cpp:618)
==143075==    by 0x48F793F: KsTraceViewer::loadData(KsDataStore*) (KsTraceViewer.cpp:208)
==143075==  If you believe this happened as a result of a stack
==143075==  overflow in your program's main thread (unlikely but
==143075==  possible), you can try to increase the size of the
==143075==  main thread stack using the --main-stacksize= flag.
==143075==  The main thread stack size used in this run was 8388608.
==143075==
==143075== HEAP SUMMARY:
==143075==     in use at exit: 38,157,408 bytes in 604,972 blocks
==143075==   total heap usage: 1,689,533 allocs, 1,084,561 frees, 276,783,916 bytes allocated
==143075==
==143075== LEAK SUMMARY:
==143075==    definitely lost: 4,162 bytes in 3 blocks
==143075==    indirectly lost: 0 bytes in 0 blocks
==143075==      possibly lost: 2,807,856 bytes in 2,232 blocks
==143075==    still reachable: 35,345,390 bytes in 602,737 blocks
==143075==                       of which reachable via heuristic:
==143075==                         newarray           : 24 bytes in 1 blocks
==143075==                         multipleinheritance: 224 bytes in 2 blocks
==143075==         suppressed: 0 bytes in 0 blocks
==143075== Rerun with --leak-check=full to see details of leaked memory
==143075==
==143075== Use --track-origins=yes to see where uninitialised values come from
==143075== For lists of detected and suppressed errors, rerun with: -s
==143075== ERROR SUMMARY: 1898 errors from 5 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)
```
ps. No errors for `valgrind trace-cmd report`.
Comment 6 Vitaly Chikunov 2023-05-16 03:05:00 UTC
(In reply to Yordan Karadzhov from comment #1)
> I see the bug in kernelshark that caused the crash

Can you share your insight or patch?
Comment 7 Yordan Karadzhov 2023-05-17 17:19:46 UTC
Created attachment 304285 [details]
test patch
Comment 8 Yordan Karadzhov 2023-05-17 17:31:13 UTC
Hi Vitaly,

Please try the attached patch and let me know if it fixes all the problems related to the segmentation fault.

What concerns the memory leak that valgrind reports: it seems to be coming from libtraceebent that is the library used to parse tracing data. I am not so familiar with the latest development in the library but I will try to find someone that can help with this issue.

cheers,
Y.
Comment 9 Vitaly Chikunov 2023-05-17 17:45:57 UTC
Yordan, I just tested the patch and kernelshark does not crash anymore on the `trace.dat`. Thanks much!
Comment 10 Yordan Karadzhov 2023-05-17 17:50:01 UTC
Can you confirm that the memory leak that you reported is still there after applying the patch. I am not sure which is the version of the library you use.

thanks,
Y.
Comment 11 Vitaly Chikunov 2023-05-17 18:01:52 UTC
Yes leaks are still there. (after I run and exit kernelshark):
```
==2621936== LEAK SUMMARY:
==2621936==    definitely lost: 4,260 bytes in 85 blocks
==2621936==    indirectly lost: 0 bytes in 0 blocks
==2621936==      possibly lost: 0 bytes in 0 blocks
```

```
==2621936== 2 bytes in 1 blocks are definitely lost in loss record 4 of 2,226 
==2621936==    at 0x484579B: malloc (vg_replace_malloc.c:380)
==2621936==    by 0x602DB89: strdup (strdup.c:42)
==2621936==    by 0x636E01A: kshark_stream_alloc (libkshark.c:175)
==2621936==    by 0x636E01A: kshark_add_stream (libkshark.c:248)
==2621936==    by 0x636E48E: kshark_open (libkshark.c:106)
==2621936==    by 0x48C646F: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:672)
==2621936==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==2621936==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==2621936==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==2621936==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==2621936==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==2621936==    by 0x4900BC7: operator() (std_thread.h:286)
==2621936==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==2621936==    by 0x5DB78F2: execute_native_thread_routine (thread.cc:82)
==2621936==    by 0x601B8E3: start_thread (pthread_create.c:442)
==2621936==    by 0x609F83F: clone (in /lib64/libc.so.6)
==2621936==    
==2621936== 10 bytes in 10 blocks are definitely lost in loss record 15 of 2,226
==2621936==    at 0x484579B: malloc (vg_replace_malloc.c:380)
==2621936==    by 0x6010B47: __vasprintf_internal (vasprintf.c:75)
==2621936==    by 0x60AEB1E: __asprintf_chk (asprintf_chk.c:34)
==2621936==    by 0x6373BCF: asprintf (stdio2.h:137)
==2621936==    by 0x6373BCF: get_info_str (libkshark-tepdata.c:835)
==2621936==    by 0x6373BCF: tepdata_get_info (libkshark-tepdata.c:874)
==2621936==    by 0x48CECD7: KsViewModel::getValueStr(int, int) const (KsModels.cpp:366)
==2621936==    by 0x48CEF33: KsViewModel::getValue(int, int) const (KsModels.cpp:377)
==2621936==    by 0x48CEFD0: KsViewModel::data(QModelIndex const&, int) const (KsModels.cpp:312)
==2621936==    by 0x59D2C20: QSortFilterProxyModel::data(QModelIndex const&, int) const (qsortfilterproxymodel.cpp:2294)
==2621936==    by 0x4D631C7: data (qabstractitemmodel.h:460)
==2621936==    by 0x4D631C7: QItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const (qitemdelegate.cpp:443)
==2621936==    by 0x4D9096B: QTableViewPrivate::drawCell(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) (qtableview.cpp:1006)
==2621936==    by 0x4D9A2E6: QTableView::paintEvent(QPaintEvent*) (qtableview.cpp:1567)
==2621936==    by 0x4B0FD77: QWidget::event(QEvent*) (qwidget.cpp:9045)

==2621936== 72 bytes in 72 blocks are definitely lost in loss record 2,106 of 2,226
==2621936==    at 0x484579B: malloc (vg_replace_malloc.c:380)
==2621936==    by 0x6010B47: __vasprintf_internal (vasprintf.c:75)
==2621936==    by 0x60AEB1E: __asprintf_chk (asprintf_chk.c:34)
==2621936==    by 0x6373BCF: asprintf (stdio2.h:137)
==2621936==    by 0x6373BCF: get_info_str (libkshark-tepdata.c:835)
==2621936==    by 0x6373BCF: tepdata_get_info (libkshark-tepdata.c:874)
==2621936==    by 0x48CECD7: KsViewModel::getValueStr(int, int) const (KsModels.cpp:366)
==2621936==    by 0x48CEF33: KsViewModel::getValue(int, int) const (KsModels.cpp:377)
==2621936==    by 0x48CEFD0: KsViewModel::data(QModelIndex const&, int) const (KsModels.cpp:312)
==2621936==    by 0x59D2C20: QSortFilterProxyModel::data(QModelIndex const&, int) const (qsortfilterproxymodel.cpp:2294)
==2621936==    by 0x4D61A27: data (qabstractitemmodel.h:460)
==2621936==    by 0x4D61A27: QItemDelegatePrivate::displayRect(QModelIndex const&, QStyleOptionViewItem const&, QRect const&, QRect const&) const (qitemdelegate.cpp:131)
==2621936==    by 0x4D62984: QItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const (qitemdelegate.cpp:484)
==2621936==    by 0x4D95887: QTableViewPrivate::widthHintForIndex(QModelIndex const&, int, QStyleOptionViewItem const&) const (qtableview.cpp:1024)
==2621936==    by 0x4D95B4E: QTableView::sizeHintForColumn(int) const (qtableview.cpp:2425)
==2621936== 
==2621936== 80 bytes in 1 blocks are definitely lost in loss record 2,159 of 2,226
==2621936==    at 0x484A1E8: calloc (vg_replace_malloc.c:1117)
==2621936==    by 0xBBD05C8: ???
==2621936==    by 0xBBD072E: ???
==2621936==    by 0x6371930: plugin_init (libkshark-plugin.c:654)
==2621936==    by 0x637261D: kshark_handle_all_dpis (libkshark-plugin.c:759)
==2621936==    by 0x48C650D: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:680)
==2621936==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==2621936==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==2621936==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==2621936==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==2621936==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==2621936==    by 0x4900BC7: operator() (std_thread.h:286)
==2621936==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==2621936==    by 0x5DB78F2: execute_native_thread_routine (thread.cc:82)
==2621936==    by 0x601B8E3: start_thread (pthread_create.c:442)
==2621936==    by 0x609F83F: clone (in /lib64/libc.so.6)

==2621936== 4,096 bytes in 1 blocks are definitely lost in loss record 2,216 of 2,226
==2621936==    at 0x484579B: malloc (vg_replace_malloc.c:380)
==2621936==    by 0x736F79F: trace_seq_init (trace-seq.c:48)
==2621936==    by 0x63746A4: init_thread_seq (libkshark-tepdata.c:36)
==2621936==    by 0x63746A4: kshark_tep_init_input (libkshark-tepdata.c:1540)
==2621936==    by 0x636E465: kshark_stream_open (libkshark.c:305)
==2621936==    by 0x636E4A6: kshark_open (libkshark.c:110)
==2621936==    by 0x48C646F: KsDataStore::_openDataFile(kshark_context*, QString const&) (KsUtils.cpp:672)
==2621936==    by 0x48CC6C9: KsDataStore::loadDataFile(QString const&, QVector<kshark_dpi*>) (KsUtils.cpp:715)
==2621936==    by 0x4900BC7: operator() (KsMainWindow.cpp:1296)
==2621936==    by 0x4900BC7: __invoke_impl<void, KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:61)
==2621936==    by 0x4900BC7: __invoke<KsMainWindow::_load(const QString&, bool)::<lambda()> > (invoke.h:96)
==2621936==    by 0x4900BC7: _M_invoke<0> (std_thread.h:279)
==2621936==    by 0x4900BC7: operator() (std_thread.h:286)
==2621936==    by 0x4900BC7: std::thread::_State_impl<std::thread::_Invoker<std::tuple<KsMainWindow::_load(QString const&, bool)::{lambda()#1}> > >::_M_run() (std_thread.h:231)
==2621936==    by 0x5DB78F2: execute_native_thread_routine (thread.cc:82)
==2621936==    by 0x601B8E3: start_thread (pthread_create.c:442)
==2621936==    by 0x609F83F: clone (in /lib64/libc.so.6)
```

Note You need to log in before you can comment on or make changes to this bug.