You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Berezhniuk (JIRA)" <ji...@apache.org> on 2008/01/10 19:41:34 UTC

[jira] Created: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

[drlvm][signals] Several crash handler improvements
---------------------------------------------------

                 Key: HARMONY-5379
                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
             Project: Harmony
          Issue Type: Improvement
          Components: DRLVM
         Environment: All
            Reporter: Ilya Berezhniuk


Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
The patch is in attachment.

Following features were added:

- when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
- processor registers are now printed on Linux also
- analysis of crashed address:
    - a module containing crashed address is identified
    - detected module kind: VM module / JNI library / other
    - if crash address does not belong to any module, containing memory region is identified; access information is provided
- the whole table of loaded modules is printed
- the list of threads registeret to VM is printed with crashed thread marked
- heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)

I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-5379.
----------------------------------------

    Resolution: Fixed

Final patch is applied at 611872.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>            Assignee: Gregory Shimansky
>         Attachments: H-5379.patch, H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5379:
-------------------------------------

    Attachment: H-5379.patch

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557971#action_12557971 ] 

Ilya Berezhniuk commented on HARMONY-5379:
------------------------------------------

Thanks a lot, Alexey!
I'll fix all 3 points and provide an updated patch.

(3) is simply because in the beginning these files resided in a single directory :)

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5379:
-------------------------------------

    Attachment: H-5379.patch

The updated patch fixing (2) for the case of crash in release.

In debug mode sd_initialize() is called from sd_update_modules() first.
But this occurs in VM initialization, so I think it's quite safe, although GC threads are started already.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch, H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557917#action_12557917 ] 

Alexey Varlamov commented on HARMONY-5379:
------------------------------------------

Well done Ilya, thanks for improving this area! A few observations:
1) what about renaming "port_filepath_short_name" -> "port_filepath_basename", which is more intuitive and less confusing.
2) Even if a name does not fit to a buffer, "too short buffer" message is not helpful. More reasonable to truncate the name and just add some indication of truncation, smth like "a_very_loooo...".
3) No reason to use platform suffix in source filename: stack_dump_linux.cpp / stack_dump_win.cpp if they reside in specific folders like  vmcore/src/util/linux/ .

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk closed HARMONY-5379.
------------------------------------


Thanks Gregory!
The patch is applied as expected.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>            Assignee: Gregory Shimansky
>         Attachments: H-5379.patch, H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5379:
-------------------------------------

    Attachment: H-5379.patch

The updated patch.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558324#action_12558324 ] 

Ilya Berezhniuk commented on HARMONY-5379:
------------------------------------------

Pavel, thanks for the notes!

1) I think it's not feasible to use the define in platform-specific code where width and modifiers are known. Using the define in *printf  format string requires splitting the format string, so I don't like to use this when I can avoid this.

2) I'll try to modify locking sequence in sd_print_stack() to be sure that initialization is serialized (I think it's reasonable to acquire hythread_global_lock before calling sd_initialize). I'll update the patch soon.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558207#action_12558207 ] 

Pavel Pervov commented on HARMONY-5379:
---------------------------------------

Here are some comments:
1) at the beginning you introduce W_PI_FMT. Then you use immediate string with the same value in print_state. Is it worth using define there? Well, x86 version uses 08 instead of 08ll format string, so, questionable still...
2) AFAIU sd_initialize is called lazily. The nature of local static variables can cause crash on Windows (NULL critical section used) and double lock creation on Linux.

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>         Attachments: H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5379) [drlvm][signals] Several crash handler improvements

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-5379:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm][signals] Several crash handler improvements
> ---------------------------------------------------
>
>                 Key: HARMONY-5379
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5379
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: All
>            Reporter: Ilya Berezhniuk
>            Assignee: Gregory Shimansky
>         Attachments: H-5379.patch, H-5379.patch, H-5379.patch
>
>
> Together with unifying signal handlers in HARMONY-5366, I've made some improvements in crash handler.
> The patch is in attachment.
> Following features were added:
> - when one thread is in crash handler, other threads are blocked to prevent from printing several stack traces
> - processor registers are now printed on Linux also
> - analysis of crashed address:
>     - a module containing crashed address is identified
>     - detected module kind: VM module / JNI library / other
>     - if crash address does not belong to any module, containing memory region is identified; access information is provided
> - the whole table of loaded modules is printed
> - the list of threads registeret to VM is printed with crashed thread marked
> - heap usage in crash handler was reduced to be sure that at least some kind of info will be printed (if global heap lock is not released)
> I'm also working on some new heuristics to improve native stack unwinding on x86_64, but this work is not finished yet, so I'll prove it in additional patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.