You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/09/12 21:08:29 UTC

[GitHub] [maven] famod opened a new pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

famod opened a new pull request #535:
URL: https://github.com/apache/maven/pull/535


   Just like #527 but for `master`.
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [x] Each commit in the pull request should have a meaningful subject line and body.
    - [x] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [x] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [x] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [x] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] rmannibucau commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-919085508


   The concurrency is in the session (`session.getRequest().getDegreeOfConcurrency();` or something like that) so I guess it is more a matter of wrapper the project injected in mojo instead of changing maven project itself. So maven project would stay untouched and a ConcurrentMavenProject would use a thread local if getDegreeOfConcurrency() > 1.
   Had sometihng along those lines in mind but I wouldn't change MavenProject at all.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] famod commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
famod commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917904519


   My 2 cents:
   In mid or long term there should be a better solution for this and the band-aid TL should be dropped.
   But so far nobody has come up with a non-api-breaking solution to fix the initial problem. Just reverting the TL re-introduces a nasty concurrency issue, so IMO this is not a good option.
   So, since 3.8.2 is out there and introduces some regressions, let's get the two fixes for that merged and release 3.8.3 ASAP.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] rmannibucau commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917915281


   @famod so minimum is to disable the TL when concurrency = 1 which leads to 0 issues for everyone - even if build is slower. Guess it is acceptable until somebody wants to implement a ref counting or alike solution.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] rmannibucau commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917864874


   This broke 3.8.2 so would be great to invest in another working solution IMHO.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] michael-o commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917921402


   Will also test in the next couple of days and merge.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] michael-o commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917920852


   > 
   > 
   > @famod so minimum is to disable the TL when concurrency = 1 which leads to 0 issues for everyone - even if build is slower. Guess it is acceptable until somebody wants to implement a ref counting or alike solution.
   
   If we can access concurrency information at that point actually...


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] michael-o commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-919273770


   > The concurrency is in the session (`session.getRequest().getDegreeOfConcurrency();` or something like that) so I guess it is more a matter of wrapper the project injected in mojo instead of changing maven project itself. So maven project would stay untouched and a ConcurrentMavenProject would use a thread local if getDegreeOfConcurrency() > 1.
   > Had sometihng along those lines in mind but I wouldn't change MavenProject at all.
   
   This makes sense and should be evaluated in a separate 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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] rmannibucau commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
rmannibucau commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917876328


   It mainly leaks and threads it is propagated to are uncontrolled so behavior is.
   Guess a reference counting (per module) or alike solution is maybe closer to something portable, and enabling it only in concurrent builds is saner and limit the impacts a lot.


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] famod commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
famod commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-919064492


   > > @famod so minimum is to disable the TL when concurrency = 1 which leads to 0 issues for everyone - even if build is slower. Guess it is acceptable until somebody wants to implement a ref counting or alike solution.
   > 
   > If we can access concurrency information at that point actually...
   
   I don't see how, unfortunately. (not without adding new public methods to MavenProject that have to be called from..._somewhere_)


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] famod commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
famod commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917710729


   /cc @michael-o 


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] olamy commented on pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
olamy commented on pull request #535:
URL: https://github.com/apache/maven/pull/535#issuecomment-917874770


   why `InheritableThreadLocal` cannot be a good solution? what are the cons using `InheritableThreadLocal`?


-- 
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: issues-unsubscribe@maven.apache.org

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



[GitHub] [maven] asfgit closed pull request #535: [MNG-7220] Fix threadLocalArtifactsHolder leaking into cloned project

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #535:
URL: https://github.com/apache/maven/pull/535


   


-- 
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: issues-unsubscribe@maven.apache.org

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