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

[jsscripting] Synchronize context access in logger initialization #17496

Merged

Conversation

florian-h05
Copy link
Contributor

… to avoid illegal multi-thread access

Fixes #17494.

…avoid illegal multi-thread access

Fixes openhab#17494.

Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
@florian-h05
Copy link
Contributor Author

The user who reported this issue said he can't reproduce it reliably, so he is not really able to verify the fix in time.

I have analysed the issue in the debugger and according to debugging what gets called when and if locking is active or not, this should fix the issue.

I therefore mark this as ready for review.

@florian-h05 florian-h05 marked this pull request as ready for review October 2, 2024 17:39
@florian-h05 florian-h05 requested review from lsiepel and jlaur October 2, 2024 19:20
@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Oct 2, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@lsiepel lsiepel merged commit 856d526 into openhab:main Oct 2, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Oct 2, 2024
@florian-h05 florian-h05 deleted the jsscripting-loggerinit-multithread branch October 2, 2024 21:30
@florian-h05
Copy link
Contributor Author

@lsiepel I would consider backporting this to 4.2.x.
However I think we need to backport #16970 as well or resolve conflicts manually - IMO #16970 can be safely backported.

lsiepel pushed a commit that referenced this pull request Oct 4, 2024
…7496)

* [jsscripting] Synchronize context access in logger initialisation to avoid illegal multi-thread access
Fixes #17494.

Signed-off-by: Florian Hotze <[email protected]>
@lsiepel lsiepel added the patch A PR that has been cherry-picked to a patch release branch label Oct 4, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Oct 4, 2024

Done.

joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
…enhab#17496)

* [jsscripting] Synchronize context access in logger initialisation to avoid illegal multi-thread access
Fixes openhab#17494.

Signed-off-by: Florian Hotze <[email protected]>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
…enhab#17496)

* [jsscripting] Synchronize context access in logger initialisation to avoid illegal multi-thread access
Fixes openhab#17494.

Signed-off-by: Florian Hotze <[email protected]>
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
…enhab#17496)

* [jsscripting] Synchronize context access in logger initialisation to avoid illegal multi-thread access
Fixes openhab#17494.

Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Ciprian Pascu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[jsscripting] Multi threaded access requested by thread not locked
3 participants