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

Fix panic: concurrent write to websocket #1112

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

fisherxu
Copy link
Member

@fisherxu fisherxu commented Sep 9, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind feature

What this PR does / why we need it:
routeToCloud and keeplive are two goroutines, if there's no lock here, edgecore will panic when they concurrent write to websocket connection.
Which issue(s) this PR fixes:

Fixes #1017

Special notes for your reviewer:
/cc @kevin-wangzefeng @kadisi @alien19880726
Does this PR introduce a user-facing change?:

NONE

@kubeedge-bot
Copy link
Collaborator

@fisherxu: GitHub didn't allow me to request PR reviews from the following users: alien19880726.

Note that only kubeedge members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change

/kind bug

/kind cleanup
/kind design
/kind documentation
/kind test
/kind failing-test
/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1017

Special notes for your reviewer:
/cc @kevin-wangzefeng @kadisi @alien19880726
Does this PR introduce a user-facing change?:

NONE

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubeedge-bot kubeedge-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 9, 2019
@fisherxu
Copy link
Member Author

fisherxu commented Sep 9, 2019

/cc @alien19880726

@kubeedge-bot
Copy link
Collaborator

@fisherxu: GitHub didn't allow me to request PR reviews from the following users: alien19880726.

Note that only kubeedge members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @alien19880726

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kevin-wangzefeng
Copy link
Member

/approve

@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kevin-wangzefeng

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2019
@kadisi
Copy link
Member

kadisi commented Sep 9, 2019

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 9, 2019
@kubeedge-bot kubeedge-bot merged commit ae0048d into kubeedge:master Sep 9, 2019
@fisherxu fisherxu deleted the fix-panic branch September 9, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: concurrent write to websocket connection(edgecore process crashes)
4 participants