Skip to content
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

server: use the right ctx when logging an error #26706

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

andreimatei
Copy link
Contributor

We were using a context that was potentially long gone, leading to a
span use-after-free crash.

Fixes #25389

Release note (bug fix): Fixed a rare crash on node decomissioning.

We were using a context that was potentially long gone, leading to a
span use-after-free crash.

Fixes cockroachdb#25389

Release note (bug fix): Fixed a rare crash on node decomissioning.
@andreimatei andreimatei requested a review from a team June 13, 2018 20:59
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andreimatei
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Jun 13, 2018
26706: server: use the right ctx when logging an error r=andreimatei a=andreimatei

We were using a context that was potentially long gone, leading to a
span use-after-free crash.

Fixes #25389

Release note (bug fix): Fixed a rare crash on node decomissioning.

Co-authored-by: Andrei Matei <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jun 13, 2018

Build succeeded

@craig craig bot merged commit aac7366 into cockroachdb:master Jun 13, 2018
@andreimatei andreimatei deleted the fix-drain branch June 13, 2018 23:21
@tbg
Copy link
Member

tbg commented Jun 14, 2018

Are you sure you fixed something here? RunWorker already gives you a new tracing span that wraps the closure:

@andreimatei
Copy link
Contributor Author

The closure wasn't using the ctx that's passed in as an argument - the argument is unnamed. It was using the caller's ctx directly.

@tbg
Copy link
Member

tbg commented Jun 14, 2018

Oh, I missed that. Jeez, subtle.

craig bot pushed a commit that referenced this pull request Jun 14, 2018
26717: cherrypick 2.0: server: use the right ctx when logging an error r=andreimatei a=andreimatei

Cherry-pick of #26706

We were using a context that was potentially long gone, leading to a
span use-after-free crash.

Fixes #25389

Release note (bug fix): Fixed a rare crash on node decomissioning.

Co-authored-by: Andrei Matei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

util/tracing: panic in LogFields - runtime error: index out of range
4 participants