for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

High resolution time rounded

Open xdmytrox opened this issue 7 years ago • 3 comments

  • [x] I have tried with the latest version of my channel (Stable or Edge)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: D17898F4-9D56-46D6-81A1-7B11F4419F70/20190731153939

Expected behavior

High resolution time not rounded

Actual behavior

High resolution time rounded

Information

  • macOS System Version: macOS 10.14.6 (18G84)
  • macOS Kernel Version: Darwin 18.7.0
  • Docker for Mac: Version 2.0.0.3 (31259), Channel: stable, 8858db33c8

Diagnostic logs

/Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload
Gathering diagnostics for ID D17898F4-9D56-46D6-81A1-7B11F4419F70/20190731153939 into /tmp/D17898F4-9D56-46D6-81A1-7B11F4419F70/20190731153939.zip.
This may take up to 10 minutes.
time="2019-07-31T18:39:40+03:00" level=warning msg="[/usr/local/bin/kubectl.docker --namespace docker get pods -o go-template={{range .items}}{{.metadata.name}}\n{{end}}]: exit status 1" type=kubernetes
time="2019-07-31T18:39:40+03:00" level=warning msg="The connection to the server localhost:8080 was refused - did you specify the right host or port?\n" type=kubernetes
time="2019-07-31T18:39:40+03:00" level=warning msg="[/usr/local/bin/kubectl.docker --namespace kube-system get pods -o go-template={{range .items}}{{.metadata.name}}\n{{end}}]: exit status 1" type=kubernetes
time="2019-07-31T18:39:40+03:00" level=warning msg="The connection to the server localhost:8080 was refused - did you specify the right host or port?\n" type=kubernetes
time="2019-07-31T18:39:40+03:00" level=info msg="Start gathering list of 69 elements (timeout=10m0s)" type=list
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sw_vers -productVersion]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sw_vers -buildVersion]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [uname -r]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sysctl kern.boottime]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sysctl hw.memsize]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [vm_stat]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sysctl machdep.cpu]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [uname -a]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [ps uax]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [dmesg]" type=cmd
time="2019-07-31T18:39:40+03:00" level=warning msg="[dmesg] exit status 1" type=cmd
time="2019-07-31T18:39:40+03:00" level=warning msg="[dmesg]: Unable to obtain kernel buffer: Operation not permitted\nusage: sudo dmesg\n" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [id]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [sysctl -a]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [mount]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [df -h]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [launchctl print-disabled system]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [system_profiler SPHardwareDataType]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [defaults read /Library/Preferences/com.apple.alf.plist]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [ifconfig -a]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [netstat -ln]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [netstat -mm]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [netstat -nr]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Gathering: /etc/resolv.conf" type=file
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [scutil --dns]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [scutil --nc list]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [scutil --proxy list]" type=cmd
time="2019-07-31T18:39:40+03:00" level=info msg="Executing: [system_profiler SPFirewallDataType]" type=cmd
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/version" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/info" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/containers/json?all=1" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/nodes" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/services" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="HTTP GET: localhost /v1.24/networks" type=http
time="2019-07-31T18:39:41+03:00" level=info msg="Executing: [/bin/sh -c docker network inspect $(docker network ls -q)]" type=cmd
time="2019-07-31T18:39:41+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describepods" type=kubectl
time="2019-07-31T18:39:41+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describedaemonset" type=kubectl
time="2019-07-31T18:39:41+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describereplicaset" type=kubectl
time="2019-07-31T18:39:41+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describedeployments" type=kubectl
time="2019-07-31T18:39:41+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describepods" type=kubectl
time="2019-07-31T18:39:42+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describedaemonset" type=kubectl
time="2019-07-31T18:39:42+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describereplicaset" type=kubectl
time="2019-07-31T18:39:42+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describedeployments" type=kubectl
time="2019-07-31T18:39:42+03:00" level=info msg="Executing: [/bin/sh -c /usr/bin/log show --debug --info --style syslog --last 1d --predicate 'process matches \".*[Dd]ocker.*\" || (process in {\"kernel\", \"launchservicesd\", \"taskgated-helper\"} && eventMessage contains[c] \"docker\")']" type=cmd
time="2019-07-31T18:39:55+03:00" level=info msg="Executing: [syslog -F $((Time)(JZ)) $Host $(Sender)[$(Facility)][$(PID)] <$((Level)(str))>: $Message -o -k Sender Seq docker -o -k Sender Seq Docker -o -k Message Seq docker -o -k Message Seq Docker]" type=cmd
time="2019-07-31T18:39:55+03:00" level=warning msg="[syslog -F $((Time)(JZ)) $Host $(Sender)[$(Facility)][$(PID)] <$((Level)(str))>: $Message -o -k Sender Seq docker -o -k Sender Seq Docker -o -k Message Seq docker -o -k Message Seq Docker]: NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.\n" type=cmd
time="2019-07-31T18:39:55+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.driver.amd64-linux)]" type=cmd
time="2019-07-31T18:39:55+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.hyperkit)]" type=cmd
time="2019-07-31T18:39:56+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.osxfs)]" type=cmd
time="2019-07-31T18:39:56+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.supervisor)]" type=cmd
time="2019-07-31T18:39:56+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.vpnkit)]" type=cmd
time="2019-07-31T18:39:56+03:00" level=info msg="Executing: [/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.vmnetd)]" type=cmd
time="2019-07-31T18:39:56+03:00" level=warning msg="[/bin/sh -c lsof -n -P -p $(pgrep -o com.docker.vmnetd)] exit status 1" type=cmd
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:version" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:configget-contexts" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:configcurrent-context" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:getnodes" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:getnamespaces" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describenodes" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describepods" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:cluster-infodump" type=kubectl
time="2019-07-31T18:39:56+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describeservices" type=kubectl
time="2019-07-31T18:39:57+03:00" level=warning msg="kubernetes context cannot be reached. Ignoring gatherer:describestorageclass,pv,pvc" type=kubectl
time="2019-07-31T18:39:57+03:00" level=info msg="Executing: [ls -l /Users/dmytro.drachov/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw]" type=cmd
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/DockerAppStderr.txt" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/already-enabled-features.json" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/dhcp.json" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/features.json" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/http_proxy.json" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/last-start-linux-daemon.json" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/Library/Group Containers/group.com.docker/settings.json" type=file
time="2019-07-31T18:39:57+03:00" level=warning msg="/Users/dmytro.drachov/Library/Preferences/group.com.docker.pliststat /Users/dmytro.drachov/Library/Preferences/group.com.docker.plist: no such file or directory" type=file
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/.docker/config.json" type=redacted-json
time="2019-07-31T18:39:57+03:00" level=info msg="Gathering: /Users/dmytro.drachov/.docker/daemon.json" type=redacted-json
time="2019-07-31T18:39:57+03:00" level=info msg="Getting Linux Diagnostics via a virtio socket: hyperkit:/Users/dmytro.drachov/Library/Containers/com.docker.docker/Data/vms/0:62374" type=virtsock
time="2019-07-31T18:40:33+03:00" level=info msg="All 69 gatherers finished" type=list
INFO[0062] Uploaded diagnostics to:  https://docker-pinata-support.s3.amazonaws.com/incoming/3/D17898F4-9D56-46D6-81A1-7B11F4419F70/20190731153939.zip

