Skip to content

SQL Proxy Misuses Stopper's Context #77689

@jeffswenson

Description

@jeffswenson

The SQL proxy uses stoper.RunAsyncTask to create a goroutine for each connection. The context created for the async task is passed to child go routines that are spawned using the go command. Stopper attaches a span to the context and the span is returned to a pool when the task returns. During the connection tear down process, child workers may use the task's context. This is inappropriate as it leads to a use after free bug.

Per #58164 the sqlproxy should avoid raw use of the go keyword and should use the stopper to spawn goroutines.

Jira issue: CRDB-13713

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-multitenancyRelated to multi-tenancyC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-cloud-platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions