You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2026/01/20 20:59:18 UTC

[PR] Errors on ScheduledThreadPoolExecutor.execute() call [accumulo]

keith-turner opened a new pull request, #6068:
URL: https://github.com/apache/accumulo/pull/6068

   ScheduledThreadPoolExecutor.execute() will silently eat uncaught exceptions.  This change makes calls to that method fail in order to prevents its use in Accumulo.  
   
   This [impl code][1] in java returns a future that is dropped on the floor.  That future object will catch any uncaught exceptions.  The javadoc for the method states ` Instead, the {@code Throwable} thrown by such a task can be obtained via {@link Future#get}.`  however that future is inaccessible so not sure how it expects that do be done.
   
   [1]: https://github.com/openjdk/jdk/blob/42439eb60c4488711f182d0d6ee5165b4972b99d/src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java#L692


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


Re: [PR] Workaround flaw in ScheduledThreadPoolExecutor.execute() [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #6068:
URL: https://github.com/apache/accumulo/pull/6068


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


Re: [PR] Errors on ScheduledThreadPoolExecutor.execute() call [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #6068:
URL: https://github.com/apache/accumulo/pull/6068#issuecomment-3774950928

   This was found while looking into apache/accumulo-classloaders#50


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


Re: [PR] Errors on ScheduledThreadPoolExecutor.execute() call [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #6068:
URL: https://github.com/apache/accumulo/pull/6068#issuecomment-3774934544

   Created this method as a draft because I need to determine if this execute method is actually called in the 2.1 code.   I ran `mvn verify -Psunny` and that passed.    Need to exclude calls to ThreadPoolExecutor.execute when searching because that is ok, trying to figure out how to do that.
   
   If I can not determine if this is called in the 2.1 code, then may change this to warn in 2.1 and then fail in 4.0.


-- 
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: notifications-unsubscribe@accumulo.apache.org

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


Re: [PR] Workaround flaw in ScheduledThreadPoolExecutor.execute() [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #6068:
URL: https://github.com/apache/accumulo/pull/6068#issuecomment-3776003032

   In 714062e worked around the flaw in the Java code instead of trying to avoid it.  Also added a test to ensure the `execute(Runnable)` methods on threadpools do push uncaught exceptions to the handler.  This new test would fail w/o the workaround changes.  Taking this out of draf w/ the change in behavior.  Did find some code in ConditionalWriter that is calling `execute()` on a scheduled executor, but not sure if its 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: notifications-unsubscribe@accumulo.apache.org

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