seanjensengrey / mosh-scheme

Automatically exported from code.google.com/p/mosh-scheme
Other
0 stars 0 forks source link

GC Warning: Finalization cycle involving XXXXX #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
mkdir "=build"
cd "=build"
../configure --enable-mosh
make -j1 bin mfasl
for n in $(seq 1 50)
do make -j1 mtest file=r6rs-parser
done

The running scripts shows a warning like following.
===> test file ../tests/test-r6rs-parser.sps with Mosh

*** testing R6RS parser
GC Warning: Finalization cycle involving 0x5843bc0

Please use labels and text to provide additional information.
- Mosh 0.2.7 RC2 with latast GC CVS head
- Linux sewashi 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 
x86_64 GNU/Linux

Original issue reported on code.google.com by hige...@gmail.com on 2 Jun 2011 at 9:27

Attachments:

GoogleCodeExporter commented 9 years ago
This can be reproduced on MacOS X 10.6 by mosh -5 src/all-tests.scm.

Defect => Enhancement. It's not a bug, just a design issue because any user 
code can introduce this.

To resolve this problem:

1) Stop using C++ GC interface, especially "gc_cleanup." There is no way to 
avoid this problem with C++ interface.
 1') Introduce additional C++ interface which allows GC_register_finalizer_no_order.
2) Do 1') for Ports. Other gc_cleanup usage may be safe, because they won't 
include any GC managed object into it. But Ports can include some Object(which 
may be GC managed) into it and can form a cyclic reference.
3) Stub out warning messages. This warning is just harmless.

Original comment by oku...@gmail.com on 4 Jun 2011 at 9:25

GoogleCodeExporter commented 9 years ago
4) Move gc_cleanup to OSCompat's File class.
5) Stop doing close() at finalizer. Enforce users to closing their opened ports.

In BoehmGC, finalizers are not guaranteed to be called (because it's 
conservative GC). So relying this feature may brake something.

I propose 5) solution.

Original comment by oku...@gmail.com on 4 Jun 2011 at 10:24