Skip to content

AsyncExecutor requirement failed: count cannot be decreased #1856

Description

@hvesalai

When shutting down, this exception can sometimes be seen.

Exception in thread "AsyncExecutor.default-17" java.lang.IllegalArgumentException: requirement failed: count cannot be decreased
	at scala.Predef$.require(Predef.scala:224)
	at slick.util.ManagedArrayBlockingQueue$$anonfun$decreaseInUseCount$1.apply$mcV$sp(ManagedArrayBlockingQueue.scala:54)
	at slick.util.ManagedArrayBlockingQueue$$anonfun$decreaseInUseCount$1.apply(ManagedArrayBlockingQueue.scala:53)
	at slick.util.ManagedArrayBlockingQueue$$anonfun$decreaseInUseCount$1.apply(ManagedArrayBlockingQueue.scala:53)
	at slick.util.ManagedArrayBlockingQueue.locked(ManagedArrayBlockingQueue.scala:202)
	at slick.util.ManagedArrayBlockingQueue.decreaseInUseCount(ManagedArrayBlockingQueue.scala:53)
	at slick.util.AsyncExecutor$$anon$2$$anon$1.afterExecute(AsyncExecutor.scala:128)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Activity

  1. added this to the Future fix release milestone on Mar 2, 2018
  2. added 2 commits that reference this issue on May 24, 2018
    2bbc764
    2f7ee33
  3. nsitbon commented on Jan 18, 2019

    @nsitbon

    I'm still having the same issue even with the latest version of slick (3.2.3) and number of connection = number of thread. This is really annoying because of I have another bug with my Sentry Logback appender which prevents me from dropping that kind of exception so my logs are full of this exceptions and it's really hard to see real exceptions among those.

  4. added a commit that references this issue on Jan 29, 2019
  5. lenin122 commented on Apr 8, 2022

    @lenin122

    We still have this issue with Slick 3.3.2 inside Play Framework with play-slick 5.0.0
    Exception in thread "db-5" java.lang.IllegalArgumentException: requirement failed: count cannot be decreased

    We are using rather heavy queries inside transactional block and before we get timeout exception on get connection, we see this error.

  6. nafg commented on Jun 12, 2022

    @nafg
    Member

    If you have the issue with Slick 3.4.0-M1 then please reopen this, otherwise there isn't anything to do on Slick's end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions