Re: [go-nuts] print* in runtime running into deadlocks

2023-02-26 Thread Xiangdong Ji
>> It ought to be impossible, because printlock increments mp.locks. Thanks, realized it's NOT a problem with printlock/printunlock. >> Have you seen this happen? Not yet with normal program, but a deadlock could be produced with the diagnostic change to mgcsweep.go (say, running ./make.bash

Re: [go-nuts] print* in runtime running into deadlocks

2023-02-26 Thread Xiangdong Ji
>> Have you seen this happen? It ought to be impossible, because >> printlock increments mp.locks. When mp.locks is not zero the M can't >> be preempted and the goroutine can't block. Not yet with normal program, but a deadlock could be produced with the diagnostic change to mgcsweep.go (say,

Re: [go-nuts] print* in runtime running into deadlocks

2023-02-23 Thread Ian Lance Taylor
On Wed, Feb 22, 2023 at 6:43 PM Xiangdong Ji wrote: > > Looks like the print* helper functions may run into deadlocks if the printer > Goroutine is rescheduled to a different M to execute 'printunlock' as the "if > mp.printlock==0" checking is likely to fail if M has changed. Have you seen

[go-nuts] print* in runtime running into deadlocks

2023-02-22 Thread Xiangdong Ji
Hi experts, Looks like the print* helper functions may run into deadlocks if the printer Goroutine is rescheduled to a different M to execute 'printunlock' as the "if mp.printlock==0" checking is likely to fail if M has changed. Wondering is it intentional behavior? As print* are (almostly if