Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005757OCamlOCaml runtime systempublic2012-09-07 14:472013-07-16 07:08
Reportermarkghayden 
Assigned Todoligez 
PriorityimmediateSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.00.0 
Target Version4.00.1+devFixed in Version4.00.1+dev 
Summary0005757: GC compaction bug
DescriptionThe code below crashes on Linux and MacOS within a few seconds.

I believe this the root cause of a problem I have been running into with my iPad app (www.seaiq.com). The normal symptom is a segfault in invert_pointer_at in compact.c.

The problem appears to be related to the recent fix to the compactor (PR#5389).
Steps To Reproducewhile true do ignore (String.create (Random.int 1000000)) done
TagsNo tags attached.
Attached Filespatch file icon 4.00-compaction-fix.patch [^] (7,705 bytes) 2012-09-08 20:29 [Show Content]

- Relationships
has duplicate 0006077resolvedlefessan Program received signal SIGSEGV, Segmentation fault. 

-  Notes
(0008031)
hongboz (developer)
2012-09-07 15:22

could not reproduce in the toplevel, but it did happen for binary.
Could anyone explain the difference?
(0008032)
jeffsco (reporter)
2012-09-07 17:16

I can verify that I see the same as hongboz after building 4.00.0 under OS X 10.7.4 (Lion) with Xcode 4.3.3. A compiled version (64-bit native code or bytecode) crashes within one second with a segmentation fault. Running at toplevel shows no crash after a few minutes.
(0008033)
doligez (administrator)
2012-09-07 18:40

Reproduced. If you need a workaround, disable compaction and if you get fragmentation problems try the first-fit allocation policy.
(0008036)
doligez (administrator)
2012-09-08 20:30

Here is a patch that applies cleanly to both 4.00.0 and 4.00.1+dev. I'll commit it to the trunk and the 4.00 branch after a bit more testing.
(0008037)
jeffsco (reporter)
2012-09-09 09:24

I rebuilt the compiler with the patch and ran all the tests that come with the distribution. All tests passed, including pr5757:

   370 test(s) passed
   0 test(s) failed
   0 compilation error(s)
   0 compilation warning(s)
   0 makefile error(s)

Xcode 4.3.3 under OSX 10.7.4 (Lion), 64-bit (2.6 GHz Intel Core i7)
(0008046)
doligez (administrator)
2012-09-10 12:26
edited on: 2012-09-10 12:28

Fixed in 4.00 (r 12910) and trunk (r 12912 and 12914).


- Issue History
Date Modified Username Field Change
2012-09-07 14:47 markghayden New Issue
2012-09-07 15:22 hongboz Note Added: 0008031
2012-09-07 17:16 jeffsco Note Added: 0008032
2012-09-07 18:08 frisch Target Version => 4.00.1+dev
2012-09-07 18:40 doligez Note Added: 0008033
2012-09-07 18:40 doligez Assigned To => doligez
2012-09-07 18:40 doligez Status new => confirmed
2012-09-08 20:29 doligez File Added: 4.00-compaction-fix.patch
2012-09-08 20:30 doligez Note Added: 0008036
2012-09-09 09:24 jeffsco Note Added: 0008037
2012-09-10 12:26 doligez Note Added: 0008046
2012-09-10 12:26 doligez Status confirmed => closed
2012-09-10 12:26 doligez Resolution open => fixed
2012-09-10 12:26 doligez Fixed in Version => 4.00.1+dev
2012-09-10 12:28 doligez Note Edited: 0008046 View Revisions
2013-07-16 07:08 lefessan Relationship added has duplicate 0006077


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker