Re: Increased memory usage with GHC 7.10.1

2015-04-02 Thread Michael Jones
I have run out of memory before when compiling on small machines using GHC 7.8, where small machines have 4GB RAM, no swap, say small Dual Core Atom, almost embedded design. That forced me to compile on a laptop and mount file systems to run it. But since Ubuntu runs well on a NUC, it is nice

Re: Thread behavior in 7.8.3

2015-01-21 Thread Michael Jones
Bas, I have not upgraded, mainly because my problems manifest without enabling USB. However, I think I can upgrade in a few days and move forward. Are you using ghc 7.8.10 these days or something older? Mike On Jan 21, 2015, at 12:52 PM, Bas van Dijk v.dijk@gmail.com wrote: Hi Michael,

Re: Thread behavior in 7.8.3

2015-01-21 Thread Michael Jones
Bas, I checked my cabal file and I was already using 1.3.0.0. Mike On Jan 21, 2015, at 12:52 PM, Bas van Dijk v.dijk@gmail.com wrote: Hi Michael, Are you already using usb-1.3.0.0? If not, could you upgrade and test again? That release fixed the deadlock that Ben and Carter where

Re: Thread behavior in 7.8.3

2015-01-21 Thread Michael Jones
. Granted, I would prefer Haskell, but it is an enormous task to make a GUI work on all platforms. Unlike non-GUI libraries, it is not “just works”, at least it wasn’t for me. Mike On Jan 21, 2015, at 3:18 AM, Simon Marlow marlo...@gmail.com wrote: On 21/01/2015 03:43, Michael Jones wrote: Simon

Re: Thread behavior in 7.8.3

2015-01-20 Thread Michael Jones
transactions) This loops when the contents of the TVar is False. Cheers, Simon On 18/01/2015 01:15, Michael Jones wrote: I have narrowed down the problem a bit. It turns out that many times if I run the program and wait long enough, it will start. Given an event log, it may take from 1000

Re: Thread behavior in 7.8.3

2015-01-20 Thread Michael Jones
unsafe Either of these would block the other threads. ThreadScope together with some traceEventIO calls might help you identify the culprit. Cheers, Simon On 20/01/2015 15:49, Michael Jones wrote: Simon, This was fixed some time back. I combed the code base looking for other busy

Re: Thread behavior in 7.8.3

2015-01-18 Thread Michael Jones
, 2015, at 11:00 PM, Donn Cave d...@avvanta.com wrote: Quoth Michael Jones m...@proclivis.com, ... 5) What does -V0 do that makes a problem program run? Well, there's that SIGVTALRM barrage, you may remember we went over that mid-August. I expect there are other effects. Donn

Re: Thread behavior in 7.8.3

2015-01-17 Thread Michael Jones
this way. The scheduler should have some built in notion of fairness. On Jan 12, 2015, at 11:02 PM, Michael Jones m...@proclivis.com wrote: Sorry I am reviving an old problem, but it has resurfaced, such that one system behaves different than another. Using -C0.001 solved problems on a Mac + VM

Re: Thread behavior in 7.8.3

2015-01-13 Thread Michael Jones
, 2015, at 1:02 PM, Ben Gamari bgamari.f...@gmail.com wrote: Michael Jones m...@proclivis.com writes: Sorry I am reviving an old problem, but it has resurfaced, such that one system behaves different than another. [snip] 1) Does ghc 7.8.4 have any improvements that might pertain

Re: Thread behavior in 7.8.3

2015-01-12 Thread Michael Jones
ideas how to track down the problem when changing conditions (compiler or runtime options) affects behavior? 4) Are there other options besides -V and -C for the runtime that might apply? 5) What does -V0 do that makes a problem program run? Mike On Oct 29, 2014, at 6:02 PM, Michael Jones m

Re: GHC 7.8.3 thread hang

2014-11-12 Thread Michael Jones
to be doing the evaluating. This is some evidence that Gregory's theory is correct and your encode function loops somewhere. On Wed Nov 12 2014 at 11:25:30 AM Michael Jones m...@proclivis.com wrote: Gregory, The options in the 7.8.3 user guide says in the -Msize option that by default

