go sdk v7 上传大文件失败,报错ran too long (10m0s).
用的SDK是go v7版本的,调用方法参考kodocli包里的doc.go样例,但是无论是普通上传还是分块上传只要时间过长均报错,这个界限大概是10min左右。
代码如下:
func qiniusave(file string) (url string, err error) {
var key string
for _, key = range strings.Split(file, "/") {
}
fil, err := os.Open(file)
if err != nil {
return "", err
}
defer fil.Close()
fi, err := fil.Stat()
if err != nil {
return "", err
}
fsize := fi.Size()
//conf.ACCESS_KEYdd = setting.AccessKeyID
//conf.SECRET_KEY = setting.AccessKeysecret
kodo.SetMac(setting.AccessKeyID, setting.AccessKeysecret)
zone := 0
c := kodo.New(zone, nil) //创建一个Client对象
bucket := setting.Bucket
policy := &kodo.PutPolicy{
Scope: bucket, //上传的限制条件
Expires: 3600, // uptoken的过期时长
}
uptoken := c.MakeUptoken(policy)
domain := setting.Endpoint
url = kodocli.MakeBaseUrl(domain, key)
if fsize < (2 << 23) {
zone = 0
uploader := kodocli.NewUploader(zone, nil)
ctx := context.Background()
fmt.Println("less than 10m")
err = uploader.PutFile(ctx, nil, uptoken, key, file, nil)
} else {
zone = 0
uploader := kodocli.NewUploader(zone, nil)
ctx := context.Background()
fmt.Println("more than 10m")
err = uploader.RputFile(ctx, nil, uptoken, key, file, nil)
}
if err != nil {
return "", err
} else {
return url, nil
}
}
上传1G大文件报错信息如下:
SIGQUIT: quit
PC=0x45f833 m=0
goroutine 12 [syscall]:
runtime.notetsleepg(0x9a79b8, 0x253fceed6, 0x1)
/home/ma/go/go-go1.5.2/src/runtime/lock_futex.go:202 +0x4e fp=0xc820029738 sp=0xc820029710
runtime.timerproc()
/home/ma/go/go-go1.5.2/src/runtime/time.go:209 +0xde fp=0xc8200297c0 sp=0xc820029738
runtime.goexit()
/home/ma/go/go-go1.5.2/src/runtime/asm_amd64.s:1721 +0x1 fp=0xc8200297c8 sp=0xc8200297c0
created by runtime.addtimerLocked
/home/ma/go/go-go1.5.2/src/runtime/time.go:116 +0x11f
goroutine 1 [chan receive, 8 minutes]:
testing.RunTests(0x878800, 0x99ec60, 0x1, 0x1, 0x1300000000000001)
/home/ma/go/go-go1.5.2/src/testing/testing.go:562 +0x8ad
testing.(*M).Run(0xc8200c7f08, 0x7a54c0)
/home/ma/go/go-go1.5.2/src/testing/testing.go:494 +0x70
main.main()
github.com/containerops/dockyard/backend/drivers/qiniu/_test/_testmain.go:54 +0x116
goroutine 17 [syscall, 8 minutes, locked to thread]:
runtime.goexit()
/home/ma/go/go-go1.5.2/src/runtime/asm_amd64.s:1721 +0x1
goroutine 5 [runnable]:
qiniupkg.com/api.v7/kodocli.Uploader.rput(0xc82001bb00, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0x0, 0x0, 0xc820078360, 0x86, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:248 +0x696
qiniupkg.com/api.v7/kodocli.Uploader.rputFile(0xc82001bb00, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0x0, 0x0, 0xc820078360, 0x86, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:274 +0x24f
qiniupkg.com/api.v7/kodocli.Uploader.RputFile(0xc82001bb00, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0x0, 0x0, 0xc820078360, 0x86, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:166 +0xff
github.com/containerops/dockyard/backend/drivers/qiniu.qiniusave(0x821c00, 0x19, 0xc82001bad0, 0x30, 0x0, 0x0)
/home/ma/workspace/src/github.com/containerops/dockyard/backend/drivers/qiniu/qiniu.go:78 +0x90a
github.com/containerops/dockyard/backend/drivers/qiniu.Test_qiniusave(0xc820078120)
/home/ma/workspace/src/github.com/containerops/dockyard/backend/drivers/qiniu/qiniu_test.go:22 +0x16b
testing.tRunner(0xc820078120, 0x99ec60)
/home/ma/go/go-go1.5.2/src/testing/testing.go:456 +0x98
created by testing.RunTests
/home/ma/go/go-go1.5.2/src/testing/testing.go:561 +0x86d
goroutine 6 [select]:
qiniupkg.com/x/rpc%2ev7.Client.Do(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0xc82013eee0, 0x0, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:159 +0x54d
qiniupkg.com/x/rpc%2ev7.Client.DoRequestWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x7d7c30, 0x4, 0xc820140d20, 0xe8, 0x822ce0, 0x18, 0x7f31afbcac18, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:83 +0x126
qiniupkg.com/x/rpc%2ev7.Client.CallWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x6bf2c0, 0xc8200a9138, 0x7d7c30, 0x4, 0xc820140d20, 0xe8, 0x822ce0, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:287 +0xcb
qiniupkg.com/api.v7/kodocli.Uploader.bput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9138, 0x7f31afbcac18, 0xc820251ea0, 0x40000, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:59 +0x1b2
qiniupkg.com/api.v7/kodocli.Uploader.resumableBput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9138, 0x7f31afbcab28, 0xc82002a110, 0xe1, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:111 +0x7e8
qiniupkg.com/api.v7/kodocli.Uploader.rput.func1()
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:236 +0x1ae
qiniupkg.com/api.v7/kodocli.worker(0xc820016420)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:70 +0x4a
created by qiniupkg.com/api.v7/kodocli.initWorkers
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:78 +0x7f
goroutine 7 [select]:
qiniupkg.com/x/rpc%2ev7.Client.Do(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0xc82013e9a0, 0x0, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:159 +0x54d
qiniupkg.com/x/rpc%2ev7.Client.DoRequestWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x7d7c30, 0x4, 0xc820140780, 0xe8, 0x822ce0, 0x18, 0x7f31afbcac18, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:83 +0x126
qiniupkg.com/x/rpc%2ev7.Client.CallWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x6bf2c0, 0xc8200a9100, 0x7d7c30, 0x4, 0xc820140780, 0xe8, 0x822ce0, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:287 +0xcb
qiniupkg.com/api.v7/kodocli.Uploader.bput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9100, 0x7f31afbcac18, 0xc820251840, 0x40000, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:59 +0x1b2
qiniupkg.com/api.v7/kodocli.Uploader.resumableBput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9100, 0x7f31afbcab28, 0xc82002a110, 0xe0, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:111 +0x7e8
qiniupkg.com/api.v7/kodocli.Uploader.rput.func1()
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:236 +0x1ae
qiniupkg.com/api.v7/kodocli.worker(0xc820016420)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:70 +0x4a
created by qiniupkg.com/api.v7/kodocli.initWorkers
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:78 +0x7f
goroutine 8 [select]:
qiniupkg.com/x/rpc%2ev7.Client.Do(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0xc82013f0a0, 0x0, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:159 +0x54d
qiniupkg.com/x/rpc%2ev7.Client.DoRequestWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x7d7c30, 0x4, 0xc8203c3a40, 0x25, 0x822ce0, 0x18, 0x7f31afbcac18, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:83 +0x126
qiniupkg.com/x/rpc%2ev7.Client.CallWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x6bf2c0, 0xc8200a9170, 0x7d7c30, 0x4, 0xc8203c3a40, 0x25, 0x822ce0, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:287 +0xcb
qiniupkg.com/api.v7/kodocli.Uploader.mkblk(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9170, 0x400000, 0x7f31afbcac18, 0xc82015e0c0, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:52 +0x1a1
qiniupkg.com/api.v7/kodocli.Uploader.resumableBput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a9170, 0x7f31afbcab28, 0xc82002a110, 0xe2, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:85 +0x44a
qiniupkg.com/api.v7/kodocli.Uploader.rput.func1()
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:236 +0x1ae
qiniupkg.com/api.v7/kodocli.worker(0xc820016420)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:70 +0x4a
created by qiniupkg.com/api.v7/kodocli.initWorkers
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:78 +0x7f
goroutine 9 [select]:
qiniupkg.com/x/rpc%2ev7.Client.Do(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0xc82013ed20, 0x0, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:159 +0x54d
qiniupkg.com/x/rpc%2ev7.Client.DoRequestWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x7d7c30, 0x4, 0xc820140b40, 0xe9, 0x822ce0, 0x18, 0x7f31afbcac18, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:83 +0x126
qiniupkg.com/x/rpc%2ev7.Client.CallWith(0xc82001bb60, 0x7f31afbcaae8, 0xc82000a6b0, 0x6bf2c0, 0xc8200a90c8, 0x7d7c30, 0x4, 0xc820140b40, 0xe9, 0x822ce0, ...)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:287 +0xcb
qiniupkg.com/api.v7/kodocli.Uploader.bput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a90c8, 0x7f31afbcac18, 0xc820251c80, 0x40000, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:59 +0x1b2
qiniupkg.com/api.v7/kodocli.Uploader.resumableBput(0xc82001bb60, 0x99f900, 0x3, 0x3, 0x7f31afbcaae8, 0xc82000a6b0, 0xc8200a90c8, 0x7f31afbcab28, 0xc82002a110, 0xdf, ...)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:111 +0x7e8
qiniupkg.com/api.v7/kodocli.Uploader.rput.func1()
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:236 +0x1ae
qiniupkg.com/api.v7/kodocli.worker(0xc820016420)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:70 +0x4a
created by qiniupkg.com/api.v7/kodocli.initWorkers
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable.go:78 +0x7f
goroutine 3868 [select]:
net/http.(*persistConn).roundTrip(0xc820074210, 0xc820144d80, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1164 +0xb0d
net/http.(*Transport).RoundTrip(0xc820078090, 0xc82013ed20, 0xd, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:235 +0x530
qiniupkg.com/api.v7/kodocli.(*uptokenTransport).RoundTrip(0xc82000ebc0, 0xc82013ed20, 0x152, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:31 +0x95
net/http.send(0xc82013ed20, 0x7f31afbcab50, 0xc82000ebc0, 0xc820140c30, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xc82001bb60, 0xc82013ed20, 0xe9, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xc82001bb60, 0xc82013ed20, 0x878a40, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Do(0xc82001bb60, 0xc82013ed20, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:178 +0x188
qiniupkg.com/x/rpc%2ev7.Client.Do.func1(0xc82002aac0, 0xc820144d20, 0xc82001bb60, 0xc82013ed20, 0xc820142bd0)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:156 +0x2f
created by qiniupkg.com/x/rpc%2ev7.Client.Do
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:158 +0x3a4
goroutine 3776 [runnable]:
syscall.Syscall6(0x11, 0x4, 0xc82035c000, 0x1000, 0x3847cddb, 0x0, 0x0, 0x1000, 0x1000, 0x0)
/home/ma/go/go-go1.5.2/src/syscall/asm_linux_amd64.s:44 +0x5
syscall.Pread(0x4, 0xc82035c000, 0x1000, 0x1000, 0x3847cddb, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/syscall/zsyscall_linux_amd64.go:1372 +0x89
os.(*File).pread(0xc82002a110, 0xc82035c000, 0x1000, 0x1000, 0x3847cddb, 0x8, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/os/file_unix.go:221 +0x64
os.(*File).ReadAt(0xc82002a110, 0xc82035c000, 0x1000, 0x1000, 0x3847cddb, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/os/file.go:117 +0xcc
io.(*SectionReader).Read(0xc8203c3890, 0xc82035c000, 0x1000, 0x1000, 0x1000, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:454 +0xd6
io.(*teeReader).Read(0xc820251ea0, 0xc82035c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:514 +0x7c
io/ioutil.(*nopCloser).Read(0xc820144f90, 0xc82035c000, 0x1000, 0x1000, 0x1000, 0x0, 0x0)
<autogenerated>:4 +0x82
io.(*LimitedReader).Read(0xc820251f00, 0xc82035c000, 0x1000, 0x1000, 0x1000, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:427 +0xbd
bufio.(*Writer).ReadFrom(0xc820019b80, 0x7f31afbcc218, 0xc820251f00, 0x3cddb, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:692 +0x1f3
io.copyBuffer(0x7f31afbcc118, 0xc820019b80, 0x7f31afbcc218, 0xc820251f00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:375 +0x180
io.Copy(0x7f31afbcc118, 0xc820019b80, 0x7f31afbcc218, 0xc820251f00, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:351 +0x64
net/http.(*transferWriter).WriteBody(0xc820142e70, 0x7f31afbcc118, 0xc820019b80, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transfer.go:225 +0x8fe
net/http.(*Request).write(0xc82013eee0, 0x7f31afbcc118, 0xc820019b80, 0x0, 0xc8203c38f0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/request.go:462 +0xbb9
net/http.(*persistConn).writeLoop(0xc8200742c0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1015 +0x27c
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:686 +0xc9d
goroutine 3796 [IO wait]:
net.runtime_pollWait(0x7f31afbcb890, 0x72, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc820301800, 0x72, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820301800, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8203017a0, 0xc82035d000, 0x1000, 0x1000, 0x0, 0x7f31afbc6050, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002a480, 0xc82035d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7f31afbcc0a0, 0xc82002a480, 0xc8200743c8, 0xc82035d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8201ac4c0, 0xc82035d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
<autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc820308c00)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc820308c00, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc820074370)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:685 +0xc78
goroutine 3797 [select]:
net/http.(*persistConn).writeLoop(0xc820074370)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:686 +0xc9d
goroutine 3563 [IO wait]:
net.runtime_pollWait(0x7f31afbcb650, 0x72, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc8202baf40, 0x72, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc8202baf40, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc8202baee0, 0xc82044e000, 0x1000, 0x1000, 0x0, 0x7f31afbc6050, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82034cee0, 0xc82044e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7f31afbcc0a0, 0xc82034cee0, 0xc820074268, 0xc82044e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8203267a0, 0xc82044e000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
<autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc8201b9080)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc8201b9080, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc820074210)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:685 +0xc78
goroutine 3869 [select]:
net/http.(*persistConn).roundTrip(0xc8200742c0, 0xc820145010, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1164 +0xb0d
net/http.(*Transport).RoundTrip(0xc820078090, 0xc82013eee0, 0xd, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:235 +0x530
qiniupkg.com/api.v7/kodocli.(*uptokenTransport).RoundTrip(0xc82000ebc0, 0xc82013eee0, 0x151, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:31 +0x95
net/http.send(0xc82013eee0, 0x7f31afbcab50, 0xc82000ebc0, 0xc820140e10, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xc82001bb60, 0xc82013eee0, 0xe8, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xc82001bb60, 0xc82013eee0, 0x878a40, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Do(0xc82001bb60, 0xc82013eee0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:178 +0x188
qiniupkg.com/x/rpc%2ev7.Client.Do.func1(0xc82002aad8, 0xc820144fb0, 0xc82001bb60, 0xc82013eee0, 0xc820142d90)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:156 +0x2f
created by qiniupkg.com/x/rpc%2ev7.Client.Do
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:158 +0x3a4
goroutine 3866 [select]:
net/http.(*persistConn).roundTrip(0xc820074370, 0xc820144860, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1164 +0xb0d
net/http.(*Transport).RoundTrip(0xc820078090, 0xc82013e9a0, 0xd, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:235 +0x530
qiniupkg.com/api.v7/kodocli.(*uptokenTransport).RoundTrip(0xc82000ebc0, 0xc82013e9a0, 0x151, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:31 +0x95
net/http.send(0xc82013e9a0, 0x7f31afbcab50, 0xc82000ebc0, 0xc820140870, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xc82001bb60, 0xc82013e9a0, 0xe8, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xc82001bb60, 0xc82013e9a0, 0x878a40, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Do(0xc82001bb60, 0xc82013e9a0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:178 +0x188
qiniupkg.com/x/rpc%2ev7.Client.Do.func1(0xc82002aa90, 0xc820144800, 0xc82001bb60, 0xc82013e9a0, 0xc820142850)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:156 +0x2f
created by qiniupkg.com/x/rpc%2ev7.Client.Do
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:158 +0x3a4
goroutine 3834 [IO wait]:
net.runtime_pollWait(0x7f31afbcb710, 0x72, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc82043d2c0, 0x72, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc82043d2c0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc82043d260, 0xc820193000, 0x1000, 0x1000, 0x0, 0x7f31afbc6050, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002a7b0, 0xc820193000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7f31afbcc0a0, 0xc82002a7b0, 0xc820074478, 0xc820193000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8203fd3c0, 0xc820193000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
<autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc8204af620)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc8204af620, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc820074420)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:685 +0xc78
goroutine 3564 [select]:
net/http.(*persistConn).writeLoop(0xc820074210)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1009 +0x40c
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:686 +0xc9d
goroutine 3870 [select]:
net/http.(*persistConn).roundTrip(0xc820074420, 0xc8201452e0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1164 +0xb0d
net/http.(*Transport).RoundTrip(0xc820078090, 0xc82013f0a0, 0xd, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:235 +0x530
qiniupkg.com/api.v7/kodocli.(*uptokenTransport).RoundTrip(0xc82000ebc0, 0xc82013f0a0, 0x0, 0x0, 0x0)
/home/ma/workspace/src/qiniupkg.com/api.v7/kodocli/resumable_base.go:31 +0x95
net/http.send(0xc82013f0a0, 0x7f31afbcab50, 0xc82000ebc0, 0xc8203c3aa0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0xc82001bb60, 0xc82013f0a0, 0x25, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0xc82001bb60, 0xc82013f0a0, 0x878a40, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Do(0xc82001bb60, 0xc82013f0a0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/client.go:178 +0x188
qiniupkg.com/x/rpc%2ev7.Client.Do.func1(0xc82002aaf0, 0xc820145280, 0xc82001bb60, 0xc82013f0a0, 0xc820142f50)
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:156 +0x2f
created by qiniupkg.com/x/rpc%2ev7.Client.Do
/home/ma/workspace/src/qiniupkg.com/x/rpc.v7/rpc_client.go:158 +0x3a4
goroutine 3775 [IO wait]:
net.runtime_pollWait(0x7f31afbcba10, 0x72, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/runtime/netpoll.go:157 +0x60
net.(*pollDesc).Wait(0xc82021fb10, 0x72, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc82021fb10, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).Read(0xc82021fab0, 0xc820213000, 0x1000, 0x1000, 0x0, 0x7f31afbc6050, 0xc82000a1c0)
/home/ma/go/go-go1.5.2/src/net/fd_unix.go:232 +0x23a
net.(*conn).Read(0xc82002a2e8, 0xc820213000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/net.go:172 +0xe4
net/http.noteEOFReader.Read(0x7f31afbcc0a0, 0xc82002a2e8, 0xc820074318, 0xc820213000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1370 +0x67
net/http.(*noteEOFReader).Read(0xc8201c9a00, 0xc820213000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
<autogenerated>:126 +0xd0
bufio.(*Reader).fill(0xc82021d560)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).Peek(0xc82021d560, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:132 +0xcc
net/http.(*persistConn).readLoop(0xc8200742c0)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:876 +0xf7
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:685 +0xc78
goroutine 3835 [runnable]:
syscall.Syscall6(0x11, 0x4, 0xc82044c000, 0x1000, 0x38800e9e, 0x0, 0x0, 0x1000, 0x1000, 0x0)
/home/ma/go/go-go1.5.2/src/syscall/asm_linux_amd64.s:44 +0x5
syscall.Pread(0x4, 0xc82044c000, 0x1000, 0x1000, 0x38800e9e, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/syscall/zsyscall_linux_amd64.go:1372 +0x89
os.(*File).pread(0xc82002a110, 0xc82044c000, 0x1000, 0x1000, 0x38800e9e, 0xe9e, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/os/file_unix.go:221 +0x64
os.(*File).ReadAt(0xc82002a110, 0xc82044c000, 0x1000, 0x1000, 0x38800e9e, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/os/file.go:117 +0xcc
io.(*SectionReader).Read(0xc8203c3a10, 0xc82044c000, 0x1000, 0x1000, 0x1000, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:454 +0xd6
io.(*teeReader).Read(0xc82015e0c0, 0xc82044c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:514 +0x7c
io/ioutil.(*nopCloser).Read(0xc820145260, 0xc82044c000, 0x1000, 0x1000, 0xe9e, 0x0, 0x0)
<autogenerated>:4 +0x82
io.(*LimitedReader).Read(0xc82015e120, 0xc82044c000, 0x1000, 0x1000, 0xe9e, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:427 +0xbd
bufio.(*Writer).ReadFrom(0xc820185500, 0x7f31afbcc218, 0xc82015e120, 0xe9e, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/bufio/bufio.go:692 +0x1f3
io.copyBuffer(0x7f31afbcc118, 0xc820185500, 0x7f31afbcc218, 0xc82015e120, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:375 +0x180
io.Copy(0x7f31afbcc118, 0xc820185500, 0x7f31afbcc218, 0xc82015e120, 0x0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/io/io.go:351 +0x64
net/http.(*transferWriter).WriteBody(0xc820143030, 0x7f31afbcc118, 0xc820185500, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/transfer.go:225 +0x8fe
net/http.(*Request).write(0xc82013f0a0, 0x7f31afbcc118, 0xc820185500, 0x0, 0xc8203c3ad0, 0x0, 0x0)
/home/ma/go/go-go1.5.2/src/net/http/request.go:462 +0xbb9
net/http.(*persistConn).writeLoop(0xc820074420)
/home/ma/go/go-go1.5.2/src/net/http/transport.go:1015 +0x27c
created by net/http.(*Transport).dialConn
/home/ma/go/go-go1.5.2/src/net/http/transport.go:686 +0xc9d
rax 0xfffffffffffffffc
rbx 0xc8200296c8
rcx 0xffffffffffffffff
rdx 0x0
rdi 0x9a79b8
rsi 0x0
rbp 0x3b8bd4d6
rsp 0xc820029690
r8 0x0
r9 0x0
r10 0xc8200296c8
r11 0x202
r12 0x6
r13 0x875c69
r14 0x9
r15 0x8
rip 0x45f833
rflags 0x202
cs 0x33
fs 0x0
gs 0x0
*** Test killed with quit: ran too long (10m0s).
不知道到底哪里出问题了,希望有人解答下
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到自己代码崩溃的原因了,主要是我写了个test文件,用go test测试文件上传,结果上传时间超过10Min 就会发生崩溃,具体原因我还不清楚。不过在主程序中调用qiniusave函数上传是没有问题的。