microsoft / microsoft/WSL

CLOCK_MONOTONIC_COARSE - zookeeper client can not connect server in bash shell

Open
#1,057 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

  • A brief description
    The zookeeper client can not connect server
  • Expected results
Connecting to 192.168.99.100:2181
2016-09-06 16:39:49,682 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.8--1, built on 02/06/2016 03:18 GMT
2016-09-06 16:39:49,760 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=DESKTOP-6GTI9HG
2016-09-06 16:39:49,760 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_102
2016-09-06 16:39:49,790 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-09-06 16:39:49,790 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=C:\Program Files\Java\jdk1.8.0_102\jre
2016-09-06 16:39:49,790 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=F:\zookeeper\bin\..\build\classes;F:\zookeeper\bin\..\build\lib\*;F:\zookeeper\bin\..\zookeeper-3.4.8.jar;F:\zookeeper\bin\..\lib\jline-0.9.94.jar;F:\zookeeper\bin\..\lib\log4j-1.2.16.jar;F:\zookeeper\bin\..\lib\netty-3.7.0.Final.jar;F:\zookeeper\bin\..\lib\slf4j-api-1.6.1.jar;F:\zookeeper\bin\..\lib\slf4j-log4j12-1.6.1.jar;F:\zookeeper\bin\..\conf
2016-09-06 16:39:49,790 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=C:\Program Files\Java\jdk1.8.0_102\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;F:\zookeeper\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Bitvise SSH Client;C:\Users\shenglu\AppData\Local\atom\bin;C:\Program Files\Docker Toolbox;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;.
2016-09-06 16:39:49,791 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=C:\Users\shenglu\AppData\Local\Temp\
2016-09-06 16:39:49,791 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2016-09-06 16:39:49,792 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Windows 10
2016-09-06 16:39:49,792 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2016-09-06 16:39:49,793 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=10.0
2016-09-06 16:39:49,793 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=shenglu
2016-09-06 16:39:49,794 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=C:\Users\shenglu
2016-09-06 16:39:49,794 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=F:\zookeeper\bin
2016-09-06 16:39:49,795 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=192.168.99.100:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@506c589e
Welcome to ZooKeeper!
2016-09-06 16:39:50,390 [myid:] - INFO  [main-SendThread(192.168.99.100:2181):ClientCnxn$SendThread@1032] - Opening socket connection to server 192.168.99.100/192.168.99.100:2181. Will not attempt to authenticate using SASL (unknown error)
2016-09-06 16:39:50,394 [myid:] - INFO  [main-SendThread(192.168.99.100:2181):ClientCnxn$SendThread@876] - Socket connection established to 192.168.99.100/192.168.99.100:2181, initiating session
JLine support is enabled
2016-09-06 16:39:50,423 [myid:] - INFO  [main-SendThread(192.168.99.100:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server 192.168.99.100/192.168.99.100:2181, sessionid = 0x156fe3146880000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: 192.168.99.100:2181(CONNECTED) 0]
  • Actual results (with terminal output if applicable)
root@DESKTOP-6GTI9HG:/mnt/f/zookeeper/bin# ./zkCli.sh -server 192.168.99.100:2181
Connecting to 192.168.99.100:2181
2016-09-06 06:38:27,907 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.8--1, built on 02/06/2016 03:18 GMT
2016-09-06 06:38:27,917 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=<NA>
2016-09-06 06:38:27,920 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.7.0_111
2016-09-06 06:38:27,925 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-09-06 06:38:27,927 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-7-openjdk-amd64/jre
2016-09-06 06:38:27,929 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/mnt/f/zookeeper/bin/../build/classes:/mnt/f/zookeeper/bin/../build/lib/*.jar:/mnt/f/zookeeper/bin/../lib/slf4j-log4j12-1.6.1.jar:/mnt/f/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/mnt/f/zookeeper/bin/../lib/netty-3.7.0.Final.jar:/mnt/f/zookeeper/bin/../lib/log4j-1.2.16.jar:/mnt/f/zookeeper/bin/../lib/jline-0.9.94.jar:/mnt/f/zookeeper/bin/../zookeeper-3.4.8.jar:/mnt/f/zookeeper/bin/../src/java/lib/*.jar:/mnt/f/zookeeper/bin/../conf:
2016-09-06 06:38:27,932 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
2016-09-06 06:38:27,933 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2016-09-06 06:38:27,934 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2016-09-06 06:38:27,934 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2016-09-06 06:38:27,935 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2016-09-06 06:38:27,938 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=3.4.0+
2016-09-06 06:38:27,938 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2016-09-06 06:38:27,939 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2016-09-06 06:38:27,940 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/mnt/f/zookeeper/bin
2016-09-06 06:38:27,943 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=192.168.99.100:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@48ca42a9
Welcome to ZooKeeper!
JLine support is enabled
[zk: 192.168.99.100:2181(CONNECTING) 0]

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (safepoint.cpp:325), pid=10205, tid=139779135768320[thread 139779107915520 also had an error]

#  guarantee(PageArmed == 0) failed: invariant
#
# JRE version: OpenJDK Runtime Environment (7.0_111-b01) (build 1.7.0_111-b01)
# Java VM: OpenJDK 64-Bit Server VM (24.111-b01 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.7
# Distribution: Ubuntu 14.04 LTS, package 7u111-2.6.7-0ubuntu0.14.04.3
# Core dump written. Default location: /mnt/f/zookeeper/bin/core or core.10205
#
# An error report file with more information is saved as:
# /mnt/f/zookeeper/bin/hs_err_pid10205.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#
./zkCli.sh: line 41: 10205 Aborted                 (core dumped) "$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS org.apache.zookeeper.ZooKeeperMain "$@"
  • Your Windows build number
    version 1607
    OS build 14393.105
  • Steps / commands required to reproduce the error
    1, install zookeeper on a server
    2, get zookeeper.tar.gz from http://zookeeper.apache.org/releases.html
    3, unzip the package
    4, install open jdk by: sudo yum install openjdk-7-jdk
    5, use the bash shell to invoke ./zkCli.sh
  • Strace of the failing command
    the error log is on:

https://gist.github.com/thinksource/84553850ebfd43338de86cacce97face

  • Required packages and commands to install
    openjdk-7-jdk

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing ./zkCli.sh -server 192.168.99.100:2181 in the reported WSL environment with openjdk-7-jdk. Inspect hs_err_pid10205.log and the linked strace, then compare the failing bash-shell run with the successful Windows client run. Done means the ZooKeeper client no longer aborts with the safepoint.cpp PageArmed invariant failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, java
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.