GithubHelp home page GithubHelp logo

Comments (8)

ddssff avatar ddssff commented on September 22, 2024

I wonder what the limit is on macos?

from acid-state.

sternenseemann avatar sternenseemann commented on September 22, 2024
$ 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.

ddssff avatar ddssff commented on September 22, 2024

And yet...what changed? And why does this feel so familiar?

from acid-state.

sternenseemann avatar sternenseemann commented on September 22, 2024

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.

ddssff avatar ddssff commented on September 22, 2024

The limit is 1024 on ubuntu, if I set ulimit -n 256 and run the test suite it fails.

from acid-state.

ddssff avatar ddssff commented on September 22, 2024
    ━━━ 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.

stepcut avatar stepcut commented on September 22, 2024

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.

ddssff avatar ddssff commented on September 22, 2024

Increasing the limit on macos might be the easy thing.

from acid-state.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.