Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548598 - app-misc/tmux: exited bash shells left in zombie state
Summary: app-misc/tmux: exited bash shells left in zombie state
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-04 15:35 UTC by Thomas Deutschmann (RETIRED)
Modified: 2017-08-19 17:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
strace output (bash-crash.log,23.70 KB, text/plain)
2015-05-04 15:35 UTC, Thomas Deutschmann (RETIRED)
Details
tmux-strace.log (tmux-strace.log,562.06 KB, text/plain)
2015-05-10 19:11 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2015-05-04 15:35:07 UTC
Created attachment 402634 [details]
strace output

Hi,

my default shell is "bash".

I ssh into a box and start "tmux".

I press "CTRL+b c" to create a new terminal.

`ps faux` looks like

  [...]
  root     12077  0.1  0.0  14296  4452 pts/9    Ss+  17:27   0:00  \_ -bash

When I now exit the terminal (I enter "exit"), bash will crash. `ps faux` will now show

  [...]
  root     12077  0.0  0.0      0     0 ?        Zs   17:27   0:00  \_ [bash] <defunct>


I am attaching a strace log.



 # emerge --info app-shells/bash
Portage 2.2.18 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-4.9.2, glibc-2.20-r2, 3.18.12-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.12-gentoo-x86_64-AMD_Opteron-tm-_Processor_6164_HE-with-gentoo-2.2
KiB Mem:    49391324 total,  37234080 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sun, 03 May 2015 18:45:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          4.3_p33-r2::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.15::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69-r1::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo

ABI="amd64"
ABI_X86="64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ARCH="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=amdfam10 -mtune=amdfam10"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a"
CXXFLAGS="-O2 -pipe -march=amdfam10 -mtune=amdfam10"
DEFAULT_ABI="amd64"
ELIBC="glibc"


=================================================================
                        Package Settings
=================================================================

app-shells/bash-4.3_p33-r2::gentoo was built with the following:
USE="net nls (readline) -afs -bashlogger -examples -mem-scramble -plugins -vanilla" ABI_X86="64"
Comment 1 SpanKY gentoo-dev 2015-05-06 14:55:52 UTC
i'm not seeing a crash in the strace or your ps output.  looks more like tmux is failing to clean up after its children.  defunct means bash has exited and the parent needs to wait() on it.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2015-05-06 15:19:43 UTC
Yes you are right, the strace output shows nothing.

And yes, I am only able to reproduce this with tmux (and only when tmux is starting bash, i.e. using zsh as shell, starting tmux, calling /bin/bash -> exit, doesn't trigger the problem). Screen for example works.

I wondering what's causing this. I already downgraded most dependencies from tmux and bash. I have no idea where to start debugging this... but I can reproduce this on any of my ~ARCH systems.

Any idea where I can start debugging?
Comment 3 SpanKY gentoo-dev 2015-05-10 16:33:23 UTC
what version of tmux are you using ?
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2015-05-10 18:39:19 UTC
I am seeing the problem with

app-misc/tmux-1.9a::gentoo was built with the following:
USE="-debug (-selinux) -vim-syntax" ABI_X86="64"

and

app-misc/tmux-2.0::gentoo was built with the following:
USE="-debug (-selinux) -vim-syntax" ABI_X86="64"
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2015-05-10 19:11:42 UTC
Created attachment 402988 [details]
tmux-strace.log

tmux strace.

1) I started tmux (strace -s0 -f -o /tmp/tmux.log tmux)

2) Created a new window (CTRL+b c)

3) Closed the new window (2) via "exit"

4) Closed the first window via "exit" which terminated "tmux"


root      96549  0.0  0.0      0     0 ?        Zs   21:02   0:00  \_ [bash] <defunct>

PID 96549 was the bash instance created in step 2 and which should be terminated in step 3.


I turned off bash completion via /etc/bash/bashrc (I disabled the for loop sourcing /etc/bash/bashrc.d which contains bash_completion.sh) but this did not help.
Comment 6 Patrice Clement gentoo-dev 2017-08-19 17:49:10 UTC
Thomas

Do you still experience this issue? Feel free to reopen if you do.

Thanks! :)