Thanks for your kind and instant reply. Allow me to explain myself a bit more.
My code has two kinds of data races. First one is a global struct without any pointer member being written and read by multiple Goroutines. Second one is a struct's string member being written and read by multiple Gourotines. Data race report shows no other unsafe or cgo usage. As far as I know, those kinds of data races may lead to a string or struct value inconsistency within the race time window. How can that inconsistency lead to a marked free bit in runtime.mspan? This really puzzles me. Or maybe I took the wrong direction, this could be a hardware issue, like a memory bit flip? But I failed to find any issue in the Go community. On Tue, 19 Nov 2024 at 14:32, Kurtis Rader <[email protected]> wrote: > On Mon, Nov 18, 2024 at 10:06 PM Lin Lin <[email protected]> > wrote: > >> Yes, I do agree that it's easy to write data race code. >> Sorry, I didn't make it clear. I have the data race report, my >> concerning is to prove the relation bewteen data race and the crash.The >> code I want is actually that can trigger a runtime reportZombies crash. >> > > A "reportZombies" crash can have several reasons; including, but not > limited to, a data race. I still don't understand how you think a generic > program that causes a "reportZombies" crash will help you identify the bug > in your program. I suggest starting by fixing the data races in your > program. If that doesn't eliminate the "reportZombies" crashes then you > have a more difficult problem to diagnose. Start by trying to identify > whether you have pure Go code that is converting pointers to uintptr's (and > not correctly managing such pointers), or (more likely) you are using CGo > to link with non-Go code and your Go code is not correctly managing the > lifecycle of the non-Go code data. > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CA%2BhP-7uvPnY7OKgDwYpUYALPzb0zDVJmwYxkzKBZnGOKEY5J1A%40mail.gmail.com.
