-
Notifications
You must be signed in to change notification settings - Fork 772
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
Async computation hanging in lastest F# 4.1 builds #3254
Comments
@eiriktsarpalis If you want I can take care of this as well, as I'm already looking at the code and writing some tests. Even if we don't want to accept my PR as a whole we can probably cherry-pick this fix afterwards (or I can send a separate PR after the discussion)... |
Hm I can't actually reproduce this. I have
Should fsi use another |
@matthid as a general rule in this project: please split things up in very very small parts. That increases the chances to get something in in time. Bug pull requests often rot for very long time since people are afraid to merge. |
@forki Yeah I know, it's just for discussion and POC once we decide what is acceptable and what not I can split it up. Because this might mean doing things differently... |
@matthid, @eiriktsarpalis I can reproduce this with the latest master starting fsi any cpu in debug mode. |
@eiriktsarpalis I can now reproduce in a unit test :) |
Weird, but it looks like I cannot reproduce when I launch fsi from the command line, only from Visual Studio. I can't reproduce in ionide on windows, but I it happens consistently in ionide on mono. Strange... |
@eiriktsarpalis We need a version dif because it looks like this bug was introduced after the last update for the fsi on windows. |
@realvictorprm Does VF# run a different build of fsi 4.1 than the one installed in the dev tools? Running System.Reflection.Assembly.GetEntryAssembly().Location seems to indicate that VF# launches some temp copy
whereas cli and ionide give the expected path
|
@realvictorprm My linux box uses the latest fsharp OSS built from source, which seems consistent with a recent bug causing this. |
@eiriktsarpalis With the Visual F# solution you will always use the latest (nightly) version. |
@realvictorprm confirming that this reproduces with the latest master in F# OSS (commit 4f50d4f22e090a59889412f96fdefa0cc209a1c9). There's no version number as such printed in fsi other than the obvious (4.1) |
@eiriktsarpalis I realized so too 😢 Currently trying to figure out the version of fsi on my pc. I do know that the last change to the file has been made on 10th May 😄 |
@eiriktsarpalis Problem is probably here: https://github.com/Microsoft/visualfsharp/blob/master/src/fsharp/FSharp.Core/control.fs#L1560 What the cancellationToken does at this place is cancel the Task which is RETURNED by Bug was introduced here: 7dfa689 |
Btw it's a bit strange to call different overloads of |
Fixed - a huge thank you to both of you @matthid and @eiriktsarpalis |
* add another test for #3254, ported from paket. related to #3350 and fsprojects/Paket#2553 * Fix exception message
While going through the discussion in #3219 I noticed that a particular computation seems to be hanging when run in F# Interactive 4.1
cc @matthid
Repro steps
In F# Interactive 4.1
function test does execute as expected.
Expected behavior
Should fail with OperationCanceledException
Actual behavior
Hangs indefinitely
Workarounds
In compiled code, use FSharp.Core nuget package 4.1.17 (containing a version of FSharp.Core.dll 4.4.1.0 that does not contain this problem). Avoid using FSharp.Core nuget package 4.2.1 (which contains this problem).
In F# Interactive code, use a latest update to F# Interactive and your compiler tools (e.g.Visual Studio 2017 Update 3)
Related information
This only occurs in F# interactive 4.1 (32bit and 64bit builds) in both windows and mono/linux. It does not happen in console applications running FSharp.Core 4.4.1.0. I can't reproduce the issue in F# Interactive 4.0.
The text was updated successfully, but these errors were encountered: