Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417407 - app-misc/tmux hangs if stdout or err is redirected to /dev/null due to bug in libevent.
Summary: app-misc/tmux hangs if stdout or err is redirected to /dev/null due to bug in...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alex Alexander (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-05-24 18:31 UTC by Piotr Karbowski (RETIRED)
Modified: 2013-02-05 11:21 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.