Skip to content

Instantly share code, notes, and snippets.

@fasterthanlime
Last active April 19, 2016 02:52
Show Gist options
  • Select an option

  • Save fasterthanlime/cc0891038deb8205e263a1cee946b334 to your computer and use it in GitHub Desktop.

Select an option

Save fasterthanlime/cc0891038deb8205e263a1cee946b334 to your computer and use it in GitHub Desktop.
Is.. is this a race condition when two goroutines are trying to write to the standard output?
goroutine profile: total 6
1 @ 0x77952f 0x7792fa 0x774bdb 0x616d55 0x616f77 0x5246e1 0x525f84 0x526b45 0x5233f5 0x4818e1
# 0x77952f runtime/pprof.writeRuntimeProfile+0xbf C:/Go/src/runtime/pprof/pprof.go:545
# 0x7792fa runtime/pprof.writeGoroutine+0x9a C:/Go/src/runtime/pprof/pprof.go:507
# 0x774bdb runtime/pprof.(*Profile).WriteTo+0xdb C:/Go/src/runtime/pprof/pprof.go:236
# 0x616d55 net/http/pprof.handler.ServeHTTP+0x385 C:/Go/src/net/http/pprof/pprof.go:210
# 0x616f77 net/http/pprof.Index+0x207 C:/Go/src/net/http/pprof/pprof.go:222
# 0x5246e1 net/http.HandlerFunc.ServeHTTP+0x41 C:/Go/src/net/http/server.go:1618
# 0x525f84 net/http.(*ServeMux).ServeHTTP+0x184 C:/Go/src/net/http/server.go:1910
# 0x526b45 net/http.serverHandler.ServeHTTP+0x1a5 C:/Go/src/net/http/server.go:2081
# 0x5233f5 net/http.(*conn).serve+0xf35 C:/Go/src/net/http/server.go:1472
1 @ 0x45359c 0x45366b 0x4631ac 0x462dcd 0x662f6b 0x55f5cb 0x55ae17 0x486c1c 0x486cda 0x6f1fa3 0x6f2b30 0x6631db 0x6f09cc 0x57ed22 0x41070d 0x40ed89 0x41b92b 0x45318e 0x4818e1
# 0x462dcd sync.runtime_Semacquire+0x2d C:/Go/src/runtime/sema.go:47
# 0x662f6b sync.(*Mutex).Lock+0x1cb C:/Go/src/sync/mutex.go:83
# 0x55f5cb os.(*File).write+0x7b C:/Go/src/os/file_windows.go:395
# 0x55ae17 os.(*File).Write+0x97 C:/Go/src/os/file.go:136
# 0x486c1c fmt.Fprint+0xac C:/Go/src/fmt/print.go:223
# 0x486cda fmt.Print+0x7a C:/Go/src/fmt/print.go:232
# 0x6f1fa3 github.com/itchio/butler/pb.(*ProgressBar).write+0x15b3 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:331
# 0x6f2b30 github.com/itchio/butler/pb.(*ProgressBar).Finish.func1+0x70 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:196
# 0x6631db sync.(*Once).Do+0xeb C:/Go/src/sync/once.go:44
# 0x6f09cc github.com/itchio/butler/pb.(*ProgressBar).Finish+0x4c C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:201
# 0x57ed22 github.com/itchio/butler/comm.EndProgress+0x92 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/comm/progress.go:149
# 0x41070d main.doPush+0x194d C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/push.go:267
# 0x40ed89 main.push+0x79 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/push.go:24
# 0x41b92b main.main+0xc8b C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/main.go:334
# 0x45318e runtime.main+0x27e C:/Go/src/runtime/proc.go:188
1 @ 0x4818e1
1 @ 0x45359c 0x44d065 0x44c527 0x4a5201 0x4a6417 0x4a99fc 0x4a9f63 0x4c5584 0x527d58 0x526e90 0x526cdd 0x5273ff 0x41f040 0x4818e1
# 0x44c527 net.runtime_pollWait+0x67 C:/Go/src/runtime/netpoll.go:160
# 0x4a5201 net.(*pollDesc).Wait+0x41 C:/Go/src/net/fd_poll_runtime.go:73
# 0x4a6417 net.(*ioSrv).ExecIO+0x177 C:/Go/src/net/fd_windows.go:183
# 0x4a99fc net.(*netFD).acceptOne+0x26c C:/Go/src/net/fd_windows.go:583
# 0x4a9f63 net.(*netFD).accept+0x173 C:/Go/src/net/fd_windows.go:613
# 0x4c5584 net.(*TCPListener).AcceptTCP+0x54 C:/Go/src/net/tcpsock_posix.go:254
# 0x527d58 net/http.tcpKeepAliveListener.Accept+0x48 C:/Go/src/net/http/server.go:2427
# 0x526e90 net/http.(*Server).Serve+0x130 C:/Go/src/net/http/server.go:2117
# 0x526cdd net/http.(*Server).ListenAndServe+0x13d C:/Go/src/net/http/server.go:2098
# 0x5273ff net/http.ListenAndServe+0x9f C:/Go/src/net/http/server.go:2195
# 0x41f040 main.setupHTTPDebug.func1+0x50 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/main.go:393
1 @ 0x460f30 0x41e76a 0x4818e1
# 0x41e76a main.doPush.func2+0x7a C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/push.go:175
1 @ 0x424767 0x46d15c 0x5ffb21 0x55f3b2 0x55f649 0x55ae17 0x486c1c 0x486cda 0x6f1fa3 0x6f2879 0x6f29d1 0x4818e1
# 0x46d15c syscall.Syscall6+0x5c C:/Go/src/runtime/syscall_windows.go:139
# 0x5ffb21 syscall.WriteConsole+0xb1 C:/Go/src/syscall/zsyscall_windows.go:1250
# 0x55f3b2 os.(*File).writeConsole+0x512 C:/Go/src/os/file_windows.go:382
# 0x55f649 os.(*File).write+0xf9 C:/Go/src/os/file_windows.go:398
# 0x55ae17 os.(*File).Write+0x97 C:/Go/src/os/file.go:136
# 0x486c1c fmt.Fprint+0xac C:/Go/src/fmt/print.go:223
# 0x486cda fmt.Print+0x7a C:/Go/src/fmt/print.go:232
# 0x6f1fa3 github.com/itchio/butler/pb.(*ProgressBar).write+0x15b3 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:331
# 0x6f2879 github.com/itchio/butler/pb.(*ProgressBar).Update+0x69 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:355
# 0x6f29d1 github.com/itchio/butler/pb.(*ProgressBar).writer+0x101 C:/Multi-Runner/builds/58469115/1/itchio/butler/src/github.com/itchio/butler/pb/pb.go:372
@fasterthanlime
Copy link
Copy Markdown
Author

WHY WINDOWS WHY

@fasterthanlime
Copy link
Copy Markdown
Author

WHY WINDOWS WHY

pressing enter fixed it. Working theory involves scrolling. Still pretty poop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment