Wait, like ghc is live patching the dynamically linked version of gmp?  The solution to such madness is not to move away from gmp in any linked c libraries, but to burn the dirty hack at the stake.

Tim

---------- Původní zpráva ----------
Od: Axel Simon <Axel.Simon@in.tum.de>
Komu: koral <koral@mailoo.org>
Datum: 16. 5. 2014 5:32:32
Předmět: Re: [Gtk2hs-users] [webkitgtk3] Segmentation fault on HTTPS requests with multithreaded program


Problem solved:

You're using a library that uses gmp. Since ghc sets the allocation function of gmp to one that allocates on the Haskell heap, any C library will allocate its numbers also on the Haskell heap which sooner rather than later will be garbage collected. You might want to use the replacement big integer library that does not use gmp.

Cheers,
Axel

On May 15, 2014, at 4:14 PM, Axel Simon <Axel.Simon@in.tum.de> wrote:

> Hi Koral,
>
> I have trouble compiling webkit (not its Haskell binding) so I can't reproduce your problem. Can you run it in gdb and get a backtrace (bt) once it has crashed? It might be deep within the C part of the program which can give a hint as to what is wrong.
>
> Cheers,
> Axel
>
> On May 15, 2014, at 8:51 AM, koral <koral@mailoo.org> wrote:
>
>> Sorry to push you on this, but would you please care to assist, at least on possible ways to investigate the problem ?
>> I'm quite stuck on this one, got not clue on how to make things move.
>> I didn't open a GHC ticket yet as I have no proof it is related to the compiler...
>>
>> Thank you.
>>
>> *** koral <koral@mailoo.org> [2014-04-20 23:20:32 +0200] ***
>>>> I don't know if this is relevant, but a while back I found a nasty bug in
>>>> the GHC run time. It's present in at least versions 7.4.1 through 7.6.3. It
>>>> causes seg faults on some foreign calls on 32 bit Intel (i686) architecture
>>>> Linux when SELinux is present.
>>>
>>> You have me realize I didn't provide the versions of the various programs/libraries I'm using:
>>> * GHC version 7.6.3 => the problem you mentioned is supposed to be already fixed, anyway I'm not using SELinux
>>> * webkitgtk3 version 0.12.6.0
>>> * gtk3 version 0.12.5.6
>>>
>>> Do you think I should open a bug ticket for GHC, or could it be related to webkitgtk3/gtk3's code ?
>>
>> --
>> koral
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Gtk2hs-users mailing list
>> Gtk2hs-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs_______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users