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

godoc segfaults #747

Closed
petar opened this issue Apr 26, 2010 · 4 comments
Closed

godoc segfaults #747

petar opened this issue Apr 26, 2010 · 4 comments

Comments

@petar
Copy link
Contributor

petar commented Apr 26, 2010

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?

I run godoc using the following command line:

godoc -path=/Users/petar/tonika-git/src/pkg -http=:6060

When I navigate to the menu item "Source files" I get a
segfault. This does not happen if I use:

godoc -http=:6060

What is the expected output? What do you see instead?

panic: interface conversion: interface is int64, not uint64 [recovered]
    panic: interface conversion: interface is int64, not uint64

panic PC=0x39bab8
runtime.panic+0x7c /Users/petar/go/src/pkg/runtime/proc.c:1012
    runtime.panic(0x0, 0x39bb00)
template.checkError+0xa2 /Users/petar/go/src/pkg/template/template.go:891
    template.checkError(0x13d320, 0xa63690)
runtime.panic+0xb2 /Users/petar/go/src/pkg/runtime/proc.c:994
    runtime.panic(0x70166, 0x8dca78)
runtime.ifaceE2T+0xf5 /Users/petar/go/src/pkg/runtime/iface.c:282
    runtime.ifaceE2T(0x13d320, 0xa63690, 0x1009b8, 0x0)
main.timeFmt+0x29 /Users/petar/go/src/cmd/godoc/godoc.go:786
    main.timeFmt(0x1009b8, 0x128b50, 0x11853b24269d5a00, 0x39bc88, 0x39bc78, ...)
template.*Template·writeVariable+0xff /Users/petar/go/src/pkg/template/template.go:717
    template.*Template·writeVariable(0x93bbd0, 0x3aa900, 0x128b50, 0x11853b24269d5a00, 
0x448129, ...)
template.*Template·executeElement+0xd5 /Users/petar/go/src/pkg/template/template.go:739
    template.*Template·executeElement(0x43f9b0, 0x414450, 0x8dcab0, 0x414450, 0x1, ...)
template._func_002+0xaa /Users/petar/go/src/pkg/template/template.go:832
    template._func_002(0x43f9b0, 0x100000021, 0x8dcab0, 0x21, 0x11536, ...)
template.*Template·executeRepeated+0x39f
/Users/petar/go/src/pkg/template/template.go:838
    template.*Template·executeRepeated(0x8dcab0, 0x9c42a0, 0xa382c0, 0x8dcab0, 0xa38e00, ...)
template.*Template·executeElement+0x330 /Users/petar/go/src/pkg/template/template.go:745
    template.*Template·executeElement(0x43f9b0, 0x4152a0, 0x8dca80, 0x4152a0, 0x1, ...)
template.*Template·execute+0x36 /Users/petar/go/src/pkg/template/template.go:756
    template.*Template·execute(0x43f9b0, 0x12, 0x8dca80, 0x12, 0x8, ...)
template.*Template·Execute+0xeb /Users/petar/go/src/pkg/template/template.go:923
    template.*Template·Execute(0x43f9b0, 0x2600000000, 0x8dca80, 0xa38e00, 0x91e6d0, ...)
main.applyTemplate+0x71 /Users/petar/go/src/cmd/godoc/godoc.go:970
    main.applyTemplate(0x43f9b0, 0x108af0, 0x91e6c0, 0x93bbd0, 0x3aa900, ...)
main.serveDirectory+0x241 /Users/petar/go/src/cmd/godoc/godoc.go:1091
    main.serveDirectory(0x43f9b0, 0xc8a30, 0xb, 0x108af0, 0x91e6c0, ...)
main.serveFile+0x5aa /Users/petar/go/src/cmd/godoc/godoc.go:1143
    main.serveFile(0xdb86c0, 0x430a480, 0x92c660, 0x300000013)
http.HandlerFunc·ServeHTTP+0x28 /Users/petar/go/src/pkg/http/server.go:326
    http.HandlerFunc·ServeHTTP(0xdb86c0, 0x430a480, 0x59658, 0x6b4a, 0xdb86c0, ...)
http.*ServeMux·ServeHTTP+0x1fd /Users/petar/go/src/pkg/http/server.go:508
    http.*ServeMux·ServeHTTP(0x6b4a, 0xdb86c0, 0x430a480, 0x5, 0x6b01, ...)
http.*Conn·serve+0x7d /Users/petar/go/src/pkg/http/server.go:289
    http.*Conn·serve(0x38e300, 0xdb86c0)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 90812 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
