Mintty/tmux hangs for 1 minute on startup - seems to be a forking issue

Takashi Yano takashi.yano@nifty.ne.jp
Sat Feb 1 15:13:00 GMT 2020


On Sat, 1 Feb 2020 07:39:08 +0000 (UTC)
"Anon User via cygwin" wrote:
> I first reported this problem to the Mintty project at GitHub.  With their help, I was able to debug the issue to the call to forkpty.  I installed tmux and found it also hangs the exact same way.  My guess is any process which makes this fork call will hang in a similar way. Rather than copy/paste the thread, I'd rather just refer you to there : https://github.com/mintty/mintty/issues/960
> 
> I will also direct link to the strace log I made which includes my comment showing where the hang happens:
> https://github.com/mintty/mintty/files/4136651/mintty.strace.log (Line 718 is the hanging point.)
> 
> Also Windows 10's analyze wait chain function in TaskManager shows the process waiting for Network I/O, but we see no evidence of network activity. https://i.imgur.com/Uiw9laH.png
> 
> I haven't seen any other windows applications hang thusly, so I'm at a loss for what I've done to my windows system to have caused this. Otherwise, I'd expect others to share my pain.  Any ideas?

What happens if you run the following test code?

#include <stdio.h>
#include <unistd.h>
#include <pty.h>

int main()
{
        int pm, ps;
        printf("Start.\n");
        openpty(&pm, &ps, NULL, NULL, NULL);
        printf("PTY opened.\n");
        close(pm);
        close(ps);
        printf("PTY closed.\n");
        return 0;
}

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list