Bug 366712 - konsole freezes after creating a new tab when being in a delete directory
Summary: konsole freezes after creating a new tab when being in a delete directory
Status: RESOLVED DUPLICATE of bug 364779
Alias: None
Product: konsole
Classification: Applications
Component: tabbar (show other bugs)
Version: 16.04.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-12 20:56 UTC by .
Modified: 2016-08-13 11:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
full backtrace (11.99 KB, text/plain)
2016-08-13 00:14 UTC, .
Details

Note You need to log in before you can comment on or make changes to this bug.
Description . 2016-08-12 20:56:50 UTC
konsole freezes

Reproducible: Always

Steps to Reproduce:
1. run konsole
2. `mkdir dir && cd dir && sh -c "cd ..;rmdir dir"`
3. Ctrl+Shift+T

Actual Results:  
Konsole freezes and is unresponsive to user input, `kill -TERM` still work though

Expected Results:  
konsole creates a new tab with PWD set to a default dir

simple backtrace:

```
#0  0x00007f7d2938b5ad in read () from /lib64/libc.so.6
#1  0x00007f7d26038769 in read () at /usr/include/bits/unistd.h:44
#2  forkfd_wait () at io/../../3rdparty/forkfd/forkfd.c:818
#3  0x00007f7d26035890 in waitForDeadChild () at io/qprocess_unix.cpp:950
#4  0x00007f7d25fea197 in _q_startupNotification () at io/qprocess.cpp:1165
#5  0x00007f7d26034a06 in waitForStarted () at io/qprocess_unix.cpp:691
#6  0x00007f7d25fe9e52 in waitForStarted () at io/qprocess.cpp:1804
#7  0x00007f7d29019a0d in start () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3/src/Pty.cpp:254
#8  0x00007f7d29022f8e in run () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3/src/Session.cpp:481
#9  0x00007f7d290260ea in call () at /usr/include/qt5/QtCore/qobjectdefs_impl.h:501
#10 call<QtPrivate::List<>, void> () at /usr/include/qt5/QtCore/qobjectdefs_impl.h:520
#11 impl () at /usr/include/qt5/QtCore/qobject_impl.h:143
#12 0x00007f7d260af0f8 in call () at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#13 activate () at kernel/qobject.cpp:3715
#14 0x00007f7d260af67f in activate () at kernel/qobject.cpp:3595
#15 0x00007f7d29061d30 in imageSizeInitialized () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3_build/src/moc_Emulation.cpp:473
#16 0x00007f7d2906350d in qt_static_metacall () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3_build/src/moc_Emulation.cpp:218
#17 0x00007f7d260af20f in activate () at kernel/qobject.cpp:3730
#18 0x00007f7d260af67f in activate () at kernel/qobject.cpp:3595
#19 0x00007f7d260b980c in timeout () at .moc/qtimer.moc:124
#20 0x00007f7d260b98dd in timerEvent () at kernel/qtimer.cpp:313
#21 0x00007f7d260ae10a in event () at kernel/qobject.cpp:1237
#22 0x00007f7d268aff8a in notify_helper () at kernel/qapplication.cpp:3804
#23 0x00007f7d268b45f2 in notify () at kernel/qapplication.cpp:3163
#24 0x00007f7d2608a98b in notifyInternal2 () at kernel/qcoreapplication.cpp:1015
#25 0x00007f7d260d02e2 in sendEvent () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:225
#26 activateTimers () at kernel/qtimerinfo_unix.cpp:637
#27 0x00007f7d260d0862 in timerSourceDispatch () at kernel/qeventdispatcher_glib.cpp:176
#28 0x00007f7d2026c0ab in g_main_dispatch () at /tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#29 g_main_context_dispatch () at /tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#30 0x00007f7d2026c266 in g_main_context_iterate () at /tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#31 0x00007f7d2026c309 in g_main_context_iteration () at /tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#32 0x00007f7d260d0c34 in processEvents () at kernel/qeventdispatcher_glib.cpp:417
#33 0x00007f7d16eb193a in processEvents () at eventdispatchers/qeventdispatcher_glib.cpp:115
#34 0x00007f7d26089644 in processEvents () at kernel/qeventloop.cpp:128
#35 0x00007f7d26089a0c in exec () at kernel/qeventloop.cpp:204
#36 0x00007f7d26090937 in exec () at kernel/qcoreapplication.cpp:1285
#37 0x00007f7d263a1b5a in exec () at kernel/qguiapplication.cpp:1607
#38 0x00007f7d268ada33 in exec () at kernel/qapplication.cpp:2979
#39 0x00007f7d29672629 in kdemain () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3/src/main.cpp:125
#40 0x000000000040088d in main () at /tmp/portage/kde-apps/konsole-15.12.3/work/konsole-15.12.3_build/src/konsole_dummy.cpp:3
```
Comment 1 . 2016-08-12 20:57:17 UTC
if I attach strace prior to triggering the bug, konsole changes behaviour and reports that it failed to run the shell with a message "directory not found"
Comment 2 . 2016-08-13 00:14:33 UTC
Created attachment 100570 [details]
full backtrace

Konsole 16.04.3
KDE Frameworks 5.23.0
Qt 5.6.1 (built against 5.6.1)
Comment 3 Martin Sandsmark 2016-08-13 11:14:02 UTC
I suspect this is a bit more general, possibly running QProcess::waitForStarted() doesn't handle the child not starting at all very well.

As the hang is in forkfd, I'll add thiago to see if he has any input.
Comment 4 Martin Sandsmark 2016-08-13 11:23:32 UTC
fwiw, even calling waitForStarted(1), i. e. setting the timeout to 1ms, doesn't help.
Comment 5 Martin Sandsmark 2016-08-13 11:32:52 UTC

*** This bug has been marked as a duplicate of bug 364779 ***