chanrecv+0x164 /Users/petar/go/src/pkg/runtime/chan.c:355
    chanrecv(0xdb86b0, 0xa06e00, 0xab2e8, 0x100000001, 0x1, ...)
runtime.chanrecv1+0x41 /Users/petar/go/src/pkg/runtime/chan.c:429
    runtime.chanrecv1(0xdb8660, 0xd30ca8)
net.*pollServer·WaitRead+0x49 /Users/petar/go/src/pkg/net/fd.go:272
    net.*pollServer·WaitRead(0xdb8660, 0x150ec80, 0x93091, 0x480400)
net.*netFD·Read+0x14d /Users/petar/go/src/pkg/net/fd.go:380
    net.*netFD·Read(0x480400, 0x150ec80, 0x100000001001, 0x0, 0x473a20, ...)
net.*TCPConn·Read+0x74 /Users/petar/go/src/pkg/net/tcpsock.go:92
    net.*TCPConn·Read(0x150ec80, 0x14e4000, 0x100000001000, 0x0, 0x473a20, ...)
bufio.*Reader·fill+0x155 /Users/petar/go/src/pkg/bufio/bufio.go:95
    bufio.*Reader·fill(0x38ea48, 0x14e4000)
bufio.*Reader·ReadSlice+0x1d5 /Users/petar/go/src/pkg/bufio/bufio.go:221
    bufio.*Reader·ReadSlice(0x47a8c0, 0xe6e00000000, 0x1d80a, 0xffffffff, 0x3b87, ...)
http.readLineBytes+0x39 /Users/petar/go/src/pkg/http/request.go:225
    http.readLineBytes(0x47a8c0, 0x1450a, 0x0, 0x0, 0x0, ...)
http.readLine+0x34 /Users/petar/go/src/pkg/http/request.go:249
    http.readLine(0x47a8c0, 0x0, 0x0, 0x0, 0x0, ...)
http.ReadRequest+0x61 /Users/petar/go/src/pkg/http/request.go:467
    http.ReadRequest(0x47a8c0, 0x0, 0x0, 0x0, 0x0, ...)
http.*Conn·readRequest+0x58 /Users/petar/go/src/pkg/http/server.go:82
    http.*Conn·readRequest(0x47a8c0, 0x3b87300, 0x0, 0x0, 0x0, ...)
http.*Conn·serve+0x1c /Users/petar/go/src/pkg/http/server.go:282
    http.*Conn·serve(0xdb8cc0, 0xdb8cc0)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 111 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
runfinq+0x3f /Users/petar/go/src/pkg/runtime/mgc0.c:368
    runfinq()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 4 [3]:
runtime.entersyscall+0x50 /Users/petar/go/src/pkg/runtime/proc.c:563
    runtime.entersyscall()
syscall.Syscall6+0x5 /Users/petar/go/src/pkg/syscall/asm_darwin_amd64.s:39
    syscall.Syscall6()
syscall.kevent+0x6d /Users/petar/go/src/pkg/syscall/zsyscall_darwin_amd64.go:108
    syscall.kevent(0x16b, 0x8, 0x0, 0x0, 0x8ec008, ...)
syscall.Kevent+0x99 /Users/petar/go/src/pkg/syscall/syscall_bsd.go:375
    syscall.Kevent(0x8, 0x0, 0x0, 0x8ec008, 0xa, ...)
net.*pollster·WaitFD+0xfb /Users/petar/go/src/pkg/net/fd_darwin.go:87
    net.*pollster·WaitFD(0x8, 0x0, 0x0, 0x8ec008, 0xa0000000a, ...)
net.*pollServer·Run+0x9e /Users/petar/go/src/pkg/net/fd.go:232
    net.*pollServer·Run(0x8ec000, 0x0)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 3 [3]:
runtime.entersyscall+0x50 /Users/petar/go/src/pkg/runtime/proc.c:563
    runtime.entersyscall()
syscall.Syscall6+0x5 /Users/petar/go/src/pkg/syscall/asm_darwin_amd64.s:39
    syscall.Syscall6()
syscall.Select+0x5d /Users/petar/go/src/pkg/syscall/zsyscall_darwin_amd64.go:512
    syscall.Select(0x5d, 0x0, 0x0, 0x0, 0x0, ...)
syscall.Sleep+0x71 /Users/petar/go/src/pkg/syscall/syscall_bsd.go:145
    syscall.Sleep(0xd00000000, 0x0, 0x0, 0x0)
time.Sleep+0x3b /Users/petar/go/src/pkg/time/sleep.go:19
    time.Sleep(0xdf8475800, 0x5f2c8, 0x3945c0, 0x2)
