[Swift-devel] Swift crashing for runs with 1M calls
Michael Wilde
wilde at mcs.anl.gov
Fri Mar 1 14:01:30 CST 2013
Hurray!!!! Nice work, Yadu.
I think you need to do a few things here:
- put in some (perhaps periodic) logging to see how far fib progressed
- try a non-recursive example: fib() is not reflective of most swift scripts and excessively challenges the call stack
- learn how to control Java heap and stack limits (the former is documented *I think* in the User Guide and if not needs to be, and should be, in the release notes
Others may have some more specific guidance for you.
- Mike
----- Original Message -----
> From: "Yadu Nand" <yadudoc1729 at gmail.com>
> To: "swift-devel" <swift-devel at ci.uchicago.edu>
> Sent: Friday, March 1, 2013 1:23:27 PM
> Subject: [Swift-devel] Swift crashing for runs with 1M calls
>
>
> Hi,
>
>
> I'm trying to see swift behavior with some stress on and I see
> crashes at close to 1M calls/loops.
>
>
> Here's one such case ( x_func.swift code is here ->
> https://github.com/yadudoc/swift-basics/blob/master/stress/x_func.swift
> ):
> Test run with 0.94 ( corei5 with 8Gb ram)
>
>
> yadu at Miranda:~/src/swift-basics/stress$ time swift x_func.swift
> -loops=1000000
> Swift 0.94RC3 swift-r6268 cog-r3605
>
>
> RunID: 20130302-0019-l2alv5d2
> Progress: time: Sat, 02 Mar 2013 00:19:38 +0530
> Fibonacci[2] = 1
> No events in 10s.
> Progress: time: Sat, 02 Mar 2013 00:20:08 +0530
> Progress: time: Sat, 02 Mar 2013 00:20:38 +0530
> Progress: time: Sat, 02 Mar 2013 00:21:08 +0530
> Progress: time: Sat, 02 Mar 2013 00:21:38 +0530
> Progress: time: Sat, 02 Mar 2013 00:22:08 +0530
> Progress: time: Sat, 02 Mar 2013 00:22:38 +0530
> Progress: time: Sat, 02 Mar 2013 00:23:08 +0530
> Finding dependency loops...Exception in thread "Hang checker"
> java.lang.StackOverflowError
> at java.util.HashMap.put(HashMap.java:484)
> at java.util.HashSet.add(HashSet.java:217)
> at org.griphyn.vdl.karajan.HangChecker.findLoop(HangChecker.java:299)
> at org.griphyn.vdl.karajan.HangChecker.findLoop(HangChecker.java:303)
>
>
> Earlier I had posted about iterate failing to compile on 0.94. I ran
> a few tests on 0.93
> (code :
> https://github.com/yadudoc/swift-basics/blob/master/stress/x_iterate.swift
> ) with
> results:
> 100K loops -> 17s real
> 1M loops -> No response for a while, then java.lang.OutOfMemory
> exception thrown.
>
>
> I'm finding it difficult to keep stats so, I'm placing the stats and
> as much run info as
> possible in comments in the scripts themselves. All the scripts are
> here ->
> https://github.com/yadudoc/swift-basics/tree/master/stress
>
>
>
>
> -Yadu
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
More information about the Swift-devel
mailing list