Bug 248155 - konsole hangs trying to start /bin/bash on the 101st konsole session: Could not start program '/bin/bash' WHENEVER "bash-profile > Scrolling > Unlimited scrollback"
Summary: konsole hangs trying to start /bin/bash on the 101st konsole session: Could n...
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-17 16:17 UTC by Bassem W Jamaleddine
Modified: 2011-09-23 20:13 UTC (History)
1 user (show)

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 Bassem W Jamaleddine 2010-08-17 16:17:31 UTC
Version:           unspecified (using KDE 4.4.1) 
OS:                Linux

problem was manifested in Fedora F10, with KDE 4.1. Problem still persistent in Fedora F13, hence I am reporting it. Machine set to use 20 active desktops, and opening extensively windows, each of the window with multiple konsoles.
Having up to 100 konsoles, that is 100 Sessions definition in ~/.kde/share/config/session/konsole_* all konsoles open fine. Upon logout and login again, all 100 konsole (Sessions) reopen OK.

Adding 1 more konsole session to the 100's, that is having 1 or more konsoles sessions above the 100, will open fine, but after Logout and Login again, konsole will hand. Konsole hangs for few minutes, then open all 101 konsole sessions, with the 101st session showing a message: Warning: Could not start program '/bin/bash' with arguments '/bin/bash'.

Reproducible: Always

Steps to Reproduce:
Install Fedora F13 with default KDE package on Intel 64 bits.

The user root is used in all these steps.

Configure 20 virtual desktops.

Open a Konsole, and from Settings > Edit Current Profile > Tabs and select "Show New Tab and Close Tab buttons in tab bar. Apply.

Open multiple Konsoles in few of the virtual desktops.

In each konsole open click on the New Tab to open multiple konsole sessions.

Have up to 100 konsole sessions open in the various Konsoles.
Logout, then Login again, and all konsoles and their sessions open normally.

Open 1 more konsole, then Logout. Login again. Konsole hangs for few minutes. On the 101st konsole (that is the last one open) the warning in red: Warning: Could not start program '/bin/bash' with arguments '/bin/bash'.
In addition the tab bar will not show the directory of the current shell, but the name of the profile as defined in "Konsole > Settings > Current Profile > General > Profile name"

The error is manifested or anything more than 100 konsole Sessions. For instance, having 101st and 102nd konsole Sessions. The Warning will show on the 101st and 102nd konsole session after a hang of few minutes.

ALSO, have 101 sessions, wait until konsole hangs come back. In the 101st konsole session, issue some commands such as ls, then try to 'exit' the 101st konsole: the exit will 'defunct' and konsole hang once again with no come back.
See additional information on processes.

NOTE: session may not be constrained to Konsole session only. An additional session can be a non konsole session. Exclude the mozilla from the session. I did not test with other KDE session beside konsole.




08:40 mm01: ~ # ps -axjf | grep 6486
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    1  6486  6431  6431 ?           -1 Rl       0   0:02 konsole -session 101d323a1ee137000128172415100000121570011_1282046584_825425
 6486  6514  6514  6514 pts/0     6514 Ss+      0   0:00  \_ /bin/bash
 6486  6529  6529  6529 pts/1     6529 Ss+      0   0:00  \_ /bin/bash
 6486  6537  6537  6537 pts/3     6537 Ss+      0   0:00  \_ /bin/bash
...
 6486  8667  8667  8667 pts/100   8667 Ss+      0   0:00  \_ /bin/bash
 6486  8685  8685  8685 pts/101   8685 Ss+      0   0:00  \_ /bin/bash
 6486  8712  8712  8712 pts/102  10296 Ss       0   0:00  \_ /bin/bash
 8712 10297 10296  8712 pts/102  10296 S+       0   0:00      \_ grep 6486


08:41 mm01: ~ # ps -axjf | grep 6486 | wc
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    105    1157    7522
     ^
     |
     +------  105 processes, minus 2 = 103 KONSOLE SESSIONS

SESSIONS SHOULD BE: 105 minus 2 = 103
TAKE AWAY 2 FOR THE grep PROCESS AND FOR THE PARENT konsole -session

08:47 mm01: ~/.kde/share/config/session # grep "\[Session[0-9]" konsole_101d323a1ee137000128172415100000121570011_1282046584_825425 | wc
    103     103    1231
     ^
     |
     +------  103 SESSIONS

THE LAST SESSION IN konsole_*
[Session103]
Encoding=UTF-8
LocalTab=%d : %n (%D)
RemoteTab=%h : %u
WorkingDir[$e]=$HOME

UPON 'exit' KONSOLE HANG WITH PROCESS defunct:
----------------------------------------------
Try to exit from konsole session:
# exit
exit


 6486  8639  8639  8639 pts/99    8639 Ss+      0   0:00  \_ /bin/bash
 6486  8667  8667  8667 pts/100   8667 Ss+      0   0:00  \_ /bin/bash
 6486  8685  8685  8685 ?           -1 Zs       0   0:00  \_ [bash] <defunct>    <----------------  1st exit
 6486  8712  8712  8712 ?           -1 Zs       0   0:00  \_ [bash] <defunct>    <----------------  another exit

-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
100 Konsole Sessions, PROBLEM IS NOT MANIFESTED
-----------------------------------------------------------------------------------------------------
08:54 mm01: ~ # ps -axjf | grep 19627
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    1 19627 19546 19546 ?           -1 Rl       0   0:01 konsole -session 101d323a1ee137000128172415100000121570011_1282049586_89418
19627 19639 19639 19639 pts/0    19639 Ss+      0   0:00  \_ /bin/bash
19627 19656 19656 19656 pts/1    19656 Ss+      0   0:00  \_ /bin/bash
19627 19659 19659 19659 pts/3    19659 Ss+      0   0:00  \_ /bin/bash
19627 19663 19663 19663 pts/4    19663 Ss+      0   0:00  \_ /bin/bash
...
19627 21677 21677 21677 pts/97   21769 Ss       0   0:00  \_ /bin/bash
19627 21722 21722 21722 pts/98   21722 Ss+      0   0:00  \_ /bin/bash
19627 21726 21726 21726 pts/99   21771 Ss       0   0:00  \_ /bin/bash
21726 21772 21771 21726 pts/99   21771 S+       0   0:00      \_ grep 19627
08:54 mm01: ~ # ps -axjf | grep 19627 | wc
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
    102    1124    7309
     ^
     |
     +------  102 processes, minus 2 = 100 KONSOLE SESSIONS


08:55 mm01: ~/.kde/share/config/session # grep "\[Session[0-9]" konsole_101d323a1ee137000128172415100000121570011_1282049586_89418 |wc
    100     100    1192
     ^
     |
     +------  100 SESSIONS
Comment 1 Bassem W Jamaleddine 2010-08-17 16:35:44 UTC
This may be a KDE bug not specifically related to konsole. It is manifested with konsole sessions up to a certain limit of sessions. I noticed first in Fedora F10, but I was hoping to have it resolved. I tried to reproduce in Fedora F13. 
I use always root account for development, with KDE konsole sessions.
To test, I ssh to the machine, have delta backup of the ~/.kde as I gradually added konsole sessions. After Logout, I restore the .kde from the ssh session.
Comment 2 Bassem W Jamaleddine 2010-08-18 20:26:09 UTC
Previous bug was tested on desktop with AMD processor. Bug is persistent when tested on laptop with Intel duo core (vgn-fw373j). Bug being reproduced on a new Fedora F13 install on laptop. Again, I opened as many as 101 session, causing the konsole to hang. I break from X, and edited the ~/.kde/share/config/session/konsole_* to reduce the session count by 1. I login again, and have all 100 konsole session started and none hanging.

Bug is still persistent when tested on a different platform (using Fedora F13 on Intel laptop).
The following shows the diff on the elements deleted from the konsole_* to reduce the konsole session by 1:

8:10 mm07: /2/root/.kde/share/config/session # diff konsole_1015513ca6c8000128182542600000024830027_1282139436_612581 konsole_previously_hang_due_to_101st_session
37c37
< Active=9
---
> Active=10
39c39
< Sessions=92,93,94,95,96,97,98,99,100
---
> Sessions=92,93,94,95,96,97,98,99,100,101
82c82
< NumberOfSessions=100
---
> NumberOfSessions=101
105a106,112
> [Session101]
> Encoding=UTF-8
> LocalTab=%d : %n
> Profile[$e]=$HOME/.kde/share/apps/konsole/bassem.profile
> RemoteTab=%h : %u
> WorkingDir[$e]=$HOME
>
Comment 3 Bassem W Jamaleddine 2010-08-26 00:05:48 UTC
ATTENTION:
Just discovered that the above 101 konsole sessions limitation is manifested 
ONLY when the current bash-profile > Scrolling > Unlimited scrollback is being selected for all the 101 sessions.

I disabled the scrollbar and was able to have the system Logout/Login with more than the 100 konsole sessions (bypassing the 100 konsole sessions limitation).

I also tested by having the "scrollback set to Fixed number of lines: 50000" and was able to overcome the session limitation of 100 maximum konsole sessions.

I am updating the title of this bug. If having Unlimited scrollback is known to force a limitation of 100 KDE konsole sessions, then KDE tester please close this ticket.

NOTE: bug has been tested on many platform with Fedora F13. All platform do not show any memory starvation. Systems were configured with enough systemic resources: Multi-core CPU with 2GB, 8GB and 24GB of memory. Memory and CPU usage showed to be OK. 

ALSO, previous version of KDE 4.1 installed with Fedora F10 showed a similar symptom with konsoles session limitation (IN ADDITION THE CPU used to go to 99% UTILIZATION on the struggling konsole trying to start /bin/bash) whenever "bash-profile > Scrolling > Unlimited scrollback". With F13 with KDE 4.3 the situation has changed as konsole hangs on the 101st konsole session without causing the CPU starvation on trying to start /bin/bash.
Comment 4 Jekyll Wu 2011-09-19 20:31:31 UTC
Can you still reprouduce this in recent version?  I failed to reproduce it in KE-4.7.1, even when the scrollback option is set as 'unlimited history'.
Comment 5 Jekyll Wu 2011-09-23 20:13:37 UTC
Well, I just can't reproduce this. Feel free to reopen if this does happen in recent verion of KDE.