main.indexer+0x410 /Users/petar/go/src/cmd/godoc/godoc.go:1414
    main.indexer()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

goroutine 1 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
chanrecv+0x164 /Users/petar/go/src/pkg/runtime/chan.c:355
    chanrecv(0x911050, 0x48d660, 0xab2e8, 0x100000001, 0x1, ...)
runtime.chanrecv1+0x41 /Users/petar/go/src/pkg/runtime/chan.c:429
    runtime.chanrecv1(0x911000, 0x397b50)
net.*pollServer·WaitRead+0x49 /Users/petar/go/src/pkg/net/fd.go:272
    net.*pollServer·WaitRead(0x911000, 0x8f60a0, 0x93b0e, 0x480400)
net.*netFD·accept+0x2f2 /Users/petar/go/src/pkg/net/fd.go:508
    net.*netFD·accept(0x480400, 0x8f60a0, 0x0, 0x0, 0x23, ...)
net.*TCPListener·AcceptTCP+0x5a /Users/petar/go/src/pkg/net/tcpsock.go:253
    net.*TCPListener·AcceptTCP(0x8f60a0, 0x990de, 0x0, 0x0, 0x0, ...)
net.*TCPListener·Accept+0x34 /Users/petar/go/src/pkg/net/tcpsock.go:263
    net.*TCPListener·Accept(0x47b788, 0x132cb, 0x0, 0x0, 0x8, ...)
http.Serve+0x66 /Users/petar/go/src/pkg/http/server.go:551
    http.Serve(0x47b788, 0x0, 0x0, 0x0, 0x0, ...)
http.ListenAndServe+0x8e /Users/petar/go/src/pkg/http/server.go:596
    http.ListenAndServe(0x480880, 0x47b788, 0x473810, 0x38e300, 0x480880, ...)
main.main+0x6f7 /Users/petar/go/src/cmd/godoc/main.go:285
    main.main()
mainstart+0xf /Users/petar/go/src/pkg/runtime/amd64/asm.s:60
    mainstart()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()


What is your $GOOS?  $GOARCH?
darwin, amd64

Which revision are you using?  (hg identify)
9c15ff12bfe3+ tip

Please provide any additional information below.
@griesemer
Copy link
Contributor

Comment 1:

Owner changed to g...@golang.org.

Status changed to Accepted.

@petar
Copy link
Contributor Author

petar commented Apr 27, 2010

Comment 2:

If you care to know, today's checkout (1ca43d937dbf+ tip) still segfaults
when I use godoc with a -path parameter and click on "Source files":
2010/04/27 10:20:21 bytes=68242824 footprint=129235192
panic: interface conversion: interface is int64, not uint64 [recovered]
    panic: interface conversion: interface is int64, not uint64
panic PC=0x3b1ab8
runtime.panic+0x7c /Users/petar/go/src/pkg/runtime/proc.c:1012
    runtime.panic(0x0, 0x3b1b00)
template.checkError+0xa2 /Users/petar/go/src/pkg/template/template.go:891
    template.checkError(0x1523e8, 0x11f6690)
runtime.panic+0xb2 /Users/petar/go/src/pkg/runtime/proc.c:994
    runtime.panic(0x4dfb1, 0x23a2988)
runtime.ifaceE2T+0xf5 /Users/petar/go/src/pkg/runtime/iface.c:282
    runtime.ifaceE2T(0x1523e8, 0x11f6690, 0x1132c8, 0x0)
main.timeFmt+0x29 /Users/petar/go/src/cmd/godoc/godoc.go:787
    main.timeFmt(0x1132c8, 0x13cb38, 0x11853b24269d5a00, 0x3b1c88, 0x3b1c78, ...)
template.*Template·writeVariable+0xff /Users/petar/go/src/pkg/template/template.go:717
    template.*Template·writeVariable(0xab9ab0, 0x13ff060, 0x13cb38, 0x11853b24269d5a00, 0x46e8d9, 
...)
template.*Template·executeElement+0xd5 /Users/petar/go/src/pkg/template/template.go:739
    template.*Template·executeElement(0x458a00, 0x3c60c0, 0x23a29c0, 0x3c60c0, 0x1, ...)
template._func_002+0xaa /Users/petar/go/src/pkg/template/template.go:832
    template._func_002(0x458a00, 0x100000021, 0x23a29c0, 0x21, 0x139ca, ...)
template.*Template·executeRepeated+0x39f
/Users/petar/go/src/pkg/template/template.go:838
    template.*Template·executeRepeated(0x23a29c0, 0x2086720, 0x1372520, 0x23a29c0, 0x1372500, ...)
