https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=13594

            Bug ID: 13594
           Summary: Crash when starting capture while saving capture file
                    or rescanning file after display filter change
           Product: Wireshark
           Version: Git
          Hardware: x86
                OS: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: Low
         Component: Qt UI
          Assignee: bugzilla-ad...@wireshark.org
          Reporter: mikael.kanst...@gmail.com
  Target Milestone: ---

Build Information:
Wireshark 2.3.0 (v2.3.0rc0-3070-g7c3c15a)

Copyright 1998-2017 Gerald Combs <ger...@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 5.5.1, with libpcap, with POSIX capabilities (Linux),
with libnl 3, with GLib 2.48.2, with zlib 1.2.8, with SMI 0.4.8, with c-ares
1.10.0, with Lua 5.2.4, with GnuTLS 3.4.10, with Gcrypt 1.6.5, with MIT
Kerberos, with GeoIP, with nghttp2 1.7.1, with LZ4, with Snappy, with
QtMultimedia, without AirPcap, with SBC, with SpanDSP.

Running on Linux 4.8.0-41-generic, with       Intel(R) Xeon(R) CPU E5-1650 v2 @
3.50GHz (with SSE4.2), with 24038 MB of physical memory, with locale
en_US.UTF-8, with libpcap version 1.7.4, with GnuTLS 3.4.10, with Gcrypt 1.6.5,
with zlib 1.2.8.

Built using gcc 5.4.0 20160609.

--
Two different crashes observed but use case are quite similar and call stacks
indicate root cause might be same so reporting them as one.

The use cases are like this:

Crash #1

1. Capture or open a big capture file.
2. Save capture file
3. While save file operation is ongoing..
4. Open "Capture Options" dialog
5. Start new capture
6. Crash observed.

Crash #2

1. Capture or open a big capture file.
2. Set a display filter
3. While rescanning is ongoing..
4. Open "Capture Options" dialog
5. Start new capture
6. Crash observed.

The use case is perhaps a bit odd but it has happened to me by accident a
number of times as the UI allows it.


Crash #1 - Start capture while saving capture file...

Thread 1 "wireshark" received signal SIGSEGV, Segmentation fault.
wtap_seek_read (wth=0x0, seek_off=228115028, phdr=phdr@entry=0x7fffffffc690,
buf=buf@entry=0x7fffffffc670, err=err@entry=0x7fffffffc5cc, 
    err_info=err_info@entry=0x7fffffffc5d0) at wtap.c:1403
1403            phdr->pkt_encap = wth->file_encap;
(gdb) bt
#0  wtap_seek_read (wth=0x0, seek_off=228115028,
phdr=phdr@entry=0x7fffffffc690, buf=buf@entry=0x7fffffffc670,
err=err@entry=0x7fffffffc5cc, 
    err_info=err_info@entry=0x7fffffffc5d0) at wtap.c:1403
#1  0x000000000047fe15 in cf_read_record_r (cf=cf@entry=0xc83ce0 <cfile>,
fdata=fdata@entry=0xaad1220, phdr=phdr@entry=0x7fffffffc690, 
    buf=buf@entry=0x7fffffffc670) at file.c:1502
#2  0x0000000000480aea in process_specified_records (cf=cf@entry=0xc83ce0
<cfile>, range=range@entry=0x0, string1=string1@entry=0x79e74c "Saving", 
    string2=string2@entry=0x79d1d4 "packets", callback=callback@entry=0x47e2e0
<save_record>, callback_args=callback_args@entry=0x7fffffffc8d0, 
    show_progress_bar=1, terminate_is_stop=1) at file.c:2058
#3  0x000000000048343f in cf_save_records (cf=cf@entry=0xc83ce0 <cfile>,
fname=0x1115df38 "/home/CORPUSERS/23047419/big-sniff4.pcapng.gz", 
    save_format=save_format@entry=2, compressed=compressed@entry=1,
discard_comments=discard_comments@entry=0, dont_reopen=dont_reopen@entry=0)
    at file.c:4560
#4  0x00000000004b25c8 in MainWindow::saveAsCaptureFile (this=0xefb9b0,
cf=0xc83ce0 <cfile>, must_support_comments=must_support_comments@entry=false, 
    dont_reopen=dont_reopen@entry=false) at main_window.cpp:1437
#5  0x00000000004ced4a in MainWindow::on_actionFileSaveAs_triggered
(this=<optimized out>) at main_window_slots.cpp:1769
#6  0x00000000005e6cd1 in MainWindow::qt_static_metacall (_o=_o@entry=0xefb9b0,
_c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=99, 
    _a=_a@entry=0x7fffffffcec0) at main_window.moc.cpp:1503
#7  0x00000000005e6f77 in MainWindow::qt_metacall (this=0xefb9b0,
_c=QMetaObject::InvokeMetaMethod, _id=99, _a=0x7fffffffcec0) at
main_window.moc.cpp:1821
#8  0x00007ffff0aabee0 in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff1366412 in QAction::triggered(bool) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff1368898 in QAction::activate(QAction::ActionEvent) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff1368e1f in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff0aacc01 in QObject::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff1369122 in QAction::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff137005c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff1375516 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff0a7d38b in QCoreApplication::notifyInternal(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff0a7f786 in QCoreApplicationPrivate::sendPostedEvents(QObject*,
int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff0ad33c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff18ec197 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff18ec3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff18ec49c in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff0ad37cf in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff0a7ab4a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff0a82bec in QCoreApplication::exec() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x0000000000472dbf in main (argc=2, qt_argv=<optimized out>) at
wireshark-qt.cpp:907



Crash #2 - Start capture while rescanning...

Thread 1 "wireshark" received signal SIGSEGV, Segmentation fault.
wtap_seek_read (wth=0x0, seek_off=162921404, phdr=phdr@entry=0xc83dd8
<cfile+248>, buf=buf@entry=0xc83ed0 <cfile+496>, err=err@entry=0x7fffffffc08c, 
    err_info=err_info@entry=0x7fffffffc090) at wtap.c:1403
1403            phdr->pkt_encap = wth->file_encap;
(gdb) bt
#0  wtap_seek_read (wth=0x0, seek_off=162921404, phdr=phdr@entry=0xc83dd8
<cfile+248>, buf=buf@entry=0xc83ed0 <cfile+496>, err=err@entry=0x7fffffffc08c, 
    err_info=err_info@entry=0x7fffffffc090) at wtap.c:1403
#1  0x000000000047fe15 in cf_read_record_r (cf=cf@entry=0xc83ce0 <cfile>,
fdata=fdata@entry=0x9519bd8, phdr=phdr@entry=0xc83dd8 <cfile+248>, 
    buf=buf@entry=0xc83ed0 <cfile+496>) at file.c:1502
#2  0x0000000000482735 in cf_read_record (fdata=0x9519bd8, cf=0xc83ce0 <cfile>)
at file.c:1528
#3  rescan_packets (cf=cf@entry=0xc83ce0 <cfile>, action=action@entry=0x799026
"Filtering", 
    action_item=action_item@entry=0x8c479b0 "wlan.addr == 9c:d6:43:32:b9:f1",
redissect=redissect@entry=0) at file.c:1734
#4  0x0000000000482d2e in cf_filter_packets (cf=0xc83ce0 <cfile>,
dftext=0x8c479b0 "wlan.addr == 9c:d6:43:32:b9:f1", 
    dftext@entry=0x8c47978 "wlan.addr == 9c:d6:43:32:b9:f1",
force=force@entry=1) at file.c:1453
#5  0x00000000004cc9ac in MainWindow::filterPackets (this=this@entry=0xef9760,
new_filter=..., force=force@entry=true) at main_window_slots.cpp:286
#6  0x00000000005e5f04 in MainWindow::qt_static_metacall (_o=0xef9760,
_c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc640)
    at main_window.moc.cpp:1416
#7  0x00007ffff0aabd2a in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00000000005e14a6 in DisplayFilterEdit::filterPackets
(this=this@entry=0x12deb80, _t1=..., _t2=_t2@entry=true) at
display_filter_edit.moc.cpp:254
#9  0x00000000004946ae in DisplayFilterEdit::applyDisplayFilter
(this=0x12deb80) at display_filter_edit.cpp:493
#10 0x00000000005e185d in DisplayFilterEdit::qt_static_metacall (_o=<optimized
out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at display_filter_edit.moc.cpp:146
#11 0x00007ffff0aabd2a in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff14c5f25 in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff0aabd2a in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff15504ef in QWidgetLineControl::processKeyEvent(QKeyEvent*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff14bf88a in QLineEdit::keyPressEvent(QKeyEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x000000000056dceb in SyntaxLineEdit::completionKeyPressEvent
(this=0x12deb80, event=0x7fffffffd200) at syntax_line_edit.cpp:318
#17 0x00007ffff13b32b7 in QWidget::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff14c6349 in QLineEdit::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff148be75 in QComboBox::keyPressEvent(QKeyEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff13b32b7 in QWidget::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff14871c6 in QComboBox::event(QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x0000000000656bbd in DisplayFilterCombo::event (this=0xd57a30,
event=0x7fffffffd200) at display_filter_combo.cpp:122
#23 0x00007ffff137005c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff137709b in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff0a7d38b in QCoreApplication::notifyInternal(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff13cfb23 in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff137005c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff1375516 in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff0a7d38b in QCoreApplication::notifyInternal(QObject*, QEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff0dbc15e in
QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*)
() from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#31 0x00007ffff0dc1185 in
QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*)
()
   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#32 0x00007ffff0da4f08 in
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>)
()
   from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#33 0x00007fffe41af060 in ?? () from
/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#34 0x00007ffff18ec197 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff18ec3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff18ec49c in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffff0ad37cf in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007ffff0a7ab4a in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007ffff0a82bec in QCoreApplication::exec() () from
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x0000000000472dbf in main (argc=2, qt_argv=<optimized out>) at
wireshark-qt.cpp:907

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to