Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows programs fail to start when invoked under tmux #1944

Closed
pingzing opened this issue Apr 18, 2017 · 3 comments
Closed

Windows programs fail to start when invoked under tmux #1944

pingzing opened this issue Apr 18, 2017 · 3 comments
Labels

Comments

@pingzing
Copy link

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.15063]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
    For a simple example, trying to open notepad from WSL, while in a tmux session e.g.

C:\WINDOWS\system32> bash
pingzing@BEHEMOTH:/mnt/c/Windows/System32$ tmux
pingzing@BEHEMOTH:/mnt/c/Windows/System32$ notepad.exe

After entering notepad.exe, the session hangs indefinitely until force-quit with Ctrl + C. This is not an issue when running outside of tmux.

  • What's wrong / what should be happening instead:
    Notepad (or any other .exe) should open.

  • Strace of the failing command, if applicable: (If <cmd> is failing, then run strace -o strace.txt -ff <cmd>, and post the strace.txt output here)

pingzing@BEHEMOTH:/mnt/c/Windows/System32$ strace notepad.exe
execve("/mnt/c/Windows/System32/notepad.exe", ["notepad.exe"], [/* 18 vars */]) = 0
brk(NULL) = 0x7fffc14e3000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f76d5f00000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=21089, ...}) = 0
mmap(NULL, 21089, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f76d5efa000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f76d5830000
mprotect(0x7f76d59ef000, 2097152, PROT_NONE) = 0
mmap(0x7f76d5bef000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f76d5bef000
mmap(0x7f76d5bf5000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f76d5bf5000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f76d5ef0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f76d5ee0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f76d5ed0000
arch_prctl(ARCH_SET_FS, 0x7f76d5ee0700) = 0
mprotect(0x7f76d5bef000, 16384, PROT_READ) = 0
mprotect(0x7f76d6209000, 4096, PROT_READ) = 0
mprotect(0x7f76d5e25000, 4096, PROT_READ) = 0
munmap(0x7f76d5efa000, 21089) = 0
getpid() = 13469
brk(NULL) = 0x7fffc14e3000
brk(0x7fffc1504000) = 0x7fffc1504000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1668976, ...}) = 0
mmap(NULL, 1668976, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f76d5c8d000
close(3) = 0
getcwd("/mnt/c/Windows/System32", 4096) = 24
open("/dev/lxssclient", O_RDWR) = 3
ioctl(3, _IOC(0, 0x00, 0x2f, 0x22)

@benhillis
Copy link
Member

I can't seem to reproduce this locally. Would you be willing to take a trace?

1. Download the below two .txt files and rename them .cmd
2. Run start_lxcore_trace.cmd from an admin command prompt
3. Perform the repro
4. Run stop_lxcore_trace.cmd from an admin command prompt
5. You should now see three .etl files in the directory where you ran the script
6. Post the logs here.

https://github.com/Microsoft/BashOnWindows/files/288621/start_lxcore_trace.txt
https://github.com/Microsoft/BashOnWindows/files/288622/stop_lxcore_trace.txt

@pingzing
Copy link
Author

Hm. Now that I'm trying to reproduce it for the strace, I'm unable to. I suppose I just got into some kind of transient bad state that's fixed now?

All's well that ends well, I guess. /shrug

Thanks for your time!

@mateuszlewko
Copy link

I had the same issue but system restart resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants