
Ben,
I am using Bas van Dijk’s usb, and I am past the -threading issue by using the latest commit.
I don’t have any easy way of making comparisons between 7.6 and 7.8 productivity, but from oscilloscope activity, I can’t see any difference. The only difference I see is the thread scheduling on 7.8 for -N1 vs -N2/4.
If —sstderr gives some notion of productivity, I’ll have to do an experiment between -N1 and -N2/4. Unchartered territory for me. I’ll setup and experiment tonight.
I am not familiar with strace. I’ll fix that soon.
Mike
On Oct 29, 2014, at 10:24 AM, Ben Gamari
Michael Jones
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