Ticket #2047 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

ghc compiled program crashes with segfault when using -M and/or -c

Reported by: mte Owned by: igloo
Priority: high Milestone: 6.8.3
Component: Runtime System Version: 6.8.2
Keywords: gc segfault Cc: orielmaxime@…
Operating System: Windows Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When running my program with limited heap size (-H128m) and/or using the compacting procedure (-c) in garbage collection, the program crashes with the following message:

Segmentation fault/access violation in generated code

It seems that the segfault occurs the first time the garbage collector runs as the log file generated with -S contains the headline only.

The program runs fine without the -M and -c options.

This problem is critical from my point of view as I cannot control what kind of data the customer will supply to the algorithm and I would the prefer the algorithm (then deployed as a DLL) to gracefully report a heap overflow instead of eating all the customer's terminal server's memory.

Let me know how I can help to fix this bug.

As the source code is proprietary, I cannot attach it here.

Change History

Changed 5 years ago by simonmar

  • difficulty set to Unknown
  • milestone set to 6.8.3

This certainly sounds like a bug in the compacting GC. Without means to reproduce it though, it's impossible to diagnose.

If you could reproduce the error in non-proprietary code, or somehow arrange to give me the code with a no-redistribution license, that would help a lot.

If you need to use -M without the compacting GC, the workaround is to add -c100, which should disable the automatic compacting GC threshold.

Changed 5 years ago by mte

Simon, I need a valid email address of yours. I tried to send the source code to simonmar at research.microsoft.com but the delivery failed.

Changed 5 years ago by simonmar

You want simonmar@….

Changed 5 years ago by guest

  • cc orielmaxime@… added

Simon - I also have seen this behavior. If you are still looking for code, email me at orielmaxime@… and I can provide. I've added myself to the cc.

This bug is sad for me because I often run programs that solve puzzles, and need to run with a lot of memory.

Changed 5 years ago by simonmar

  • priority changed from normal to high

Changed 5 years ago by simonmar

  • owner set to simonmar

I'm validating a fix for this

Changed 5 years ago by simonmar

  • owner changed from simonmar to igloo
  • type changed from bug to merge

To merge:

Tue Feb  5 02:14:25 PST 2008  Simon Marlow <simonmar@microsoft.com>
  * FIX #2047: Windows (and older Unixes): align info tables to 4 bytes, not 2

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Merged

Note: See TracTickets for help on using tickets.