Closed
Description
devel go (tried a few versions): changeset: 14493:2a8dfbc7b566 tag: tip user: Robert Griesemer <gri@golang.org> date: Wed Oct 03 13:46:37 2012 -0700 summary: go spec: conversion types starting with "func" must be parenthesized I have a fairly simple program that copies the body of a GET request into the body of a PUT request for a bunch of URLs in a loop. It runs fine for a few or ten thousand, but consistently crashes as shown at the bottom of this report. The code I'm running is https://gist.github.com/3822449 -- it uses some data I've got publicly available and a server I wrote in go that's not entirely trivial to get running (pretty close to it), but I suspect that's not an important detail. For this code path, it's basically http PUT and an io.Copy to the filesystem. The really nasty part here, as far as I can tell, is that I can't seem to do anything about it. I tried adding a recover around where I use the http client, but it's not "from" my code, so I couldn't trap it. This is rather catastrophic for my app (though I remain hopeful it's a dumb bug in my code). 2012/10/03 14:19:10 Unsolicited response received on idle HTTP channel starting with "H"; err=<nil> panic: http: unexpected bodyEOFSignal Read after Close; see issue #1725 goroutine 60 [running]: net/http.(*bodyEOFSignal).Read(0xf8401c08a0, 0xf840340000, 0x800000008000, 0x389 0, 0x0, ...) /Users/dustin/prog/eprojects/go/src/pkg/net/http/transport.go:826 +0xbb io.(*multiReader).Read(0xf8406548d0, 0xf840340000, 0x800000008000, 0xf8000005a8, 0x0, ...) /Users/dustin/prog/eprojects/go/src/pkg/io/multi.go:13 +0x85 io.Copy(0xf8400d11e0, 0xf840654910, 0xf8400d1180, 0xf8406548d0, 0x485a46, ...) /Users/dustin/prog/eprojects/go/src/pkg/io/io.go:360 +0x1a8 net/http.(*transferWriter).WriteBody(0xf840129600, 0xf8400cd000, 0xf84006ea40, 0 x0, 0x0, ...) /Users/dustin/prog/eprojects/go/src/pkg/net/http/transfer.go:194 +0x1a1 net/http.(*Request).write(0xf840233000, 0xf8400cd000, 0xf84006ea40, 0x0, 0xf8404 936c0, ...) /Users/dustin/prog/eprojects/go/src/pkg/net/http/request.go:371 +0x820 net/http.(*persistConn).writeLoop(0xf840154b80, 0x0) /Users/dustin/prog/eprojects/go/src/pkg/net/http/transport.go:660 +0x1b6 created by net/http.(*Transport).getConn /Users/dustin/prog/eprojects/go/src/pkg/net/http/transport.go:408 +0x5d6