Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 417407

Summary: app-misc/tmux hangs if stdout or err is redirected to /dev/null due to bug in libevent.
Product: Gentoo Linux Reporter: Piotr Karbowski (RETIRED) <slashbeast>
Component: Current packagesAssignee: Alex Alexander (RETIRED) <wired>
Status: RESOLVED INVALID    
Severity: normal CC: jer, shell-tools
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Piotr Karbowski (RETIRED) gentoo-dev 2012-05-24 18:31:10 UTC
Whenever we redirect stderr or stdout to /dev/null tmux will hang if there is already tmux running and tmux write anything, Example:

`tmux has-session -t "SessioName" 2>/dev/null` will hang. Its bug in linux's libevent, known for over a year and affecting tmux since 1.4. The workaround or maybe just a proper fix is to set EVENT_NOEPOLL=1 env variable, Note that it will somehow break libevent 1.4 (no idea in what way, I dont have such libevent).

Anyway, debian guys did a patchy to set this envvar from within tmux and fix? some other issues: http://patch-tracker.debian.org/patch/series/view/tmux/1.6-2/platform-quirks.diff

I tested it myself via localpatch, works as expected

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-25 16:19:34 UTC
Our tmux doesn't use the old libevent. Also, Debian has a tmux 1.7 SVN snapshot.
Comment 2 Piotr Karbowski (RETIRED) gentoo-dev 2012-05-25 16:26:30 UTC
(In reply to comment #1)
> Our tmux doesn't use the old libevent. Also, Debian has a tmux 1.7 SVN
> snapshot.

Yes, I know, thats who we *can* use the woraround the NOPOLL one, with libevent 1.4 we can't.
Comment 3 Alex Alexander (RETIRED) gentoo-dev 2013-02-02 04:35:36 UTC
I'm trying to reproduce this but I can't get tmux to crash, can you be a bit more specific on how this is happening?

Can you reproduce it with the latest version of tmux?
Comment 4 Piotr Karbowski (RETIRED) gentoo-dev 2013-02-02 10:18:11 UTC
Cannot reproduce it anyumore.