JVM crash reason

this is the crash log


    # 
    # An unexpected error has been detected by HotSpot Virtual Machine: 
    # 
    #  SIGSEGV (0xb) at pc=0xf7754a07, pid=20403, tid=2813246368 
    # 
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) 
    # Problematic frame: 
    # V  [libjvm.so+0x152a07] 
    # 

    ---------------  T H R E A D  --------------- 

    Current thread (0x08145b60):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=20419] 

    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000 

    Registers: 
    EAX=0x00000000, EBX=0xf7bad7f0, ECX=0x0856de60, EDX=0xa151fa0c 
    ESP=0xa7ae9df4, EBP=0xa7ae9e28, ESI=0x080f8c40, EDI=0x0856de60 
    EIP=0xf7754a07, CR2=0x00000000, EFLAGS=0x00010292 

    Top of Stack: (sp=0xa7ae9df4) 
    0xa7ae9df4:   00000000 a7ae9e28 f77549d1 0856de60 
    0xa7ae9e04:   a16445c0 00004591 00004591 00000000 
    0xa7ae9e14:   a7aea34c a151fa0c f7bad7f0 080f8c40 
    0xa7ae9e24:   0856de60 a7ae9e78 f7a533ec 0856de60 
    0xa7ae9e34:   a7aea330 080f8c40 080f8c40 a152e124 
    0xa7ae9e44:   a16445c0 0856de60 0000452c 3f7fff58 
    0xa7ae9e54:   00001983 080f8c40 00000001 00000021 
    0xa7ae9e64:   00001983 a7aea358 f7bad7f0 a7aea330 

    Instructions: (pc=0xf7754a07) 
    0xf77549f7:   85 c0 74 76 8b 7d 08 83 ec 0c 8b 47 04 8b 40 08 
    0xf7754a07:   8b 30 50 ff 56 44 83 c4 10 85 c0 74 5d 8b 55 08 

    Stack: [0xa7a6b000,0xa7aec000),  sp=0xa7ae9df4,  free space=507k 
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
    V  [libjvm.so+0x152a07] 
    V  [libjvm.so+0x4513ec] 
    V  [libjvm.so+0x450e90] 
    V  [libjvm.so+0x3d6a24] 
    V  [libjvm.so+0x1a1496] 
    V  [libjvm.so+0x19e432] 
    V  [libjvm.so+0x1474b3] 
    V  [libjvm.so+0x1a6929] 
    V  [libjvm.so+0x1a6281] 
    V  [libjvm.so+0x4c8366] 
    V  [libjvm.so+0x4c2ba3] 
    V  [libjvm.so+0x424338] 
    C  [libpthread.so.0+0x53cc] 


    Current CompileTask: 
    opto:643      xxx.xxx.xxxx.TableCopyBean.copyBatch(Ljava/lang/String;Ljava/lang/String;Ljava/util/Hashtable;Ljava/util/List;)V (1021 bytes)

Use udcli command to analyze the Instructions


    00000000f77549f7 85c0             test eax, eax  
    00000000f77549f9 7476             jz 0xf7754a71 
    00000000f77549fb 8b7d08           mov edi, [rbp+0x8]
    00000000f77549fe 83ec0c           sub esp, 0xc 
    00000000f7754a01 8b4704           mov eax, [rdi+0x4]
    00000000f7754a04 8b4008           mov eax, [rax+0x8]
    00000000f7754a07 8b30             mov esi, [rax] 
    00000000f7754a09 50               push rax 
    00000000f7754a0a ff5644           call qword [rsi+0x44]
    00000000f7754a0d 83c410           add esp, 0x10
    00000000f7754a10 85c0             test eax, eax
    00000000f7754a12 745d             jz 0xf7754a71
    00000000f7754a14 8b5508           mov edx, [rbp+0x8] 

objdump Native frames's first line:


    00152a07 PhiNode::Identity(PhaseTransform*)+0x47

JDK version : 1.5.0_16

