<pre class="notranslate">GOARCH=386

$ hg identify
b950f00ad6f1 tip

changeset:   7774:b950f00ad6f1
tag:         tip
user:        Russ Cox &lt;rsc@golang.org&gt;
date:        Tue Mar 15 22:33:57 2011 -0400
summary:     gofix: procattr


unexpected fault address 0xb8002000
throw: fault

[signal 0xb code=0x1 addr=0xb8002000 pc=0x80525c0]

runtime.throw+0x43 /home/bradfitz/go/src/pkg/runtime/runtime.c:102
        runtime.throw(0x829d90e, 0xb8002000)
runtime.sigpanic+0xc7 /home/bradfitz/go/src/pkg/runtime/linux/thread.c:294
        runtime.sigpanic()
scanblock+0xe2 /home/bradfitz/go/src/pkg/runtime/mgc0.c:119
        scanblock(0xb7f8b0ec, 0xffffffbc, 0xffffffff)
scanstack+0x5c /home/bradfitz/go/src/pkg/runtime/mgc0.c:337
        scanstack(0x186b5cc0, 0x0)
mark+0x10a /home/bradfitz/go/src/pkg/runtime/mgc0.c:386
        mark()
runtime.gc+0x1db /home/bradfitz/go/src/pkg/runtime/mgc0.c:569
        runtime.gc(0x1, 0x186eac50)
runfinq+0xea /home/bradfitz/go/src/pkg/runtime/mgc0.c:653
        runfinq()
runtime.goexit /home/bradfitz/go/src/pkg/runtime/proc.c:180
        runtime.goexit()
----- goroutine created by -----
runtime.gc /home/bradfitz/go/src/pkg/runtime/mgc0.c:515

goroutine 77 [4]:
runtime.gosched+0x6d /home/bradfitz/go/src/pkg/runtime/proc.c:594
        runtime.gosched()
runtime.chanrecv+0x147 /home/bradfitz/go/src/pkg/runtime/chan.c:359
        runtime.chanrecv(0x19be8900, 0xb7f8639c, 0x0, 0x0, 0x400, ...)
runtime.chanrecv1+0x3f /home/bradfitz/go/src/pkg/runtime/chan.c:421
        runtime.chanrecv1(0x19be8900, 0x19eee580)
net.*pollServer·WaitRead+0x50 /home/bradfitz/go/src/pkg/net/fd.go:252
       net.*pollServer·WaitRead(0x186ec800, 0x19eee580, 0x400)
net.*netFD·Read+0x1c1 /home/bradfitz/go/src/pkg/net/fd.go:359
       net.*netFD·Read(0x19eee580, 0x187bf400, 0x400, 0x400, 0x0, ...)
net.*TCPConn·Read+0x6f /home/bradfitz/go/src/pkg/net/tcpsock.go:94
       net.*TCPConn·Read(0x18740188, 0x187bf400, 0x400, 0x400, 0x64, ...)
crypto/tls.*block·readFromUntil+0xc5 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:368
       crypto/tls.*block·readFromUntil(0x18838d40, 0x186ecb80, 0x18740188, 0x5, 0x18740188, ...)
crypto/tls.*Conn·readRecord+0xf0 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:448
       crypto/tls.*Conn·readRecord(0x1921c140, 0x17, 0x0, 0x6000008)
crypto/tls.*Conn·Read+0xca /home/bradfitz/go/src/pkg/crypto/tls/conn.go:712
       crypto/tls.*Conn·Read(0x1921c140, 0x19209000, 0x1000, 0x1000, 0x0, ...)
bufio.*Reader·fill+0x152 /home/bradfitz/go/src/pkg/bufio/bufio.go:97
       bufio.*Reader·fill(0x19be6720, 0x0)
bufio.*Reader·ReadSlice+0x25a /home/bradfitz/go/src/pkg/bufio/bufio.go:267
       bufio.*Reader·ReadSlice(0x19be6720, 0x186b2a0a, 0x0, 0x0, 0x0, ...)
bufio.*Reader·ReadBytes+0x86 /home/bradfitz/go/src/pkg/bufio/bufio.go:300
       bufio.*Reader·ReadBytes(0x19be6720, 0x82ad40a, 0x0, 0x0, 0x0, ...)
net/textproto.*Reader·ReadLineBytes+0x3c
/home/bradfitz/go/src/pkg/net/textproto/reader.go:43
       net/textproto.*Reader·ReadLineBytes(0x186b2bf0, 0x80, 0x0)
net/textproto.*Reader·ReadLine+0x29 /home/bradfitz/go/src/pkg/net/textproto/reader.go:36
       net/textproto.*Reader·ReadLine(0x186b2bf0, 0x189e2200, 0x0)
http.ReadRequest+0x7f /home/bradfitz/go/src/pkg/http/request.go:431
        http.ReadRequest(0x19be6720, 0x189e2200, 0x0, 0x0)
http.*conn·readRequest+0x6e /home/bradfitz/go/src/pkg/http/server.go:171
        http.*conn·readRequest(0x19be66f0, 0x188897e0, 0x0, 0x0)
http.*conn·serve+0x29 /home/bradfitz/go/src/pkg/http/server.go:447
        http.*conn·serve(0x19be66f0, 0x8055d3f)
runtime.goexit /home/bradfitz/go/src/pkg/runtime/proc.c:180
        runtime.goexit()

----- goroutine created by -----
http.*Server·Serve+0x1cf /home/bradfitz/go/src/pkg/http/server.go:777

goroutine 81 [3]:
runtime.entersyscall+0x18 /home/bradfitz/go/src/pkg/runtime/proc.c:614
        runtime.entersyscall() 
syscall.Syscall+0x5 /home/bradfitz/go/src/pkg/syscall/asm_linux_386.s:21
        syscall.Syscall()
syscall.Write+0x5c /home/bradfitz/go/src/pkg/syscall/zsyscall_linux_386.go:734
        syscall.Write(0x5, 0x829ef10, 0x1, 0x1, 0x86aff48, ...)
os.*File·Write+0x7a /home/bradfitz/go/src/pkg/os/file.go:126
        os.*File·Write(0x186ec840, 0x829ef10, 0x1, 0x1, 0x0, ...)
net.*pollServer·Wakeup+0x8a /home/bradfitz/go/src/pkg/net/fd.go:247
        net.*pollServer·Wakeup(0x186ec800, 0x18d82f80)
net.*pollServer·WaitRead+0x3f /home/bradfitz/go/src/pkg/net/fd.go:251
        net.*pollServer·WaitRead(0x186ec800, 0x18d82f80, 0x400)
net.*netFD·Read+0x1c1 /home/bradfitz/go/src/pkg/net/fd.go:359
        net.*netFD·Read(0x18d82f80, 0x18a37000, 0x400, 0x400, 0x0, ...)
net.*TCPConn·Read+0x6f /home/bradfitz/go/src/pkg/net/tcpsock.go:94
        net.*TCPConn·Read(0x187400b0, 0x18a37000, 0x400, 0x400, 0x189060f0, ...)
crypto/tls.*block·readFromUntil+0xc5 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:368
        crypto/tls.*block·readFromUntil(0x187a4f40, 0x186ecb80, 0x187400b0, 0x5, 0x187400b0, ...)
crypto/tls.*Conn·readRecord+0xf0 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:448
        crypto/tls.*Conn·readRecord(0x1921c000, 0x813a914, 0x18906300, 0x1898a960)
crypto/tls.*Conn·serverHandshake+0x1aec
/home/bradfitz/go/src/pkg/crypto/tls/handshake_server.go:239
        crypto/tls.*Conn·serverHandshake(0x1921c000, 0x0, 0x0)
----- stack segment boundary -----
syscall.Syscall+0x53 /home/bradfitz/go/src/pkg/syscall/asm_linux_386.s:33
        syscall.Syscall()
syscall.Write+0x5c /home/bradfitz/go/src/pkg/syscall/zsyscall_linux_386.go:734
        syscall.Write(0x5, 0x829ef10, 0x1, 0x1, 0x86aff48, ...)
os.*File·Write+0x7a /home/bradfitz/go/src/pkg/os/file.go:126
        os.*File·Write(0x186ec840, 0x829ef10, 0x1, 0x1, 0x0, ...)
net.*pollServer·Wakeup+0x8a /home/bradfitz/go/src/pkg/net/fd.go:247
        net.*pollServer·Wakeup(0x186ec800, 0x18d82f80)
