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

[JENKINS-69543] Fix thread safety in websockets handling. #7076

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Sep 7, 2022

Follow-up of #6780, #6801

Session-holding maps are accessed by multiple threads.

Even though some concurrent access version of this would perform better it should be safe to access sessions in a synchronized way.

org.springframework.util.ConcurrentReferenceHashMap could be an alternative if synchronized access is too slow.

See JENKINS-69543.

Proposed changelog entries

  • Fix thread safety in websockets handling.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change) and are in the imperative mood. Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadoc, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO") if applicable.
  • New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content-Security-Policy directives (see documentation on jenkins.io).
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

Session-holding maps are accessed by multiple threads.

Even though some concurrent access version of this would perform better
it should be safe to access sessions in a synchronized way.

org.springframework.util.ConcurrentReferenceHashMap could be an
alternative if synchronized access is too slow.
@Vlatombe Vlatombe requested review from basil and jglick September 7, 2022 09:12
@krisstern
Copy link
Member

Should I backport this ASAP for the LTS 2.361.1 release?

@NotMyFault NotMyFault added the bug For changelog: Minor bug. Will be listed after features label Sep 7, 2022
@timja
Copy link
Member

timja commented Sep 7, 2022

Should I backport this ASAP for the LTS 2.361.1 release?

Generally no it needs real world testing via the weekly line.

Unless others have evidence that this is a critical issue for the release and needs to go in ASAP

@NotMyFault
Copy link
Member

Is this intended to be a TODO for today's LTS release @Vlatombe? The release took already place, and backporting outside from weekly's aren't eligible.

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Too bad this did not make it into 2.361.1 LTS, as there is no workaround on the client side. I suppose the best we can do is get this into 2.361.2 LTS. Thanks for the PR!

@basil
Copy link
Member

basil commented Sep 7, 2022

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process. Thanks!

@basil basil added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Sep 7, 2022
@basil basil merged commit b7b5bc6 into jenkinsci:master Sep 8, 2022
krisstern pushed a commit to krisstern/jenkins that referenced this pull request Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants