Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Premature termination #184

Closed
eastlund opened this issue Jun 8, 2015 · 6 comments
Closed

Premature termination #184

eastlund opened this issue Jun 8, 2015 · 6 comments
Assignees

Comments

@eastlund
Copy link
Contributor

eastlund commented Jun 8, 2015

(I believe @albertnetymk is already working on a fix for this, but I'm opening an issue so that it's easier to track.)

The issue is that one of my benchmarks (Chemeneos) sometimes prematurely exits. The program sometimes terminates before it would normally exit. (might be related to #104? Notice line 170 of chameneos_redux.enc, no blocking is used in this case though. )

This problem doesn't occur using the following commit (and those before it):
[a47e15a] Merge pull request #166 from albertnetymk/trace-future-value

The code is located at https://gist.github.com/eastlund/b7ce51ac8e605ec4220b

Remember to run the program with an argument, the problem occurs a lot on my machine when using 5000000 as input argument, but this likely differs between machines.

Expected output when running ./chameneos_redux 5000000:

1 + 1 -> 1
1 + 2 -> 3
1 + 3 -> 2
2 + 1 -> 3
2 + 2 -> 2
2 + 3 -> 1
3 + 1 -> 2
3 + 2 -> 1
3 + 3 -> 3

1 2 3 
3387993  zero
3195222  zero
3416785  zero
one zero zero zero zero zero zero zero 

1 2 3 2 3 1 2 3 2 1 
997863  zero
997882  zero
1001456  zero
1000167  zero
998859  zero
1002004  zero
1000261  zero
999212  zero
1001546  zero
1000750  zero
one zero zero zero zero zero zero zero 

Some numbers will differ between each run. (this output will be changed a bit in the final version of the benchmark) The important thing is that the last "spelled" line is printed ("one zero zero zero zero zero zero zero" in this case).

Example of erroneous output:

1 + 1 -> 1
1 + 2 -> 3
1 + 3 -> 2
2 + 1 -> 3
2 + 2 -> 2
2 + 3 -> 1
3 + 1 -> 2
3 + 2 -> 1
3 + 3 -> 3

1 2 3 
3519258  zero
3499848  zero

The program doesn't always prematurely terminate at the exact same point each time, the above example is the one that was most common for me. Also note that the issue can be difficult to reproduce and it's unlikely to occur on my machine when using sizes < 10^6 (have not tested if the probability of failure scales with input size)

I think @kikofernandez previously mentioned that this issue does not appear on MacOS (confirmation needed). It does appear on Linux (Ubuntu 14.04 LTS) and FreeBSD though.

(for info about the benchmark itself: http://benchmarksgame.alioth.debian.org/u32/performance.php?test=chameneosredux)

@albertnetymk albertnetymk self-assigned this Jun 8, 2015
@albertnetymk
Copy link
Contributor

I believe it's a bug from upstream, but needs confirmation.

@kikofernandez
Copy link
Contributor

any news on this?

@albertnetymk
Copy link
Contributor

Sent my understanding to @TobiasWrigstad , but never had the chance to really discuss them.

@TobiasWrigstad
Copy link
Contributor

I vaguely recall this. Maybe this can be discussed on our next group meeting? (I am quite swamped at the moment.)

@TobiasWrigstad TobiasWrigstad added bug and removed bug labels Oct 2, 2015
@kikofernandez
Copy link
Contributor

I believe this could be related to #274

@albertnetymk
Copy link
Contributor

I don't think #184 and #274 are related. Fixed in upstream, presumably by ponylang/ponyc@750feca, and merged in development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants