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

Fatal Exception: java.util.concurrent.RejectedExecutionException #65

Open
EzequielAdrianM opened this issue May 30, 2023 · 0 comments
Open

Comments

@EzequielAdrianM
Copy link

Hello, this is a very weird error that happened just once after thousands of tests being done, and cannot replicate, but here is the stacktrace:

Fatal Exception: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@398a2b3[Not completed] rejected from java.util.concurrent.ThreadPoolExecutor@3020070[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
       at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2072)
       at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:834)
       at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1364)
       at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
       at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:671)
       at com.lyft.kronos.internal.ntp.SntpServiceImpl.syncInBackground(SntpService.kt:119)
       at com.lyft.kronos.internal.ntp.SntpServiceImpl.currentTime(SntpService.kt:109)
       at com.lyft.kronos.internal.KronosClockImpl.getCurrentTime(KronosClockImpl.kt:19)
       at com.lyft.kronos.KronosClock$DefaultImpls.getCurrentTimeMs(KronosClock.java:39)
       at com.lyft.kronos.internal.KronosClockImpl.getCurrentTimeMs(KronosClockImpl.kt:8)

It points directly to SntpService.kt:

override fun syncInBackground() {
        ensureServiceIsRunning()

        if (state.get() != State.SYNCING) {
            executor.submit { sync() }
        }
    }

Maybe should try/catch for RejectedExecutionException? Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant