Re: [go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-10 Thread Yuu LongXue
Yeah, source code and dumping memory seems to be the only and right way to know exactly why. Thanks for your responses YUU > On Mar 9, 2020, at 11:39 PM, Leszek Kubik wrote: > > To understand (make a best guess) a race condition case you need to dump the > physical memory and analyze it

Re: [go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-09 Thread Jan Mercl
On Mon, Mar 9, 2020 at 4:16 PM Yuu LongXue wrote: > > Hi all, > > Slice is not thread safe for write operation if without lock, this is true > and I know this feature. but recently, I got a panic which caused by writing > a slice concurrently with out lock occasionally and I can't figure out

Re: [go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-09 Thread burak serdar
On Mon, Mar 9, 2020 at 9:16 AM Yuu LongXue wrote: > > Hi all, > > Slice is not thread safe for write operation if without lock, this is true > and I know this feature. but recently, I got a panic which caused by writing > a slice concurrently with out lock occasionally and I can't figure out

[go-nuts] append slice concurrently without lock,after that panic occurred when iterate the slice

2020-03-09 Thread Yuu LongXue
Hi all, Slice is not thread safe for write operation if without lock, this is true and I know this feature. but recently, I got a panic which caused by writing a slice concurrently with out lock occasionally and I can't figure out why. ### the process as below: 1. define a slice: var x