[Bug 270601] [NEW] System.Posix.Resource.setResourceLimit gives "setResourceLimit: invalid argument (Invalid argument)"

Launchpad Bug Tracker 270601 at bugs.launchpad.net
Mon Sep 15 23:35:06 BST 2008


You have been subscribed to a public bug by Iain Lane (laney):

Binary package hint: ghc6

Hi,

I am importing this RC bug from Debian so that you can consider
it for Intrepid.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491909

Package: ghc6
Version: 6.8.2-5
Severity: important

Just importing this bug from upstream:

    # http://hackage.haskell.org/trac/ghc/ticket/2038

    import System.Exit              (exitWith, ExitCode(ExitSuccess))
    import System.IO                (putStrLn)
    import System.Posix.Resource

    rlimit = ResourceLimit 3

    f = do
        putStrLn "whoooooo"
        f
    main = do
        setResourceLimit ResourceCPUTime (ResourceLimits rlimit rlimit)
        r <- getResourceLimit ResourceCPUTime
        let (ResourceLimit s) = softLimit r
        let (ResourceLimit h) = hardLimit r
        putStrLn $ show s
        putStrLn $ show h
        f
        exitWith ExitSuccess

   Returns:
 
     $ strace -etrace=setrlimit ./m 
     setrlimit(RLIMIT_CPU, {rlim_cur=3, rlim_max=0}) = -1 EINVAL (Invalid
                                                                   argument)
     m: setResourceLimit: invalid argument (Invalid argument)

.. so that I can request that the patch be applied to ghc6 for Lenny. As
Eelis mentions on the haskell.org BR, this breaks geordi on x86-32.


It has been fixed on Debian by backporting the changes.

Thanks,

James

** Affects: ghc6 (Ubuntu)
     Importance: Undecided
     Assignee: Iain Lane (laney)
         Status: In Progress

** Affects: ghc6 (Debian)
     Importance: Unknown
         Status: Fix Released

-- 
System.Posix.Resource.setResourceLimit gives "setResourceLimit: invalid argument (Invalid argument)"
https://bugs.edge.launchpad.net/bugs/270601
You received this bug notification because you are a member of Ubuntu Sponsors for universe, which is a direct subscriber.



More information about the Ubuntu-universe-sponsors mailing list