net.*pollServer·WaitRead+0x3f /home/bradfitz/go/src/pkg/net/fd.go:251
        net.*pollServer·WaitRead(0x186ec800, 0x18d82f80, 0x400)
net.*netFD·Read+0x1c1 /home/bradfitz/go/src/pkg/net/fd.go:359
        net.*netFD·Read(0x18d82f80, 0x18a37000, 0x400, 0x400, 0x0, ...)
net.*TCPConn·Read+0x6f /home/bradfitz/go/src/pkg/net/tcpsock.go:94
        net.*TCPConn·Read(0x187400b0, 0x18a37000, 0x400, 0x400, 0x189060f0, ...)
crypto/tls.*block·readFromUntil+0xc5 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:368
        crypto/tls.*block·readFromUntil(0x187a4f40, 0x186ecb80, 0x187400b0, 0x5, 0x187400b0, ...)
crypto/tls.*Conn·readRecord+0xf0 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:448
        crypto/tls.*Conn·readRecord(0x1921c000, 0x813a914, 0x18906300, 0x1898a960)
crypto/tls.*Conn·serverHandshake+0x1aec
/home/bradfitz/go/src/pkg/crypto/tls/handshake_server.go:239
        crypto/tls.*Conn·serverHandshake(0x1921c000, 0x0, 0x0)
----- stack segment boundary -----
crypto/tls.*Conn·Handshake+0xcd /home/bradfitz/go/src/pkg/crypto/tls/conn.go:752
        crypto/tls.*Conn·Handshake(0x1921c000, 0x0, 0x0)
crypto/tls.*Conn·Read+0x43 /home/bradfitz/go/src/pkg/crypto/tls/conn.go:704
        crypto/tls.*Conn·Read(0x1921c000, 0x18a35000, 0x1000, 0x1000, 0x0, ...)
bufio.*Reader·fill+0x152 /home/bradfitz/go/src/pkg/bufio/bufio.go:97
        bufio.*Reader·fill(0x19ec13c0, 0x0)
bufio.*Reader·ReadSlice+0x25a /home/bradfitz/go/src/pkg/bufio/bufio.go:267
        bufio.*Reader·ReadSlice(0x19ec13c0, 0xa, 0x0, 0x0, 0x0, ...)
bufio.*Reader·ReadBytes+0x86 /home/bradfitz/go/src/pkg/bufio/bufio.go:300
        bufio.*Reader·ReadBytes(0x19ec13c0, 0x86afd0a, 0x0, 0x0, 0x0, ...)
net/textproto.*Reader·ReadLineBytes+0x3c
/home/bradfitz/go/src/pkg/net/textproto/reader.go:43
        net/textproto.*Reader·ReadLineBytes(0x18740e50, 0x80, 0x0)

net/textproto.*Reader·ReadLine+0x29 /home/bradfitz/go/src/pkg/net/textproto/reader.go:36
        net/textproto.*Reader·ReadLine(0x18740e50, 0x18c18300, 0x186ce4c0)
http.ReadRequest+0x7f /home/bradfitz/go/src/pkg/http/request.go:431
        http.ReadRequest(0x19ec13c0, 0x18c18300, 0x0, 0x0)
http.*conn·readRequest+0x6e /home/bradfitz/go/src/pkg/http/server.go:171
        http.*conn·readRequest(0x19ec1390, 0x0, 0x0, 0x0)
http.*conn·serve+0x29 /home/bradfitz/go/src/pkg/http/server.go:447
        http.*conn·serve(0x19ec1390, 0x187620d0)
runtime.goexit /home/bradfitz/go/src/pkg/runtime/proc.c:180
        runtime.goexit()
----- goroutine created by -----
http.*Server·Serve+0x1cf /home/bradfitz/go/src/pkg/http/server.go:777

goroutine 2 [1]:
runtime.gosched+0x6d /home/bradfitz/go/src/pkg/runtime/proc.c:594
        runtime.gosched()
runtime.exitsyscall+0x6e /home/bradfitz/go/src/pkg/runtime/proc.c:659
        runtime.exitsyscall()  