sorry i can't understand Assembly language,can anybody can help me with it ?

Here is the java code of function copyBatch

public void copyBatch(String targetTable, String sourceTable,
        Hashtable<String, Object> conditionHt,
        List<Hashtable<String, Object>> replaceColumnValueLt)
        throws Exception {      
    ArrayList<ArrayList<Object>> paramValueList = new ArrayList<ArrayList<Object>>();

    ArrayList<String> targetColumnList = getTblColList(targetTable);
    _log.debug("[" + targetTable + "]get table columns " + targetColumnList);

    ArrayList<String> defaultColumnList = getDefTblColList(targetTable);
    _log.debug("[" + targetTable + "]get has default value columns"
            + defaultColumnList);

    List removeList = new ArrayList();
    if (!sourceTable.equals(targetTable)) {
        ArrayList<String> sourceColList = getTblColList(sourceTable);
        _log.debug("[" + sourceTable + "]get table columns "
                + sourceColList);
        for (Map map : replaceColumnValueLt) {
            for (String tCol : targetColumnList) {
                if (!sourceColList.contains(tCol)) {
                    if (!map.containsKey(tCol)) {
                        if (defaultColumnList.contains(tCol)) {
                            if (!removeList.contains(tCol))
                                removeList.add(tCol);
                        } else {
                            map.put(tCol, "");
                        }// end if
                    }// end if
                }// end if
            }// end for
        }// end for

    }

    for (int x = 0, xSize = removeList.size(); x < xSize; x++) {
        String rCol = (String) removeList.get(x);
        targetColumnList.remove(rCol);
    }

    for (Map map : replaceColumnValueLt) {
        ArrayList<Object> tmpList = new ArrayList<Object>();
        for (String column : targetColumnList) {
            if (map.containsKey(column)) {
                tmpList.add(map.get(column));
            }
        }
        paramValueList.add(tmpList);
    }

    for (ArrayList<Object> array : paramValueList) {
        Enumeration e = conditionHt.keys();
        while (e.hasMoreElements()) {
            String column = (String) e.nextElement();
            Object value = conditionHt.get(column);
            if (!(value instanceof List)) {
                array.add(conditionHt.get(column));
            }
        }
    }

    StringBuffer sql = new StringBuffer();
    sql.append("INSERT INTO " + targetTable + " (");
    for (String column : targetColumnList) {
        sql.append(column.toLowerCase() + ", ");
    }
    sql.setLength(sql.length() - 2);

    Hashtable replaceColumnValueHt = replaceColumnValueLt.get(0);

    sql.append(") SELECT ");
    for (String column : targetColumnList) {
        if (replaceColumnValueHt.containsKey(column)) {
            sql.append("?, ");
        } else {
            sql.append(column.toLowerCase() + ", ");
        }
    }
    sql.setLength(sql.length() - 2);

    sql.append(" FROM " + sourceTable + " WHERE ");
    Enumeration e = conditionHt.keys();
    while (e.hasMoreElements()) {
        String column = (String) e.nextElement();
        Object value = conditionHt.get(column);
        if (value instanceof List) {
            sql.append(column.toLowerCase() + " IN ")
                    .append(TransFormat.convertListToIN((List) value))
                    .append(" AND ");
        } else {
            sql.append(column.toLowerCase() + " = ? AND ");
        }
    }
    sql.setLength(sql.length() - 4);

    SqlBean sqlBean = new SqlBean(_conn, sql.toString(), _log);
    for (int i = 0; i < paramValueList.size(); i++) {
        ArrayList<Object> pList = paramValueList.get(i);
        for (int j = 0; j < pList.size(); j++) {
            sqlBean.addParameter(pList.get(j));
        }
        sqlBean.addBatch();
    }

    sqlBean.executeBatch();
}
链接地址: http://www.djcxy.com/p/15064.html

上一篇: 在反汇编代码中追踪调用堆栈

下一篇: JVM崩溃的原因