Steps to reproduce the behavior

FS

Dockerfile

FROM golang:alpine AS builder
COPY . .
RUN go build -o /main .

FROM scratch
COPY --from=builder /main /main
ENTRYPOINT ["/main"]

main.go

package main
import (
	"fmt"
	"time"
)
func main() {
	start := time.Now()
	for i := 0; i < 4; i++ {
		diff := time.Since(start)
		fmt.Println(start.Add(diff).UnixNano())
		time.Sleep(time.Millisecond / 2)
	}
}
  1. Build image docker build -t t_go .
  2. Run container docker run --rm -ti t_go
  3. Collect output
  4. Run main.go on host machine go run main.go
  5. Collect output
Outputs
CONTAINER HOST
1564588055236612500 1564588125422680187
1564588055237863000 1564588125423298125
1564588055238671700 1564588125424016485
1564588055239373900 1564588125424727610

Additional Steps to reproduce the behavior(in Node.JS)

  1. Run container docker run --rm -ti node:alpine node -e 'for(i=0;i<4;i++) console.log(process.hrtime())'
  2. Collect output
  3. Run code on host machine
  4. Collect output
Outputs
CONTAINER HOST
[ 49004, 48147667 ] [ 51087, 475057882 ]
[ 49004, 59633967 ] [ 51087, 480132090 ]
[ 49004, 60040367 ] [ 51087, 480590876 ]
[ 49004, 60303367 ] [ 51087, 480797591 ]

We could see that for go application HR time always ends with 00 in docker environment. For node js application HR time always ends with 67 in docker environment.

xdmytrox avatar Jul 31 '19 16:07 xdmytrox

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Nov 06 '19 01:11 docker-robott

/remove-lifecycle stale

xdmytrox avatar Mar 01 '20 22:03 xdmytrox

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jul 02 '20 03:07 docker-robott