syscall.Syscall6+0x57 /home/bradfitz/go/src/pkg/syscall/asm_linux_386.s:60
        syscall.Syscall6()
syscall.EpollWait+0x74 /home/bradfitz/go/src/pkg/syscall/zsyscall_linux_386.go:200
        syscall.EpollWait(0x6, 0x1879ca20, 0x1, 0x1, 0xffffffff, ...)
net.*pollster·WaitFD+0x134 /home/bradfitz/go/src/pkg/net/fd_linux.go:116
        net.*pollster·WaitFD(0x186b25b0, 0x0, 0x0, 0x18d82f80, 0x72, ...)
net.*pollServer·Run+0xc8 /home/bradfitz/go/src/pkg/net/fd.go:207
        net.*pollServer·Run(0x186ec800, 0x0)
runtime.goexit /home/bradfitz/go/src/pkg/runtime/proc.c:180
        runtime.goexit()
----- goroutine created by -----
net.newPollServer+0x346 /home/bradfitz/go/src/pkg/net/newpollserver.go:39


goroutine 1 [4]:
runtime.gosched+0x6d /home/bradfitz/go/src/pkg/runtime/proc.c:594
        runtime.gosched()
runtime.chanrecv+0x147 /home/bradfitz/go/src/pkg/runtime/chan.c:359
        runtime.chanrecv(0x186ccd80, 0xb7f8386c, 0x0, 0x0, 0x82a081c, ...)
runtime.chanrecv1+0x3f /home/bradfitz/go/src/pkg/runtime/chan.c:421
        runtime.chanrecv1(0x186ccd80, 0x186e7300)
net.*pollServer·WaitRead+0x50 /home/bradfitz/go/src/pkg/net/fd.go:252
        net.*pollServer·WaitRead(0x186ec800, 0x186e7300, 0x0)
net.*netFD·accept+0x2fe /home/bradfitz/go/src/pkg/net/fd.go:584
        net.*netFD·accept(0x186e7300, 0x80d3b33, 0x0, 0x0, 0x0, ...)
net.*TCPListener·AcceptTCP+0x56 /home/bradfitz/go/src/pkg/net/tcpsock.go:261
        net.*TCPListener·AcceptTCP(0x186b2900, 0x1, 0x0, 0x0)
net.*TCPListener·Accept+0x39 /home/bradfitz/go/src/pkg/net/tcpsock.go:271
        net.*TCPListener·Accept(0x186b2900, 0x0, 0x0, 0x0, 0x0, ...)
crypto/tls.*Listener·Accept+0x49 /home/bradfitz/go/src/pkg/crypto/tls/tls.go:44
        crypto/tls.*Listener·Accept(0x187620d0, 0x0, 0x0, 0x0, 0x0, ...)
http.*Server·Serve+0xb5 /home/bradfitz/go/src/pkg/http/server.go:763
        http.*Server·Serve(0x186ec980, 0x186ec900, 0x187620d0, 0x0, 0x0, ...)
http.Serve+0x57 /home/bradfitz/go/src/pkg/http/server.go:727
        http.Serve(0x186ec900, 0x187620d0, 0x186ec920, 0x186ebf80, 0x186ebf80, ...)
camli/webserver.*Server·Serve+0x41f
/home/bradfitz/hack/camlistore/server/go/webserver/webserver.go:117
        camli/webserver.*Server·Serve(0x186ebf80, 0x8192e1c)
main.main+0x412 /home/bradfitz/hack/camlistore/server/go/blobserver/camlistored.go:279
        main.main()
runtime.mainstart+0xf /home/bradfitz/go/src/pkg/runtime/386/asm.s:93
        runtime.mainstart()
runtime.goexit /home/bradfitz/go/src/pkg/runtime/proc.c:180
        runtime.goexit()
----- goroutine created by -----
_rt0_386+0xc1 /home/bradfitz/go/src/pkg/runtime/386/asm.s:80</pre>
<pre class="notranslate">[as mentioned by manveru in #golang-nuts]

Run the following piece of code through gofmt.
The text inside the comment is indented.
Run that text through gofmt again.
The text inside the comment is indented one more time.

At the least, gofmt should be idempotent.
I think it should also preserve indentation inside comments,
but that's more arguable.


package main

func main() {
    /*
something like this.
    */
}</pre>