-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
runtime: frequent crashes in unlock2 on NetBSD and OpenBSD since 2021-10-07 #49453
Comments
This appears to be a regression in Go 1.18. Since NetBSD and OpenBSD are not first-class ports, this doesn't necessarily block the 1.18 release — however, if the regression remains at the time of the release it at least needs a clear writeup in the release notes. (That part, at least, is a release-blocker.) |
CC @prattmic |
The crash is at https://cs.opensource.google/go/go/+/master:src/runtime/lock_sema.go;l=115;drc=f229e7031a6efb2f23241b5da000c3b3203081d6. The crash is always on addr 0x170 (386) or 0x280 (amd64). I believe this is the I'm not sure yet how things get this way. The |
I'm having trouble reproducing this just because there are so many other netbsd memory corruption crashes I'm hitting... (#49209) But as an interesting data point, I've noticed thus far that every all.bash run I've done has either had all tests pass, or had numerous different crashes. I've yet to have just a single test crash. That could indicate something about the environment is making crashes more likely sometimes. |
Two OpenBSD crashes in https://build.golang.org/log/c6898314cb2fdaa7a39437c2186b5e8a804d47f3 |
I believe some of the logs above show this as well, but it hasn't yet been pointed out that this crash sometimes occurs in the Go 1.4 bootstrap toolchain as well. Example below. The line numbers here don't quite line up to the IMO, this indicates that we either have a bug that has been around since at least 1.4, or there is some more general system-provoked memory corruption going on.
Edit: The disassembly of the bootstrap compiler supports that this is the load of |
Offline it was noted that https://golang.org/cl/354757 was submitted around the time this failure ramped up (though not completely before). It is possible that the new CPU type makes some kind of race in our code more likely, or less likely, doesn't work properly with the OS. Looking more carefully at the lock code, this crash could simply be from calling unlock2 on an already unlocked mutex. i.e., we assume that either l.key == locked (no waiters), or the masked value is an M pointer. If l.key is 0 (unlocked, no waiters), then we will do the nil dereference we see in the crashes. Normally, that would (well, could) throw "lock count", but that check comes after where this crash occurs. |
I think the correlation with |
So far I've been having significant trouble reproducing these crashes once I added debuglog messages to Interestingly, I am still reproducing the |
The current state of my reproduction / investigation is in https://golang.org/cl/365316. |
Change https://golang.org/cl/365316 mentions this issue: |
Alongside the
I have a core for this, and digging into it, it looks like it crashes with an address of 0 (nil pointer dereference) but when I look at the value in memory that the register is loaded from ( Like the What's interesting here too is that these are crashes in the runtime. If, say, an asynchronous preemption signal lands while a thread is in the runtime, it should just return as a no-op. Maybe the reason why we're not seeing failures outside the runtime is because we do our own register spill and restore by injecting the asynchronous preemption onto the stack. However, I think this might be ruled out because the post-signal-handler spill should also then observe save and restore some bad value obtained by returning from the signal handler. |
Change https://golang.org/cl/367847 mentions this issue: |
We're pretty confident that this has the same root cause as #49209, so closing in favor of the broader issue. |
greplogs --dashboard -md -l -e '(?ms)fatal error.*unlock2'
2021-11-08T18:06:16-5e64755/netbsd-386-9_0
2021-11-08T18:06:16-39ade5b-5e64755/netbsd-amd64-9_0
2021-11-08T17:07:45-6635138-7bda349/netbsd-386-9_0
2021-11-08T16:15:01-30b2efe-759eaa2/netbsd-386-9_0
2021-11-08T14:49:56-18b340f-ab31dbc/netbsd-386-9_0
2021-11-07T04:56:11-85493d5/netbsd-386-9_0
2021-11-06T19:41:15-036812b-61d789d/netbsd-386-9_0
2021-11-06T16:43:43-39ade5b-3544082/netbsd-386-9_0
2021-11-06T13:10:06-1f47c86-4f083c7/netbsd-386-9_0
2021-11-06T10:24:44-0c60b7c-f19e400/netbsd-amd64-9_0
2021-11-06T00:29:44-a66bbe2-b74f2ef/netbsd-386-9_0
2021-11-06T00:29:44-a07c284-b74f2ef/netbsd-amd64-9_0
2021-11-06T00:29:44-0c60b7c-b74f2ef/netbsd-amd64-9_0
2021-11-05T23:32:57-b8b8e7f-09e8de7/netbsd-386-9_0
2021-11-05T22:57:08-09e8de7/openbsd-386-68
2021-11-05T22:54:47-ba79c1e/netbsd-386-9_0
2021-11-05T22:54:47-ba79c1e/netbsd-amd64-9_0
2021-11-05T22:30:17-03971e3-b07c41d/netbsd-386-9_0
2021-11-05T22:26:07-4ab7496-d3a80c7/netbsd-386-9_0
2021-11-05T22:26:07-39ade5b-d3a80c7/netbsd-amd64-9_0
2021-11-05T22:00:37-f00b43f/openbsd-386-68
2021-11-05T21:48:25-a66bbe2-6b223e8/netbsd-amd64-9_0
2021-11-05T21:48:25-4ab7496-6b223e8/netbsd-386-9_0
2021-11-05T21:34:10-4ab7496-bb53fd7/openbsd-386-68
2021-11-05T21:29:18-75952ab/openbsd-386-68
2021-11-05T21:28:50-fb8b176/openbsd-386-68
2021-11-05T21:27:34-7aed6dd/netbsd-386-9_0
2021-11-05T21:26:54-3e9e024/openbsd-386-68
2021-11-05T21:13:38-39ade5b-091948a/netbsd-amd64-9_0
2021-11-05T20:59:32-71559a6/openbsd-386-68
2021-11-05T20:06:27-a7b6526-7be227c/netbsd-386-9_0
2021-11-05T20:06:27-a07c284-7be227c/netbsd-386-9_0
2021-11-05T19:48:29-c353f1b/netbsd-386-9_0
2021-11-05T19:14:22-a07c284-fa16efb/netbsd-amd64-9_0
2021-11-05T19:01:13-93bab8a/netbsd-386-9_0
2021-11-05T18:20:07-a66bbe2-53bab19/netbsd-386-9_0
2021-11-05T18:20:07-a07c284-53bab19/netbsd-386-9_0
2021-11-05T17:52:30-df18377/netbsd-amd64-9_0
2021-11-05T17:47:28-6f32d20/netbsd-386-9_0
2021-11-05T17:47:28-6f32d20/netbsd-amd64-9_0
2021-11-05T17:23:06-37951d8/openbsd-386-68
2021-11-05T17:17:30-a66bbe2-62c6ff4/netbsd-amd64-9_0
2021-11-05T17:17:30-62c6ff4/netbsd-amd64-9_0
2021-11-05T17:17:30-39ade5b-62c6ff4/netbsd-386-9_0
2021-11-05T16:54:01-a07c284-3796df1/netbsd-386-9_0
2021-11-05T07:00:05-ce13745-6fefb7f/netbsd-386-9_0
2021-11-05T05:30:39-b68c02e/netbsd-amd64-9_0
2021-11-05T04:20:33-089bfa5-0a5ca24/netbsd-386-9_0
2021-11-05T00:52:06-3839b60/netbsd-386-9_0
2021-11-04T23:35:26-ce13745-256a8fc/netbsd-amd64-9_0
2021-11-04T23:35:26-b76863e-256a8fc/netbsd-386-9_0
2021-11-04T21:53:05-ce13745-76c48e9/netbsd-386-9_0
2021-11-04T21:53:05-37ea4aa-76c48e9/netbsd-amd64-9_0
2021-11-04T21:41:49-39ade5b-156abe5/netbsd-386-9_0
2021-11-04T20:42:35-1f9dce7/netbsd-386-9_0
2021-11-04T20:31:02-39ade5b-978e39e/netbsd-386-9_0
2021-11-04T20:24:01-99699d1/netbsd-386-9_0
2021-11-04T19:34:33-5af93a2/netbsd-amd64-9_0
2021-11-04T18:22:03-39ade5b-b2149ac/netbsd-386-9_0
2021-11-04T17:07:48-5772877/netbsd-386-9_0
2021-11-04T17:07:48-5772877/netbsd-amd64-9_0
2021-11-04T16:36:19-84e69e7-f934b83/netbsd-386-9_0
2021-11-04T14:17:18-7861aae-901bf29/netbsd-386-9_0
2021-11-04T13:55:28-39ade5b-23991f5/netbsd-386-9_0
2021-11-04T13:55:28-30b2efe-23991f5/netbsd-386-9_0
2021-11-04T13:55:24-4a4e1f2-f58c78a/netbsd-amd64-9_0
2021-11-04T07:05:31-84e69e7-2622235/netbsd-386-9_0
2021-11-04T07:05:31-84e69e7-2622235/netbsd-amd64-9_0
2021-11-04T07:05:31-39ade5b-2622235/netbsd-386-9_0
2021-11-04T02:57:53-4a4e1f2-2cf85b1/netbsd-386-9_0
2021-11-04T02:57:53-2cf85b1/netbsd-amd64-9_0
2021-11-04T02:57:48-5fd0c49/netbsd-386-9_0
2021-11-04T02:57:48-5fd0c49/netbsd-amd64-9_0
2021-11-04T00:46:41-84e69e7-e72d715/netbsd-amd64-9_0
2021-11-04T00:36:13-1292e21/openbsd-amd64-68
2021-11-04T00:29:42-a419f2f/netbsd-amd64-9_0
2021-11-04T00:29:42-39ade5b-a419f2f/netbsd-386-9_0
2021-11-04T00:19:43-39ade5b-9cf6711/netbsd-386-9_0
2021-11-03T20:30:17-68536fa-7f2463c/netbsd-386-9_0
2021-11-03T18:37:22-2c98350-cfd016d/netbsd-amd64-9_0
2021-11-03T16:57:44-3a5865c-b212ba6/netbsd-386-9_0
2021-11-03T15:47:47-c143661/netbsd-386-9_0
2021-11-03T05:00:00-39ade5b-519c0a2/netbsd-386-9_0
2021-11-02T23:44:58-a0f373c/netbsd-386-9_0
2021-11-02T22:20:40-39ade5b-2157498/netbsd-386-9_0
2021-11-02T21:21:51-9aacde2-631b567/netbsd-amd64-9_0
2021-11-02T21:21:51-9aacde2-42e6b5b/netbsd-386-9_0
2021-11-02T21:18:39-60fd3ed/netbsd-386-9_0
2021-11-02T20:59:34-6561d8c-79024cf/netbsd-386-9_0
2021-11-02T20:59:34-39ade5b-79024cf/netbsd-386-9_0
2021-11-02T20:33:56-b76863e-b29182b/netbsd-amd64-9_0
2021-11-02T19:37:42-bb4add0-1011e26/netbsd-386-9_0
2021-11-02T18:35:29-a07c284-433ba58/netbsd-amd64-9_0
2021-11-02T18:24:18-bb4add0-f7a95d2/netbsd-386-9_0
2021-11-02T18:19:06-1ba8fdb-631b567/netbsd-amd64-9_0
2021-11-02T18:01:20-39ade5b-629ffeb/netbsd-386-9_0
2021-11-02T18:01:20-058ed05-629ffeb/netbsd-amd64-9_0
2021-11-02T17:31:50-4e7dd9f/openbsd-386-68
2021-11-02T17:31:50-39ade5b-4e7dd9f/netbsd-386-9_0
2021-11-02T17:01:01-af8aafd/netbsd-386-9_0
2021-11-02T16:57:03-c406380/netbsd-amd64-9_0
2021-11-02T16:19:52-c96bc14-58fb05a/netbsd-386-9_0
2021-11-02T16:12:28-f801da7/netbsd-amd64-9_0
2021-11-02T16:12:23-599de4b/netbsd-amd64-9_0
2021-11-02T15:54:27-058ed05-631b567/netbsd-amd64-9_0
2021-11-02T06:25:39-30b2efe-088bb4b/netbsd-amd64-9_0
2021-11-02T03:55:19-39ade5b-6f1e9a9/netbsd-386-9_0
2021-11-02T03:09:01-a45457d/netbsd-amd64-9_0
2021-11-02T00:12:17-4ff95d6-81fea0b/netbsd-386-9_0
2021-11-01T21:27:26-39ade5b-631b567/netbsd-386-9_0
2021-11-01T21:27:26-2c98350-631b567/netbsd-amd64-9_0
2021-11-01T21:27:26-1f47c86-631b567/netbsd-386-9_0
2021-11-01T16:31:02-39ade5b-2bcf1c0/netbsd-amd64-9_0
2021-11-01T16:31:02-2bcf1c0/netbsd-386-9_0
2021-11-01T15:55:25-e2e910e/netbsd-386-9_0
2021-11-01T13:12:37-611d5d6-4056934/netbsd-amd64-9_0
2021-11-01T13:08:16-732db40/openbsd-386-68
2021-10-31T18:39:05-39ade5b-89c5270/netbsd-386-9_0
2021-10-31T18:39:05-12ab535-89c5270/netbsd-amd64-9_0
2021-10-31T18:13:09-39ade5b-fd09e88/netbsd-amd64-9_0
2021-10-31T08:29:02-39ade5b-8e3d5f0/netbsd-amd64-9_0
2021-10-30T18:30:34-ba495a6-6113dac/netbsd-386-9_0
2021-10-30T16:46:47-d1dceaf/netbsd-386-9_0
2021-10-30T16:45:25-e39b854/netbsd-386-9_0
2021-10-30T16:08:13-b3129d9-5d6d9f5/netbsd-386-9_0
2021-10-30T00:47:26-a6c6f4b-d19c5bd/netbsd-amd64-9_0
2021-10-30T00:47:26-a6c6f4b-5d6d9f5/netbsd-386-9_0
2021-10-30T00:47:26-a6c6f4b-4a84298/netbsd-386-9_0
2021-10-29T22:29:31-c96bc14-c812b97/netbsd-386-9_0
2021-10-29T22:29:31-39ade5b-c812b97/netbsd-386-9_0
2021-10-29T22:27:54-71e6ab8/netbsd-amd64-9_0
2021-10-29T22:27:26-3571ab5/netbsd-386-9_0
2021-10-29T21:19:39-a2be0cd-d19c5bd/netbsd-amd64-9_0
2021-10-29T21:19:39-a2be0cd-994049a/netbsd-amd64-9_0
2021-10-29T17:44:15-d8fc7f7/netbsd-amd64-9_0
2021-10-29T02:12:05-d6a9af8-d3d8852/netbsd-amd64-9_0
2021-10-28T21:17:17-089bfa5-f6f024f/netbsd-386-9_0
2021-10-28T20:43:39-b954024/netbsd-386-9_0
2021-10-28T18:48:25-e7eb6f6-9004433/netbsd-386-9_0
2021-10-28T18:01:38-39ade5b-9004433/netbsd-386-9_0
2021-10-28T15:35:25-39ade5b-278b9b3/netbsd-amd64-9_0
2021-10-28T15:31:34-8de2a7f-8c9c148/netbsd-amd64-9_0
2021-10-28T15:08:31-26ed8fd-5c98bcb/netbsd-amd64-9_0
2021-10-28T03:35:34-b8f928b/netbsd-amd64-9_0
2021-10-28T02:35:22-39ade5b-056dfe6/netbsd-amd64-9_0
2021-10-28T01:15:26-b2fe2eb/netbsd-386-9_0
2021-10-27T21:37:54-7b0b504-749f6e9/netbsd-amd64-9_0
2021-10-27T20:29:07-51be206/netbsd-386-9_0
2021-10-27T20:25:06-bbc0595/netbsd-amd64-9_0
2021-10-27T16:59:43-c0ac39c/netbsd-amd64-9_0
2021-10-27T16:39:27-39ade5b-4f73fd0/netbsd-386-9_0
2021-10-27T08:50:27-39ade5b-bdefb77/netbsd-386-9_0
2021-10-26T22:00:36-26dbf47-86f6bf1/netbsd-amd64-9_0
2021-10-26T20:41:32-03fcf44-3a0cd11/netbsd-amd64-9_0
2021-10-26T18:40:06-9626607-11b64b4/netbsd-386-9_0
2021-10-26T18:33:39-244f92e-11b64b4/netbsd-amd64-9_0
2021-10-26T15:20:53-39ade5b-1b2362b/netbsd-386-9_0
2021-10-26T15:20:53-036812b-1b2362b/netbsd-amd64-9_0
2021-10-26T14:24:17-39ade5b-283d8a3/netbsd-386-9_0
2021-10-26T14:05:47-39ade5b-a2b8c18/netbsd-386-9_0
2021-10-26T11:58:05-1e2820a/netbsd-386-9_0
2021-10-26T05:05:24-23fdd7f/openbsd-386-68
2021-10-26T02:02:46-903c757-11b64b4/netbsd-amd64-9_0
2021-10-26T01:22:47-adfb85b/netbsd-386-9_0
2021-10-26T01:22:47-adfb85b/openbsd-386-68
2021-10-19T18:56:08-07e5527/netbsd-386-9_0
2021-10-19T15:48:56-98f6e03-067d796/openbsd-386-64
2021-10-19T07:45:46-ee92daa/netbsd-amd64-9_0
2021-10-19T07:45:46-98f6e03-ee92daa/netbsd-386-9_0
2021-10-18T21:57:36-98f6e03-3befaf0/netbsd-amd64-9_0
2021-10-14T04:18:44-09e6c7a-9e4dc6f/openbsd-386-64
2021-10-12T21:14:34-03971e3-c580180/netbsd-amd64-9_0
2021-10-07T19:49:45-39ade5b-c580180/netbsd-386-9_0
2021-09-30T20:30:12-1c35f2a-c035d82/openbsd-386-64
2021-09-22T22:01:15-c8db761-1537f14/openbsd-386-64
2021-09-10T02:44:36-2091bd3/plan9-386-0intro
2021-09-01T19:23:15-8373dc3-592ee43/plan9-arm
2021-05-06T18:08:01-402f177/plan9-386-0intro
2021-05-06T16:28:56-5f9fe47/plan9-386-0intro
2021-04-01T15:50:43-45ca9ef/linux-arm-scaleway
2021-04-01T01:26:29-5f646f0/linux-arm-scaleway
2021-04-01T00:51:26-ec721d9/linux-arm-scaleway
2021-04-01T00:51:24-1f29e69/linux-arm-scaleway
2021-04-01T00:51:23-3304b22/linux-arm-scaleway
2021-03-31T20:21:57-5d6581d/linux-arm-scaleway
2020-12-22T20:00:00-c9fb4eb/windows-386-2008
2020-12-15T16:31:07-a508840/plan9-arm
2020-12-15T16:30:24-5046cb8/plan9-arm
2020-12-02T17:00:06-3d913a9/plan9-arm
2020-11-20T16:42:46-5e58ae4/plan9-arm
2020-11-19T19:30:38-e73697b/plan9-arm
2020-11-19T02:17:10-0bb6115/plan9-arm
2020-11-11T20:51:00-141fa33/plan9-arm
2020-10-29T19:06:32-5cc43c5/plan9-arm
2020-10-28T00:25:05-40d1ec5/plan9-arm
2020-07-07T16:15:30-3b6b86d/plan9-386-0intro
2020-05-05T18:32:35-8627b4c/plan9-arm
2020-05-05T18:05:10-a8e83d5/plan9-arm
2020-05-05T15:41:37-b4ecafc/plan9-arm
2020-05-05T05:13:26-9b18968/plan9-arm
2020-05-05T00:36:44-c9d5f60/plan9-arm
2020-05-04T17:40:00-a1ffbe9/plan9-arm
Note the inflection point on the BSD builders around 2021-09-22. This may or may not share an underlying cause with #49209.
The text was updated successfully, but these errors were encountered: