New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync: mutex gets stuck in locked state #60723
Comments
Doesn't appear to be reproducible. |
It is reproducible. The problem is that each time a new thread is started there may be a situation causing it to fail or causing it to succeed and that means that a long time needs to pass before the situation that causes the freeze will actually proceed. That is why the problem is deeper, or longer than the code that does nothing other than constantly create new threads that are likely to fail. |
Reopen the issue, if I remove |
@seankhliao please read the comments replying to you and re-open the issue. |
@seankhliao is right, 1.18 is no longer supported. We'll need a reproducer on 1.19 or later. Does it reproduce on 1.19, 1.20, or tip?
How much time? 2 seconds? 3 days? |
I told you already, if you remove If you don't know how that code explains that the mutex stayed locked by it's console output, then you are not reading the code and are repeating a list of non-answers. The timing of it could be dependent on the temperature reading at the maximum number of zeroes immediately after the decimal in an ieee 754 float with 15 final numbers that are not 0 for all I know, it takes some time to test each breakpoint and at the end of the breakpoint testing this is the result. If you don't support Go 1.18, close every issue that is before the version you do support. |
@randall77 @seankhliao every answer is provided, please reopen the issue to provide a path to fixing and informing users of Go that |
"it works" = the bug happens, or "it works" = the bug no longer happens? I was assuming the latter, but maybe you mean the former?
I assume you mean that eventually it stops printing things. I understand that, I read your program and understand exactly what it does (or is supposed to do). But when I run your program it never stops printing things. So you're seeing something that I'm not seeing. If you want us to help you figure out this bug, you're going to have to help us. We can't reproduce what you are seeing. We need detailed, exact instructions that get you to a failed program execution. Exact source code, exact build instructions, exact instructions to run it. There's clearly something different about what you are doing and what we are doing, and without detailed information about what you're doing we'll never figure that out. For instance, let's start with what program you're running that demonstrates the problem. Is it the program listed in the original post, or is it that one minus the |
Some questions left unanswered. It would really help if you could answer them:
In particular, how do you know that it isn't, say, a problem with the
|
@randall77 none of those questions have value. Your arguments are as invalid as the temperature is outside the operating ranges of the CPU. Please stop the littering in the discussion. |
@andrewhodel Please follow the Go Community Code of Conduct. Please be respectful and charitable. |
@ianlancetaylor I agree, I am helping you keep everything clean and tidy as requested. |
It was not The problem was not being logged, here it is - #60765 |
Major changes to mutexes in Go 1.19 |
Note that the changes you link to first appeared in Go 1.9, released in 2017. They were not new in Go 1.19. |
The major change is in that commit.
|
It wasn't #60765 either. It was an extra lock in a non reviewed function. I went back and listened to the recorded audio assault at the building while typing and the word lock was continually played across the electrical grid. |
The a mutex stops working and stays locked after some time.
The text was updated successfully, but these errors were encountered: