bloomberg/comdb2

pmux tool exists prematurely on WSL (Ubuntu 18)

aibolit opened this issue · 1 comments

Describe the bug
pmux does not start correctly on WSL Ubuntu 18. I have tested 2 machines with clean WSL installs. (It works fine on my mac though.)

To Reproduce
Steps to reproduce the behavior:

  1. Install WSL Ubuntu 18 on windows 10
  2. Follow the steps in the readme to install all tools
  3. When running the pmux tool notice its exists right away
  4. Running pmux with the -f argument produces
$ sudo /opt/bb/bin/pmux -n -f
pmux: failed to listen on unix path:/tmp/portmux.socket

running with -b option and providing a path does not help

Expected behavior
pmux doesn't exit right after starting

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • WSL - Ubuntu Linux 18.04

Last few lines of strace

socket(AF_INET, SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_IP) = 6
setsockopt(6, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(6, {sa_family=AF_INET, sin_port=htons(5105), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(6, 128)                          = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}) = 0
unlink("/tmp/portmux.socket")           = -1 ENOENT (No such file or directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK, 0) = 7
setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = -1 EINVAL (Invalid argument)
close(7)                                = 0
brk(0x7ffff0879000)                     = 0x7ffff0879000
time([1591277200 /* 2020-06-04T09:26:40-0400 */]) = 1591277200 (2020-06-04T09:26:40-0400)
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=3545, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=3545, ...}) = 0
read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 3545
lseek(7, -2261, SEEK_CUR)               = 1284
read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 2261
close(7)                                = 0
writev(2, [{iov_base="pmux: failed to listen on unix p"..., iov_len=56}], 1pmux: failed to listen on unix path:/tmp/portmux.socket
) = 56
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 7
connect(7, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = -1 ENOENT (No such file or directory)
close(7)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++