You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "arne-bdt (via GitHub)" <gi...@apache.org> on 2024/10/23 14:21:12 UTC

[PR] GH-2787: Deadlock in JenaSystem.init() [jena]

arne-bdt opened a new pull request, #2792:
URL: https://github.com/apache/jena/pull/2792

   If the setup in `JenaSystem.init()` takes longer than 5 seconds, a detailed error message is logged to `System.err` indicating a potential deadlock situation:
   
   > Timeout while waiting for `JenaSystem.init()`, possibly due to a deadlock while waiting on the class initialization monitor. Please ensure that `JenaSystem.init()` is called before working with multiple threads.
   
   While this is not a definitive solution, it should provide users with helpful guidance if they encounter this issue.
   Otherwise, the deadlock could cause significant time loss for many users due to its obscure nature and difficulty in debugging.
   
   Additionally, I have added integration tests for `JenaSystem.init()`, including the parallel execution scenario from the issue, to ensure coverage of potential concurrency issues. 
   
   GitHub issue resolved #2787
   
   I'm unsure about this PR, but it's currently the next best approach, I can think of.
   
   ----
   
    - [x] Tests are included.
    - [x] Commits have been squashed to remove intermediate development commit messages.
    - [x] Key commit messages start with the issue number (GH-xxxx)
   
   By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the [Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html).
   
   ----
   
   See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-2787: Deadlock in JenaSystem.init() [jena]

Posted by "arne-bdt (via GitHub)" <gi...@apache.org>.
arne-bdt commented on PR #2792:
URL: https://github.com/apache/jena/pull/2792#issuecomment-2435326947

   see https://github.com/apache/jena/issues/2787#issuecomment-2435110319


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-2787: Deadlock in JenaSystem.init() [jena]

Posted by "arne-bdt (via GitHub)" <gi...@apache.org>.
arne-bdt commented on PR #2792:
URL: https://github.com/apache/jena/pull/2792#issuecomment-2434908734

   I found another "solution": Added a fail-fast mechanism: now throwing an ExceptionInInitializerError when a thread attempts to enter JenaSystem.init() while another thread is in the initialization process.
   
   What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-2787: Deadlock in JenaSystem.init() [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #2792:
URL: https://github.com/apache/jena/pull/2792#issuecomment-2435081854

   I think requiring single threaded initialization will break existing usage. Until we agree that it is the only option, I don't think we should go that way.
   
   Discussion on the issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-2787: Deadlock in JenaSystem.init() [jena]

Posted by "arne-bdt (via GitHub)" <gi...@apache.org>.
arne-bdt closed pull request #2792: GH-2787: Deadlock in JenaSystem.init()
URL: https://github.com/apache/jena/pull/2792


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


Re: [PR] GH-2787: Deadlock in JenaSystem.init() [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #2792:
URL: https://github.com/apache/jena/pull/2792#issuecomment-2433498882

   > I'm unsure about this PR,
   
   I set this to draft - hope you don't mind.
   (This comment https://github.com/apache/jena/issues/2787#issuecomment-2431921446 was after the PR?)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org