go pserver free memory error
Created by: dzhwinter
Go pserver free memory twice error.
time="2017-07-14T10:42:13+08:00" level=info msg="New Optimizer Created with config:" ConfigSize=50 ElementType=4 ParamSize=2500 StateSize=0 client.test(45331,0x70000386f000) malloc: *** error for object 0x59058a8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
SIGABRT: abort PC=0x7fffbb48adda m=5 sigcode=0
signal arrived during cgo execution
goroutine 262 [syscall, locked to thread]: runtime.cgocall(0x46f7da0, 0xc4204c5860, 0x487aa4d)
/usr/local/opt/go/libexec/src/runtime/cgocall.go:131 +0x8b fp=0xc4204c5820 sp=0xc4204c57e8
github.com/PaddlePaddle/Paddle/go/pserver._Cfunc_paddle_update_parameter(0x5b00300, 0xc400000004, 0xc42046a000, 0x271, 0x0)
github.com/PaddlePaddle/Paddle/go/pserver/_obj/_cgo_gotypes.go:142 +0x6b fp=0xc4204c5860 sp=0xc4204c5820
github.com/PaddlePaddle/Paddle/go/pserver.(*optimizer).UpdateParameter.func1(0xc420011c40, 0x4, 0x4, 0xc42046a000, 0x9c4, 0x9c4, 0x5b00300, 0x4, 0xc42046a000$ 0xc400000271, ...)
/Users/dzh/.go/src/github.com/PaddlePaddle/Paddle/go/pserver/optimizer.go:81 +0x150 fp=0xc4204c58b8 sp=0xc4204c5860
github.com/PaddlePaddle/Paddle/go/pserver.(*optimizer).UpdateParameter(0xc420139e90, 0xc420011c40, 0x4, 0x4, 0xc42046a000, 0x9c4, 0x9c4, 0x40be6d3, 0x40cfc22$ /Users/dzh/.go/src/github.com/PaddlePaddle/Paddle/go/pserver/optimizer.go:81 +0x107 fp=0xc4204c5988 sp=0xc4204c58b8
github.com/PaddlePaddle/Paddle/go/pserver.(*Service).SendGrad(0xc42019c440, 0xc420011c40, 0x4, 0x4, 0xc42046a000, 0x9c4, 0x9c4, 0xc420011c48, 0x0, 0x0)
/Users/dzh/.go/src/github.com/PaddlePaddle/Paddle/go/pserver/service.go:194 +0x18f fp=0xc4204c5a20 sp=0xc4204c5988
runtime.call128(0xc42019e7e0, 0xc4201b80c0, 0xc4201ad9f0, 0x4000000050)
/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:516 +0x66 fp=0xc4204c5ab0 sp=0xc4204c5a20