<p dir="auto">by <strong>ficoos</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Start a jsonrpc server
2. send {"jsonrpc":"2.0",
 "method": "HeadCrash.CreateRepository",
 "id": "1"}
3. Profit

What is the expected output?
Error similar to what happens when you send a request without a "method" field

rpc: service/method request ill-formed:


What do you see instead?
Go panics with "invalid memory address or nil pointer dereference"

net/rpc/jsonrpc.(*serverCodec).ReadRequestBody(0xf8400aa380, 0x54dfd0, 0xf840072cd0,
0x54dfd0, 0xf840072cd0, ...)
    /home/user/projects/go/src/pkg/net/rpc/jsonrpc/server.go:97 +0x89
net/rpc.(*Server).readRequest(0xf84006d480, 0xf84006ddc0, 0xf8400aa380, 0xf84006d640,
0xf8400aa300, ...)
    /home/user/projects/go/src/pkg/net/rpc/server.go:508 +0x23b
net/rpc.(*Server).ServeCodec(0xf84006d480, 0xf84006ddc0, 0xf8400aa380, 0x0)
    /home/user/projects/go/src/pkg/net/rpc/server.go:408 +0x69
created by headcrash/dispatcher.DispatcherMain
    /home/user/projects/headcrash/src/headcrash/dispatcher/dispatcher.go:66 +0x67d


Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
linux

Which version are you using?  (run 'go version')
go version go1.0.3

Please provide any additional information below.</pre>
<pre class="notranslate">I'm getting a reliable crash from a nil pointer dereference deep in the net/http
package, immediately after some data races.  This occurs for a particular, large request
(112MB) that crashes the backend server and subsequently kills the proxy with the nil
pointer deference.

Attached are race logs and panic stack traces from go 1.2 and 1.2.1.  The core proxy
code is also attached.</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/go1.2%20race%20and%20stack%20trace.txt" rel="nofollow">go1.2 race and stack trace.txt</a> (35107 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/go1.2.1%20race%20and%20stack%20trace.txt" rel="nofollow">go1.2.1 race and stack trace.txt</a> (36204 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/7595/0/proxy.go" rel="nofollow">proxy.go</a> (6067 bytes)</li>
</ol>