You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/04/16 16:13:15 UTC

[jira] Created: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

[drlvm] crash handler sometimes deadlocks 
------------------------------------------

                 Key: HARMONY-3666
                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Linux@ia32
            Reporter: Alexey Varlamov


Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Ilya Berezhniuk commented on HARMONY-3666:
------------------------------------------

I recently investigated this problem and found no solution in current design.

I observed such deadlock when free() was called second time on same pointer.
glipc acquires lock in free() and crashes, then crash handler invokes fork() and hangs, likely trying to allocate memory or free memory. I tried to invoke crash handler after returning from signal handler, and tried to process crash in separate thread - it did not fixed deadlock.

Looks like fork() usage for getting debug information through addr2line is a wrong way, but alternative ways are too expensive.


> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm][util] crash handler sometimes deadlocks

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

Gregory Shimansky updated HARMONY-3666:
---------------------------------------

    Environment: Linux / x86  (was: Linux@ia32)

> [drlvm][util] crash handler sometimes deadlocks 
> ------------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux / x86
>            Reporter: Alexey Varlamov
>            Priority: Minor
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Alexey Varlamov updated HARMONY-3666:
-------------------------------------

    Attachment: gdb_all_bt.2.txt

Another case of hanging VM.

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm][vmcore] crash handler sometimes deadlocks

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

Gregory Shimansky commented on HARMONY-3666:
--------------------------------------------

I wrote my own test with double free, it always hangs. So I think AWT sometimes crashes for different reason.

> [drlvm][vmcore] crash handler sometimes deadlocks 
> --------------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Alexey Varlamov updated HARMONY-3666:
-------------------------------------

    Attachment: gdb_all_bt.txt

Traces of all threads of hanging VM (obtained via gdb 'thread apply all bt').

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Alexey Varlamov commented on HARMONY-3666:
------------------------------------------

Too bad :(
What ff we could check C-heap lock state before forking and possibly switch to an alternative way?

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Gregory Shimansky commented on HARMONY-3666:
--------------------------------------------

It appears that the group of functions on in glibc Linux which manage memory such as malloc, free, realloc and probably some other are using the same global lock for C heap. When some thread is executing such function and it is holding this global lock other threads cannot use these functions. It looks like fork uses malloc (or other C heap management functions) inside of its implementation, so when some thread in VM crashes and it tries to execute fork, it may dead lock with another thread that executes malloc/free.

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm][util] crash handler sometimes deadlocks

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

Alexey Varlamov updated HARMONY-3666:
-------------------------------------

    Priority: Minor  (was: Major)

Lowered priority since AWT was fixed and hangs do not appear anymore on ordinary tests

> [drlvm][util] crash handler sometimes deadlocks 
> ------------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>            Priority: Minor
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm][vmcore] crash handler sometimes deadlocks

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

Alexey Varlamov updated HARMONY-3666:
-------------------------------------

    Summary: [drlvm][vmcore] crash handler sometimes deadlocks   (was: [drlvm] crash handler sometimes deadlocks )

> [drlvm][vmcore] crash handler sometimes deadlocks 
> --------------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Gregory Shimansky commented on HARMONY-3666:
--------------------------------------------

I am not sure how to check for the locked condition of C heap lock. This mutex is internal to glibc and there is no external access to it.

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Alexey Varlamov commented on HARMONY-3666:
------------------------------------------

And the devil number in the ID is not without purpose ;)

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Commented: (HARMONY-3666) [drlvm] crash handler sometimes deadlocks

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

Alexey Varlamov commented on HARMONY-3666:
------------------------------------------

Yep, that's why I used conjunctive mood...
One thing which bothers me is why the deadlock is intermittent? I suspect that segfaults in AWT happen mostly due to double free, neverthless VM is sometimes able to handle signal properly - I even got normal output once in a while, see linked HARMONY-3664.

> [drlvm] crash handler sometimes deadlocks 
> ------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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


[jira] Updated: (HARMONY-3666) [drlvm][util] crash handler sometimes deadlocks

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

Gregory Shimansky updated HARMONY-3666:
---------------------------------------

    Summary: [drlvm][util] crash handler sometimes deadlocks   (was: [drlvm][vmcore] crash handler sometimes deadlocks )

> [drlvm][util] crash handler sometimes deadlocks 
> ------------------------------------------------
>
>                 Key: HARMONY-3666
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3666
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux@ia32
>            Reporter: Alexey Varlamov
>         Attachments: gdb_all_bt.2.txt, gdb_all_bt.txt
>
>
> Running AWT tests with release VM, ~ each 3rd run hangs during stack dump. Usually this happens if SIGSEGV happens early enough (up to 6-8 tests run), probably interfered with compilation. I did not seen hangs on debug build, probably because of different timings.
> Anyway, almost always VM just prints "SIGSEGV in VM code." and either hangs or aborts. 

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