On 12/04/2014 10:49 μμ, Balazs Kezes wrote:
> On 2014-04-07 13:54 +0200, Pavlos Parissis wrote:
>> Let me know what I else I can do in order to help troubleshooting
>> this.
> 
> So I've skimmed the source again and now I've found an actual leak but
> I'm not sure you are hitting this or not. If the fork() in job_run()
> fails then tmux will definitely leak 2 fds. Is it possible that you have
> low process limits or huge amounts of processes or too little memory to
> fork?
> 
> Before fixing this particular leak here's what we can do to eliminate or
> prove this theory for your case. Check out the latest sources and apply
> the following to it:
> 
> diff --git a/job.c b/job.c
> index d7bd852..027a21d 100644
> --- a/job.c
> +++ b/job.c
> @@ -58,6 +58,7 @@ job_run(const char *cmd, struct session *s,
>  
>       switch (pid = fork()) {
>       case -1:
> +             open("/tmp/tmux_fork_proved", O_WRONLY|O_CREAT, 0666);
>               environ_free(&env);
>               return (NULL);
>       case 0:         /* child */
> 
> Then recompile, install and restart your tmux server. When you start
> seeing leaking fds again just check for the above file whether it exists
> and then report back.
> 
> Thank you!
> 

Patched applied, code was compiled, server was restarted and now I am
waiting.

Thanks,
Pavlos


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to