template.*Template·executeElement+0x330 /Users/petar/go/src/pkg/template/template.go:745
    template.*Template·executeElement(0x458a00, 0x42bc00, 0x23a2990, 0x42bc00, 0x1, ...)
template.*Template·execute+0x36 /Users/petar/go/src/pkg/template/template.go:756
    template.*Template·execute(0x458a00, 0x12, 0x23a2990, 0x12, 0x8, ...)
template.*Template·Execute+0xeb /Users/petar/go/src/pkg/template/template.go:923
    template.*Template·Execute(0x458a00, 0x2600000000, 0x23a2990, 0x1372500, 0x300aa80, ...)
main.applyTemplate+0x71 /Users/petar/go/src/cmd/godoc/godoc.go:975
    main.applyTemplate(0x458a00, 0x11b728, 0x300aa70, 0xab9ab0, 0x13ff060, ...)
main.serveDirectory+0x241 /Users/petar/go/src/cmd/godoc/godoc.go:1096
    main.serveDirectory(0x458a00, 0xd5898, 0xb, 0x11b728, 0x300aa70, ...)
main.serveFile+0x5aa /Users/petar/go/src/cmd/godoc/godoc.go:1148
    main.serveFile(0x1fc2de0, 0x44c4300, 0x1096b40, 0x300000013)
http.HandlerFunc·ServeHTTP+0x28 /Users/petar/go/src/pkg/http/server.go:326
    http.HandlerFunc·ServeHTTP(0x1fc2de0, 0x44c4300, 0x33048, 0x8fd4, 0x1fc2de0, ...)
http.*ServeMux·ServeHTTP+0x1fd /Users/petar/go/src/pkg/http/server.go:508
    http.*ServeMux·ServeHTTP(0x8fd4, 0x1fc2de0, 0x44c4300, 0x5, 0x8f01, ...)
http.*Conn·serve+0x7d /Users/petar/go/src/pkg/http/server.go:289
    http.*Conn·serve(0x3a4300, 0x1fc2de0)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()
goroutine 163046 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
chanrecv+0x164 /Users/petar/go/src/pkg/runtime/chan.c:355
    chanrecv(0x18bb530, 0x1501660, 0xb6fb8, 0x100000001, 0x1, ...)
runtime.chanrecv1+0x41 /Users/petar/go/src/pkg/runtime/chan.c:429
    runtime.chanrecv1(0x18bb4e0, 0xa8ac90)
net.*pollServer·WaitRead+0x49 /Users/petar/go/src/pkg/net/fd.go:279
    net.*pollServer·WaitRead(0x18bb4e0, 0x34ffc80, 0x9c365, 0x8f5040)
net.*netFD·Read+0x143 /Users/petar/go/src/pkg/net/fd.go:382
    net.*netFD·Read(0x8f5040, 0x34ffc80, 0x100000001000, 0x23ffffffff, 0x0, ...)
net.*TCPConn·Read+0x74 /Users/petar/go/src/pkg/net/tcpsock.go:89
    net.*TCPConn·Read(0x34ffc80, 0x36b3000, 0x100000001000, 0x0, 0x0, ...)
bufio.*Reader·fill+0x155 /Users/petar/go/src/pkg/bufio/bufio.go:410
    bufio.*Reader·fill(0xec84f8, 0x36b3000)
bufio.*Reader·ReadSlice+0x1d5 /Users/petar/go/src/pkg/bufio/bufio.go:416
    bufio.*Reader·ReadSlice(0x115e640, 0xe5500000000, 0x1fe0a, 0xffffffff, 0x3c6c, ...)
http.readLineBytes+0x39 /Users/petar/go/src/pkg/http/request.go:225
    http.readLineBytes(0x115e640, 0x16a0a, 0x0, 0x0, 0x0, ...)
http.readLine+0x34 /Users/petar/go/src/pkg/http/request.go:249
    http.readLine(0x115e640, 0x0, 0x0, 0x0, 0x0, ...)
http.ReadRequest+0x61 /Users/petar/go/src/pkg/http/request.go:467
    http.ReadRequest(0x115e640, 0x0, 0x0, 0x0, 0x0, ...)
http.*Conn·readRequest+0x58 /Users/petar/go/src/pkg/http/server.go:82
    http.*Conn·readRequest(0x115e640, 0x3c6c840, 0x0, 0x0, 0x0, ...)
http.*Conn·serve+0x1c /Users/petar/go/src/pkg/http/server.go:282
    http.*Conn·serve(0x18bb660, 0x18bb660)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()
goroutine 36 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
runfinq+0x3f /Users/petar/go/src/pkg/runtime/mgc0.c:368
    runfinq()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()
