Michael Jones <m...@proclivis.com> writes: > 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. > Are you using Bas van Dijk's `usb` library by any chance? If so, you should be aware of this [1] issue.
> 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. > Have you looked at the RTS's output when run with `+RTS -sstderr`? Is productivity any different between the two tests? > 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. > Oh dear, this doesn't sound good at all. Have you tried getting a backtrace out of gdb? Usually this isn't terribly useful but in this case since the event log is involved it might be getting stuck in the RTS which should give a useful backtrace. If not, perhaps strace will give some clues as to what is happening (you'll probably want to hide SIGVTALM to improve signal/noise)? Cheers, - Ben [1] https://github.com/basvandijk/usb/issues/7
pgpGwIoqAmMbI.pgp
Description: PGP signature
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users