Re: GHC 7.8.3 thread hang

2014-11-11 Thread Michael Jones
, 2014 at 2:11 AM, Michael Jones m...@proclivis.com wrote: I am trying to debug a lockup problem (and need help with debugging technique), where hang means a thread stops at a known place during evaluation, and other threads continue. The code near the problem is like: ec - return

Re: GHC 7.8.3 thread hang

2014-11-11 Thread Michael Jones
...@gregorycollins.net wrote: On Mon, Nov 10, 2014 at 11:11 PM, Michael Jones m...@proclivis.com wrote: ec - return $ encode command traceEventIO $ sendCommand: encoded l - ec `seq` return $ BSL.length ec Your encode function probably loops on some inputs. When you call return $ foo

Re: GHC 7.8.3 thread hang

2014-11-11 Thread Michael Jones
Those are all over the log even when it runs properly. So I assume the runtime is resizing the heap or something. Perhaps someone knows if this is normal or not. Mike On Nov 11, 2014, at 12:24 PM, Brandon Allbery allber...@gmail.com wrote: On Tue, Nov 11, 2014 at 2:11 AM, Michael Jones m

Re: GHC 7.8.3 thread hang

2014-11-11 Thread Michael Jones
, 2014, at 4:01 PM, Gregory Collins g...@gregorycollins.net wrote: On Tue, Nov 11, 2014 at 2:06 PM, Michael Jones m...@proclivis.com wrote: Those are all over the log even when it runs properly. So I assume the runtime is resizing the heap or something. No, it means you're exhausting the heap

GHC 7.8.3 thread hang

2014-11-10 Thread Michael Jones
I am trying to debug a lockup problem (and need help with debugging technique), where hang means a thread stops at a known place during evaluation, and other threads continue. The code near the problem is like: ec - return $ encode command l - return $ BSL.length ec ss -

Re: Thread behavior in 7.8.3

2014-10-30 Thread Michael Jones
29, 2014 at 2:18 PM, Michael Jones m...@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

Thread behavior in 7.8.3

2014-10-29 Thread Michael Jones
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

Re: Thread behavior in 7.8.3

2014-10-29 Thread Michael Jones
bgamari.f...@gmail.com wrote: 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

Re: Thread behavior in 7.8.3

2014-10-29 Thread Michael Jones
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 m

Re: Odd FFI behavior

2014-08-14 Thread Michael Jones
Donn, I was able to duplicate my problem in C using SIGVTALRM. Can someone explain the impact of using -V0 ? What does it do to performance, etc? Mike Sent from my iPad On Aug 13, 2014, at 9:56 AM, Donn Cave d...@avvanta.com wrote: [ ... re -V0 ] Thanks, this solved the problem. I

Re: Odd FFI behavior

2014-08-13 Thread Michael Jones
Donn, Thanks, this solved the problem. I would like to know more about what the signals are doing, and what am I giving up by disabling them? My hope is I can then go back to the dll expert and ask why this is causing their library a problem and try to see if they can solve the problem from

Odd FFI behavior

2014-08-12 Thread Michael Jones
I have some strange behavior with GHC 7.6.3 on Ubuntu 14 TLS when using FFI and I am looking for some ideas on what could be going on. Fundamentally, adding wait calls (delays coded in the C) changes the behavior of the C, in that returned status codes have proper values when there are delays,

Re: Cross compiling for Cortex A9

2014-08-05 Thread Michael Jones
? Mike On Aug 4, 2014, at 8:23 AM, Michael Jones m...@proclivis.com wrote: To be complete, there is an old link on compiling for arm, and it recommends this build process: $ chmod ugo+rx build-ghc-arm.sh Edit build-ghc-arm.sh to fix EOF $ ./build-ghc-arm.sh -j4 $ make test $ sudo make

Re: Cross compiling for Cortex A9

2014-08-04 Thread Michael Jones
and debug it with a C/C++ debugger? I am able to debug other C/C++ programs on the target device, so if I had a C/C++ program, code, etc, I could run and debug it. Mike On Aug 2, 2014, at 4:04 PM, Michael Jones m...@proclivis.com wrote: Karel, My configure hack is now limited to two hacks on GHC

Re: Cross compiling for Cortex A9

2014-08-02 Thread Michael Jones
, CAF, 0x76c02980) stg_ap_v_ret... IND_STATIC(0x76c0360c) stg_ap_v_ret... FUN/1(0x59088, CAF, 0x76c02980) cap 0: thread 1 stopped (stack overflow) On Aug 2, 2014, at 12:07 PM, Karel Gardas karel.gar...@centrum.cz wrote: On 08/ 2/14 07:04 AM, Michael Jones wrote: ,(target arch,ArchARM {armISA

Re: Cross compiling for Cortex A9

2014-08-01 Thread Michael Jones
AM, Michael Jones wrote: I have some progress, and a problem. First, note I am using the 7.8.3 tar ball, for this discussion here. If you read through, you will see a request for help at the end. It looks like the cross compilation is trying to build stage2 when it shouldn’t. In order

Re: Cross compiling for Cortex A9

2014-08-01 Thread Michael Jones
:23 PM, Michael Jones m...@proclivis.com wrote: Karel, On CFLAGS.. When the cross compiler is compiled, does it use gcc, or is gcc only used to compile libraries with the stage-1 compiler? Because if gcc is used for both, I would need different flags for each, and I don't know how

Re: Cross compiling for Cortex A9

2014-08-01 Thread Michael Jones
) ,(Support parallel --make,YES) ,(Dynamic by default,NO) ,(GHC Dynamic,NO) ,(Leading underscore,NO) ,(Debug on,False) ,(LibDir,/home/mike/ghc-7.8.3/inplace/lib) ,(Global Package DB,/home/mike/ghc-7.8.3/inplace/lib/package.conf.d) ] On Aug 1, 2014, at 8:02 PM, Michael Jones m...@proclivis.com wrote

Re: Cross compiling for Cortex A9

2014-07-24 Thread Michael Jones
karel.gar...@centrum.cz wrote: On 07/14/14 04:58 PM, Michael Jones wrote: Karel, Thanks. This helps. If I understand, you have Linux running on a Panda, and on that Panda system you have gcc, and you compile GHC on the Panda itself, rather than build a cross compiler. I can see

Re: Cross compiling for Cortex A9

2014-07-11 Thread Michael Jones
target to update your OS to get to what I do have here: ARMv7+VFPv3/NEON+ABI HARD. BTW: Another issue may be that GHC misconfigures on your platform and they you will need to tell us more about your target OS... Cheers, Karel On 07/ 8/14 07:51 AM, Michael Jones wrote: I am pasting both

Re: Cross compiling for Cortex A9

2014-07-11 Thread Michael Jones
Cortex-A9 target to update your OS to get to what I do have here: ARMv7+VFPv3/NEON+ABI HARD. BTW: Another issue may be that GHC misconfigures on your platform and they you will need to tell us more about your target OS... Cheers, Karel On 07/ 8/14 07:51 AM, Michael Jones wrote: I am

Cross compiling for Cortex A9

2014-07-07 Thread Michael Jones
I am having problems building a GHC cross compiler for Linux (Yocto on a Wandboard) running on a Cortex A9, and need some advice on how to debug it. The cross compiler produces an executable that runs on the Target, but fails to print. So I need help coming up with a strategy to narrow down the

Re: Cross compiling for Cortex A9

2014-07-07 Thread Michael Jones
-linux-gnueabi-ghc-7.8.2/package.conf.d) ] On Jul 7, 2014, at 10:42 PM, Carter Schonwald carter.schonw...@gmail.com wrote: could you share the output of ghc --info? On Tue, Jul 8, 2014 at 12:10 AM, Michael Jones m...@proclivis.com wrote: I am having problems building a GHC cross