goroutine 4 [3]:
runtime.entersyscall+0x50 /Users/petar/go/src/pkg/runtime/proc.c:563
    runtime.entersyscall()
syscall.Syscall6+0x5 /Users/petar/go/src/pkg/syscall/asm_darwin_amd64.s:39
    syscall.Syscall6()
syscall.kevent+0x6d /Users/petar/go/src/pkg/syscall/zsyscall_darwin_amd64.go:108
    syscall.kevent(0x16b, 0x8, 0x0, 0x0, 0x91c008, ...)
syscall.Kevent+0x99 /Users/petar/go/src/pkg/syscall/syscall_bsd.go:375
    syscall.Kevent(0x8, 0x0, 0x0, 0x91c008, 0xa, ...)
net.*pollster·WaitFD+0xfb /Users/petar/go/src/pkg/net/fd_darwin.go:87
    net.*pollster·WaitFD(0x8, 0x0, 0x0, 0x91c008, 0xa0000000a, ...)
net.*pollServer·Run+0x9e /Users/petar/go/src/pkg/net/fd.go:239
    net.*pollServer·Run(0x91c000, 0x0)
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()
goroutine 3 [3]:
runtime.entersyscall+0x50 /Users/petar/go/src/pkg/runtime/proc.c:563
    runtime.entersyscall()
syscall.Syscall6+0x5 /Users/petar/go/src/pkg/syscall/asm_darwin_amd64.s:39
    syscall.Syscall6()
syscall.Select+0x5d /Users/petar/go/src/pkg/syscall/zsyscall_darwin_amd64.go:512
    syscall.Select(0x5d, 0x0, 0x0, 0x0, 0x0, ...)
syscall.Sleep+0x71 /Users/petar/go/src/pkg/syscall/syscall_bsd.go:145
    syscall.Sleep(0xd00000000, 0x0, 0x0, 0x0)
time.Sleep+0x3b /Users/petar/go/src/pkg/time/sleep.go:19
    time.Sleep(0xdf8475800, 0x38e20, 0x3aa5c0, 0x2)
main.indexer+0x410 /Users/petar/go/src/cmd/godoc/godoc.go:1419
    main.indexer()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()
goroutine 1 [4]:
gosched+0x4e /Users/petar/go/src/pkg/runtime/proc.c:542
    gosched()
chanrecv+0x164 /Users/petar/go/src/pkg/runtime/chan.c:355
    chanrecv(0x91a170, 0x90c500, 0xb6fb8, 0x100000001, 0x1, ...)
runtime.chanrecv1+0x41 /Users/petar/go/src/pkg/runtime/chan.c:429
    runtime.chanrecv1(0x91a120, 0x3adb50)
net.*pollServer·WaitRead+0x49 /Users/petar/go/src/pkg/net/fd.go:279
    net.*pollServer·WaitRead(0x91a120, 0x8d81e0, 0x9cfa0, 0x8f5040)
net.*netFD·accept+0x2f2 /Users/petar/go/src/pkg/net/fd.go:528
    net.*netFD·accept(0x8f5040, 0x8d81e0, 0x0, 0x0, 0x23, ...)
net.*TCPListener·AcceptTCP+0x5a /Users/petar/go/src/pkg/net/tcpsock.go:240
    net.*TCPListener·AcceptTCP(0x8d81e0, 0xa2751, 0x0, 0x0, 0x0, ...)
net.*TCPListener·Accept+0x34 /Users/petar/go/src/pkg/net/tcpsock.go:250
    net.*TCPListener·Accept(0x8d0400, 0x1575f, 0x0, 0x0, 0x8, ...)
http.Serve+0x66 /Users/petar/go/src/pkg/http/server.go:551
    http.Serve(0x8d0400, 0x0, 0x0, 0x0, 0x0, ...)
http.ListenAndServe+0x8e /Users/petar/go/src/pkg/http/server.go:596
    http.ListenAndServe(0x8f5800, 0x8d0400, 0x8cf060, 0x3a4300, 0x8f5800, ...)
main.main+0x6f7 /Users/petar/go/src/cmd/godoc/main.go:285
    main.main()
mainstart+0xf /Users/petar/go/src/pkg/runtime/amd64/asm.s:60
    mainstart()
goexit /Users/petar/go/src/pkg/runtime/proc.c:145
    goexit()

@griesemer
Copy link
Contributor

Comment 3:

Fix pending ( http://golang.org/cl/1010042/show ).

Status changed to Started.

@griesemer
Copy link
Contributor

Comment 4:

This issue was closed by revision 23c0644.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants