Comments (5)
Implemented, please test.
from stored.
First crash:
2017/07/07 20:25:15 Config={General:{HTTPListen:[0.0.0.0:9090] NNTPListen:[0.0.0.0:9091] IncomingLog:/news/stored/log/} Storage:[{Mountpoint:/news/spool/spools/P1/stored/ Minfree:100GB MinfreeGB:100 Disabled:false Name:P1} {Mountpoint:/news/spool/spools/P2/stored/ Minfree:100GB MinfreeGB:100 Disabled:false Name:P2}]}
2017/07/07 20:25:15 httpd listening on 0.0.0.0:9090
2017/07/07 20:25:15 nntpd listening on 0.0.0.0:9091
2017/07/07 20:25:18 C(192.168.10.252:51587) New
C(192.168.10.252:51587) >> 200 StoreD
C(192.168.10.252:51587) << head <[email protected]>
2017/07/07 20:25:22 msgid(<[email protected]>) not found
C(192.168.10.252:51587) >> 400 No such article
C(192.168.10.252:51587) >> 221 <[email protected]>
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x45e926]
goroutine 6 [running]:
panic(0x65cc60, 0xc4200100e0)
/usr/lib/golang/src/runtime/panic.go:500 +0x1a1
bytes.(*Buffer).Read(0x0, 0xc4200ea000, 0x8000, 0x8000, 0xc4200ea000, 0x410ec9, 0x660820)
/usr/lib/golang/src/bytes/buffer.go:259 +0x26
stored/headreader.(*HeadReader).Read(0xc4200d1800, 0xc4200ea000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0)
/home/golangcode/src/stored/headreader/headreader.go:20 +0x61
io.copyBuffer(0x7b8da0, 0xc420011c90, 0x7b84a0, 0xc4200d1800, 0xc4200ea000, 0x8000, 0x8000, 0xc420011c90, 0xc420040b70, 0x66c0a0)
/usr/lib/golang/src/io/io.go:390 +0x147
io.Copy(0x7b8da0, 0xc420011c90, 0x7b84a0, 0xc4200d1800, 0xc420011c90, 0x1, 0xc420040c00)
/usr/lib/golang/src/io/io.go:360 +0x68
net.genericReadFrom(0x7b7c20, 0xc42002e070, 0x7b84a0, 0xc4200d1800, 0x0, 0x0, 0x452300)
/usr/lib/golang/src/net/net.go:589 +0x96
net.(*TCPConn).readFrom(0xc42002e070, 0x7b84a0, 0xc4200d1800, 0x40f64f, 0x7f59aa8124d0, 0xc420040c30)
/usr/lib/golang/src/net/tcpsock_posix.go:47 +0x8c
net.(*TCPConn).ReadFrom(0xc42002e070, 0x7b84a0, 0xc4200d1800, 0xc420040ca0, 0xc4200e8001, 0x3c)
/usr/lib/golang/src/net/tcpsock.go:82 +0x5f
bufio.(*Writer).ReadFrom(0xc420018940, 0x7b84a0, 0xc4200d1800, 0xc420040d18, 0xc420018901, 0x0)
/usr/lib/golang/src/bufio/bufio.go:681 +0x373
io.copyBuffer(0x7b76e0, 0xc420018940, 0x7b84a0, 0xc4200d1800, 0x0, 0x0, 0x0, 0xc420011c60, 0x648880, 0xc420011c70)
/usr/lib/golang/src/io/io.go:384 +0x323
io.Copy(0x7b76e0, 0xc420018940, 0x7b84a0, 0xc4200d1800, 0x0, 0xc4200189c5, 0x36)
/usr/lib/golang/src/io/io.go:360 +0x68
main.read(0xc4200135c0, 0xc4200189c5, 0x36, 0x6a535a, 0x4)
/home/golangcode/src/stored/nntp.go:58 +0x1ea
main.Head(0xc4200135c0, 0xc4200d1780, 0x2, 0x2)
/home/golangcode/src/stored/nntp.go:79 +0x93
main.req(0xc4200135c0)
/home/golangcode/src/stored/nntp.go:198 +0x4c2
created by main.nntpListen
/home/golangcode/src/stored/nntp.go:239 +0x111
from stored.
Fix
from stored.
new crash:
2017/07/08 23:20:37 msgid(<[email protected]>) hash MATCH
2017/07/08 23:20:37 msgid(<[email protected]>) resolved to /news/spool/spools/P29/stored/486fddbd/33379577/9b683a52/19f9d25c/93e8130fd377ec7c1a48a63de3d17310.txt
C(192.168.11.156:58190) >> 222 <[email protected]>
2017/07/08 23:20:37 read(<[email protected]>) start streamreader
panic: runtime error: index out of range
goroutine 20 [running]:
stored/bodyreader.(*BodyReader).Read(0xc42014ee60, 0xc420534000, 0x8000, 0x8000, 0x8000, 0x8000, 0x5881e0)
/Users/jethro/go/src/stored/bodyreader/bodyreader.go:26 +0x195
io.copyBuffer(0x9994c0, 0xc42044b2f0, 0x998a40, 0xc42014ee60, 0xc420534000, 0x8000, 0x8000, 0xc4204b9b70, 0xc42044b2f0, 0x7a7480)
/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:390 +0x100
io.Copy(0x9994c0, 0xc42044b2f0, 0x998a40, 0xc42014ee60, 0x0, 0x0, 0xc4204b9c00)
/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:360 +0x68
net.genericReadFrom(0x998200, 0xc420168020, 0x998a40, 0xc42014ee60, 0x0, 0x0, 0x799000)
/usr/local/Cellar/go/1.8.3/libexec/src/net/net.go:608 +0x8d
net.(*TCPConn).readFrom(0xc420168020, 0x998a40, 0xc42014ee60, 0x101, 0x7f1ad22bbe50, 0xc4204b9c30)
/usr/local/Cellar/go/1.8.3/libexec/src/net/tcpsock_posix.go:51 +0xa5
net.(*TCPConn).ReadFrom(0xc420168020, 0x998a40, 0xc42014ee60, 0x7f1ad22bbe50, 0xc420168020, 0x7f1ad22bbe01)
/usr/local/Cellar/go/1.8.3/libexec/src/net/tcpsock.go:88 +0x5f
bufio.(*Writer).ReadFrom(0xc420167b00, 0x998a40, 0xc42014ee60, 0x7f1ad22bbe28, 0xc420167b00, 0xed0f34301)
/usr/local/Cellar/go/1.8.3/libexec/src/bufio/bufio.go:684 +0x321
io.copyBuffer(0x997ac0, 0xc420167b00, 0x998a40, 0xc42014ee60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x43)
/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:384 +0x2cb
io.Copy(0x997ac0, 0xc420167b00, 0x998a40, 0xc42014ee60, 0x1, 0xc420216305, 0x29)
/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:360 +0x68
main.read(0xc420217cb0, 0xc420216305, 0x29, 0x7f674a, 0x4)
/Users/jethro/go/src/stored/nntp.go:64 +0x227
main.Body(0xc420217cb0, 0xc42014ede0, 0x2, 0x2)
/Users/jethro/go/src/stored/nntp.go:96 +0x93
main.req(0xc420217cb0)
/Users/jethro/go/src/stored/nntp.go:256 +0x590
created by main.nntpListen
/Users/jethro/go/src/stored/nntp.go:299 +0x120
from stored.
Fix
from stored.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stored.