You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Elena Semukhina (JIRA)" <ji...@apache.org> on 2007/03/09 14:28:24 UTC
[jira] Created: (HARMONY-3349) [drlvm][gc][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
[drlvm][gc][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
----------------------------------------------------------------------------------------
Key: HARMONY-3349
URL: https://issues.apache.org/jira/browse/HARMONY-3349
Project: Harmony
Issue Type: Bug
Components: DRLVM
Reporter: Elena Semukhina
Here is a test which fails in OPT mode while passes in JET.
It is the simplified gc.Finalizer test:
public class Finalizer {
static volatile boolean passed = false;
public static void main (String[] args) {
new Finalizer();
int n = 10;
while (!passed && --n >= 0) {
System.gc();
try { Thread.sleep(1000); } catch (InterruptedException e) {}
}
if (passed) {
System.out.println("PASSED");
} else {
System.out.println("FAILED");
}
}
public void finalize () {
System.out.println("finalizer is being run");
passed = true;
}
}
It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][gc][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480349 ]
Elena Semukhina commented on HARMONY-3349:
------------------------------------------
It seems that the smoke test gc.RunFinalizersOnExitTest fails in OPT because of this bug.
> [drlvm][gc][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov reassigned HARMONY-3349:
---------------------------------------
Assignee: Mikhail Fursov
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assignee: Mikhail Fursov
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov resolved HARMONY-3349.
-------------------------------------
Resolution: Fixed
Committed as r549108
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assignee: Mikhail Fursov
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505697 ]
Pavel Ozhdikhin commented on HARMONY-3349:
------------------------------------------
3. build.bat reg.test passed as well.
Please commit the patch.
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov closed HARMONY-3349.
-----------------------------------
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Assignee: Mikhail Fursov
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500036 ]
Pavel Ozhdikhin commented on HARMONY-3349:
------------------------------------------
This might be caused by a bug in the scalar replacement optimization which erroneously removed unused objects with finalizers. The problem was fixed in HARMONY-3984, need to check if reproducible with that patch.
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gregory Shimansky updated HARMONY-3349:
---------------------------------------
Summary: [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads. (was: [drlvm][gc][opt] FinalizerThread.startFinalization() does not run for finalizer threads.)
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505771 ]
Pavel Ozhdikhin commented on HARMONY-3349:
------------------------------------------
I've checked that the patch does not affect DRLVM performance in JIT server mode.
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Ozhdikhin updated HARMONY-3349:
-------------------------------------
Attachment: h3349.patch
The patch with the fix and test unexclusion attached.
Testing passed on Windows/IA32:
1. build.bat test
2. build.bat -Dtest.mode="opt,srv" smoke.test
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
> Attachments: h3349.patch
>
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][gc][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Elena Semukhina (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479587 ]
Elena Semukhina commented on HARMONY-3349:
------------------------------------------
The smoke test gc.Finalizer is excluded for OPT due to this issue.
> [drlvm][gc][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3349) [drlvm][jit][opt]
FinalizerThread.startFinalization() does not run for finalizer threads.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500055 ]
Pavel Ozhdikhin commented on HARMONY-3349:
------------------------------------------
Further investigation showed it's a DCE pass that removes creation of the instance Finalizer object as it is not used in the program. Since the object is not created, the finalizer is not called.
> [drlvm][jit][opt] FinalizerThread.startFinalization() does not run for finalizer threads.
> -----------------------------------------------------------------------------------------
>
> Key: HARMONY-3349
> URL: https://issues.apache.org/jira/browse/HARMONY-3349
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Elena Semukhina
>
> Here is a test which fails in OPT mode while passes in JET.
> It is the simplified gc.Finalizer test:
> public class Finalizer {
> static volatile boolean passed = false;
> public static void main (String[] args) {
> new Finalizer();
> int n = 10;
> while (!passed && --n >= 0) {
> System.gc();
> try { Thread.sleep(1000); } catch (InterruptedException e) {}
> }
> if (passed) {
> System.out.println("PASSED");
> } else {
> System.out.println("FAILED");
> }
> }
> public void finalize () {
> System.out.println("finalizer is being run");
> passed = true;
> }
> }
> It seems that FinalizerThread objects don't run their startFinalization() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.