Comments (8)
I wonder what the limit is on macos?
from acid-state.
$ launchctl limit maxfiles
maxfiles 256 unlimited
So seems the soft fd limit is quite low by default (256 on my system) which sounds plausible that you hit in the test suite.
from acid-state.
And yet...what changed? And why does this feel so familiar?
from acid-state.
I'm not sure what you are referring to. For what it's worth acid-state
has been failing like this on darwin since May at least. Before that I have no data, sadly.
from acid-state.
The limit is 1024 on ubuntu, if I set ulimit -n 256
and run the test suite it fails.
from acid-state.
━━━ Exception (IOException) ━━━
state/KeyValueSequentialTest/open.lock: openFd: resource exhausted (Too many open files)
This failure can be reproduced by running:
> recheck (Size 42) (Seed 16729543741219666746 3391217788386191459) prop_sequential
✗ prop_parallel failed at test/Data/Acid/StateMachineTest.hs:493:15
after 17 tests and 5 shrinks.
┏━━ test/Data/Acid/StateMachineTest.hs ━━━
486 ┃ acidStateParallelProperty :: AcidStateInterface s -> Gen s -> Range Int -> Range Int -> [Command Gen (TestT IO) (Model s)] -> Property
487 ┃ acidStateParallelProperty i gen_initial_state prefix_range parallel_range commands = property $ do
488 ┃ actions <- forAll $ Gen.parallel prefix_range parallel_range StateAbsent $
489 ┃ [ open i gen_initial_state
490 ┃ , checkpoint i
491 ┃ ] ++ commands ++ commands
┃ │ ━━━ Prefix ━━━
┃ │
┃ │ ━━━ Branch 1 ━━━
┃ │
┃ │ ━━━ Branch 2 ━━━
┃ │ Var 0 = Open (KeyValue (fromList []))
492 ┃ test $ do liftIO $ resetState i
493 ┃ executeParallel StateAbsent actions
┃ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
┃ │ ━━━ Exception (IOException) ━━━
┃ │ state/KeyValueParallelTest: getDirectoryContents:openDirStream: resource exhausted (Too many open files)
This failure can be reproduced by running:
> recheck (Size 16) (Seed 5671783275542411754 2683756560449981757) prop_parallel
from acid-state.
I think the problem is that in this function,
https://github.com/acid-state/acid-state/blob/master/test/Data/Acid/StateMachineTest.hs#L486
it calls 'open' to open an acid-state test DB, but never calls close. So there is a file handle leak and that exceeds the limits on OS X. However, the way the 'parallel' function works in Hedgehog -- you can provide a prefix list of commands, but not a postfix list of commands. So it is not obvious how to close the handles.
Since this is just a test suite, the file handle leaks are perhaps ok, aside from the failure on OS X. Perhaps there is a way to limit the number of tests run to avoid hitting the limit on OS X?
from acid-state.
Increasing the limit on macos might be the easy thing.
from acid-state.
Related Issues (20)
- Get size of acid-state? HOT 3
- Failed to build acid-state-0.15.1 HOT 8
- acid-state fails to build with GHC 8.8.1 HOT 1
- Changelog entry for 0.16 is missing HOT 1
- build fails on ghc 9.0.1 HOT 1
- Hackage release needed for GHC 9.0.2 support HOT 2
- Benchmark `loading-benchmark` fails to build with GHC 7.10 HOT 3
- GHC versions covered by AppVeyor CI HOT 3
- acid-state on cluster HOT 1
- Haddocks for Data.Acid.Memory.Pure.AcidState are misleading HOT 1
- Database seems empty after ctrl+c HOT 4
- Build failures with mtl-2.3
- Support GHC 9.4 HOT 1
- README: possibly outdated irc link
- Build failure with unix-2.8 (GHC 9.6)
- Support GHC 9.6
- Build failure with template-haskell-2.21 (GHC 9.8)
- Benchmarks fail to build on GHC 9.8 due to `system-filepath`
- Unnecessary use of strict bytestrings in Data.Acid.Log HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acid-state.