Thread behavior in 7.8.3

John Lato jwlato at gmail.com
Wed Oct 29 23:12:16 UTC 2014


By any chance do the delays get shorter if you run your program with `+RTS
-C0.005` ?  If so, I suspect you're having a problem very similar to one
that we had with ghc-7.8 (7.6 too, but it's worse on ghc-7.8 for some
reason), involving possible misbehavior of the thread scheduler.

On Wed, Oct 29, 2014 at 2:18 PM, Michael Jones <mike at proclivis.com> wrote:

> I have a general question about thread behavior in 7.8.3 vs 7.6.X
>
> I moved from 7.6 to 7.8 and my application behaves very differently. I
> have three threads, an application thread that plots data with wxhaskell or
> sends it over a network (depends on settings), a thread doing usb bulk
> writes, and a thread doing usb bulk reads. Data is moved around with TChan,
> and TVar is used for coordination.
>
> When the application was compiled with 7.6, my stream of usb traffic was
> smooth. With 7.8, there are lots of delays where nothing seems to be
> running. These delays are up to 40ms, whereas with 7.6 delays were a 1ms or
> so.
>
> When I add -N2 or -N4, the 7.8 program runs fine. But on 7.6 it runs fine
> without with -N2/4.
>
> The program is compiled -O2 with profiling. The -N2/4 version uses more
> memory,  but in both cases with 7.8 and with 7.6 there is no space leak.
>
> I tired to compile and use -ls so I could take a look with threadscope,
> but the application hangs and writes no data to the file. The CPU fans run
> wild like it is in an infinite loop. It at least pops an unpainted
> wxhaskell window, so it got partially running.
>
> One of my libraries uses option -fsimpl-tick-factor=200 to get around the
> compiler.
>
> What do I need to know about changes to threading and event logging
> between 7.6 and 7.8? Is there some general documentation somewhere that
> might help?
>
> I am on Ubuntu 14.04 LTS. I downloaded the 7.8 tool chain tar ball and
> installed myself, after removing 7.6 with apt-get.
>
> Any hints appreciated.
>
> Mike
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20141030/7a429a3a/attachment-0001.html>


More information about the Glasgow-haskell-users mailing list