kstyrc / embedded-redis

Redis embedded server for Java integration testing
840 stars 368 forks source link

java.io.IOException: error=26, Text file busy #85

Closed francisdb closed 7 years ago

francisdb commented 7 years ago

We are using embeddedredis in our (parallel) tests and we recently start seeing these errors on our CI machine.

I guess some file handle is not closed in time?

redis.embedded.exceptions.EmbeddedRedisException: Failed to start Redis instance
Stacktrace

sbt.ForkMain$ForkError: redis.embedded.exceptions.EmbeddedRedisException: Failed to start Redis instance
    at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:42)
    at redis.embedded.RedisServer.start(RedisServer.java:9)
    at io.waylay.cache.redis.WithEmbeddedRedis.setUp(WithEmbeddedRedis.scala:51)
    at io.waylay.cache.redis.WithEmbeddedRedis.around(WithEmbeddedRedis.scala:70)
    at io.waylay.cache.redis.WithEmbeddedRedis.delayedInit(WithEmbeddedRedis.scala:35)
    at io.waylay.cache.redis.RedisCacheSpec$$anonfun$1$$anonfun$apply$3$$anon$3.<init>(RedisCacheSpec.scala:23)
    at io.waylay.cache.redis.RedisCacheSpec$$anonfun$1$$anonfun$apply$3.apply(RedisCacheSpec.scala:23)
    at io.waylay.cache.redis.RedisCacheSpec$$anonfun$1$$anonfun$apply$3.apply(RedisCacheSpec.scala:23)
Caused by: sbt.ForkMain$ForkError: java.io.IOException: Cannot run program "/tmp/1494421531552-0/redis-server-2.8.19" (in directory "/tmp/1494421531552-0"): error=26, Text file busy
    at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:37)
    ... 7 more
Caused by: sbt.ForkMain$ForkError: java.io.IOException: error=26, Text file busy
    ... 8 more
francisdb commented 7 years ago

This is probably caused by https://bugs.openjdk.java.net/browse/JDK-8068370

francisdb commented 7 years ago

And another similar issue: https://github.com/joelittlejohn/embedmongo-maven-plugin/issues/28

francisdb commented 7 years ago

adding sequential in our specs2 tests helped as workaround, closing this as it's probably not related to embedded-redis