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

On Windows test suites Network.Socket and Network.Inet.TCP test cases are hanging for ever. #2315

Open
rnjtranjan opened this issue Mar 7, 2023 · 4 comments
Assignees
Milestone

Comments

@rnjtranjan
Copy link
Collaborator

No description provided.

@rnjtranjan
Copy link
Collaborator Author

rnjtranjan commented Mar 19, 2023

In the execute mentod below in test\Streamly\Test\Network\Inet\TCP.hs
the stream returned is geting stuck after last element.
If we comment out the "Stream.finally (killThread tid)" then it works.

execute
    :: Unfold.Unfold IO PortNumber Socket
    -> PortNumber
    -> Int
    -> (Socket -> IO ())
    -> IO (Stream IO Char)
execute listener port size handler = do
    sem <- newEmptyMVar
    tid <- forkIO $ server listener port sem handler
    let lst = sender port sem
                & Stream.take size
                -- & Stream.finally (killThread tid)
    return lst

@rnjtranjan
Copy link
Collaborator Author

The main issue is with "killThread tid".
There is an issue: Cannot killThread in listen/accept on Windows threaded runtime.
https://gitlab.haskell.org/ghc/ghc/-/issues/3937

@harendra-kumar
Copy link
Member

Can we try if it works fine using non-threaded runtime?

That ghc issue is closed but the corresponding network library issue haskell/network#364 is open.

@harendra-kumar
Copy link
Member

Changed windows tests to use non-threaded runtime until the network library is fixed. When the network library is fixed we can remove that and close this issue.

@harendra-kumar harendra-kumar modified the milestones: 0.9.1, 0.11.0 Jul 27, 2023
@harendra-kumar harendra-kumar removed this from the 0.11.0 milestone Aug 17, 2023
@harendra-kumar harendra-kumar added this to the 0.12.0 milestone Jan 12, 2024
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

2 participants