cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: BAD INDEX after DELETE from... using DBD::MaxDB

Former Member
0 Kudos

Hi,

I have a problem regarding one particular index (simple foreign key index) that is being marked BAD repeatedly. I've posted a similar question some time ago:

In the meantime we have migrated to a new hardware, installed the latest 7.6 Version (7.6.03.07 at the time) migrated the complete data using the loader (not using database dumps) but still the problem remains.

We are using Perl via the DBD::MaxDB module to insert, undate and delete data in a 24/7 operation. Currently we are putting a task into operation that will clean out old entries using simple stament like:

DELETE FROM table WHERE ID = xyz

Some of these statements result in the following error:

DBD::MaxDB::st execute failed: POS(1) System error: BD Primkey from inv in primtree not found

After that a foreign key index on that table is marked as BAD.

This is what the KNLDIAGERR says:

[...]
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 51080 SYSERROR -9049 BD Primkey from inv in primtree no
2008-12-10 14:04:35  3831 ERR 20011 MOVECODE Bad parameter: source size [8096] dest size [8192], source 
        addr [0X2AAADF5B5440]+1, dest addr [0X2AAABC9AFE94]+1, -
2008-12-10 14:04:35  3831 ERR 20011 MOVECODE 28623 bytes to copy
2008-12-10 14:04:35  3831 ERR 53250 INDEX    Bad Index 1240810 (Root)
2008-12-10 14:04:35  3831 ERR 53250 INDEX    Reason "System error: Move error"
2008-12-10 14:04:35  3831 ERR 20011 MOVECODE Bad parameter: source size [8096] dest size [8192], source 
        addr [0X2AAADF5B5440]+1, dest addr [0X2AAABC9AFE94]+1, -
2008-12-10 14:04:35  3831 ERR 20011 MOVECODE 28623 bytes to copy
2008-12-10 14:04:35  3831 ERR 20013 MOVECODE  +   Module vbd520.cpp call index 5

Help will be greatly appreciated. Rebuildung the index take ~20 minutes!

Thanks in advance,

Arne

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

By the way: the table is not clustered...

Arne

Former Member
0 Kudos

Hi Lars,

thanks for the info.

There was no stack trace, just the error I posted. However, today there was another error leading to a stack back trace (is attached). I had to drop and create the index again. I am not 100% sure, but it could be that the error ocurred during the creating of the index. However, the server did not crash and there was no noticable sign of the error. I just noticed the stack-trace "by chance". Is there a relation between the primkey error from yesterday and the stack back trace that occured today?

Is there a chance, that the database has become inconsistent? Would the upgrade still be advisable?

regards,

Arne

2008-12-11 10:32:52  3823 ERR 20021 Data     Requested permanent data page -1 of root -1 is greater than the upper limit of 2024768.
2008-12-11 10:32:52  3823 ERR 11599 BTRACE   ----> Emergency Stack Back Trace <----
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (0):0xeb8cf5
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (1):0xeb8d59
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (2):0xeb8ea2
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (3):0xeb8ed7
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (4):0x9acd91
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (5):0x9b02c2
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (6):0xa1406d
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (7):0xa1d6c8
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (8):0xa1dd28
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (9):0x98faee
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (10):0x9550d3
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (11):0x955e09
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (12):0xb01e50
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (13):0xb79905
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (14):0xb6e843
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (15):0xb7366a
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (16):0xb760b5
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (17):0xa6a13f
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (18):0xdc7eea
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (19):0xdc9204
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (20):0xe52b38
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (21):0xf028dc
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   (22):0x2af435227eb0
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   ----> Module List <----
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |.text Start       |.text End         | Module File Name
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x0000000000400000|0x00000000010d3000| /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002aaaf613d000|0x00002aaaf6347000| /opt/sdb/7603/lib/liboms.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434968000|0x00002af434983000| /lib64/ld-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434a84000|0x00002af434a96000| /lib64/libpthread-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434b9b000|0x00002af434b9d000| /lib64/libdl-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434c9f000|0x00002af434ca7000| /lib64/librt-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434da9000|0x00002af434e6c000| /usr/lib64/libstdc++.so.5.0.7
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af434f85000|0x00002af434fd9000| /lib64/libm-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af4350da000|0x00002af4350e7000| /lib64/libgcc_s.so.1
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af4351e8000|0x00002af43530f000| /lib64/libc-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   |0x00002af43540f000|0x00002af435412000| /lib64/libc-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   ----> Symbolic Stack Back Trace <----
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      0: 0x0000000000eb838d eo670_UnixTraceStack +0x01ad
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      1: 0x0000000000eb8d59 eo670_CTraceContextStackOCB +0x0009
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      2: 0x0000000000eb8ea2 eo670_CTraceStackOCB +0x0032
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      3: 0x0000000000eb8ed7 eo670_CTraceStack +0x0017
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      4: 0x00000000009acd91 _Z26bd13_IllegalPageNoHandlingRsRK12tgg00_FileIdi10tsp00_EnumI23tgg00_RecoveryMode_EnumLi3
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            EhE +0x01c1
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      5: 0x00000000009b02c2 bd13GetNode +0x0822
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      6: 0x0000000000a1406d _ZN24cbd300_InvSubTreeCurrent15bd300SetSubRootER24cbd450_InvListRefSubTreeb +0x006d
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      7: 0x0000000000a1d6c8 _Z20bd400_DeleteSubTreesR17cbd300_InvCurrentR11cbd600_Node +0x0228
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      8: 0x0000000000a1dd28 _Z16bd400DropInvTreeR17cbd300_InvCurrent +0x02c8
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE      9: 0x000000000098faee bd03ReleaseInvTree +0x013e
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     10: 0x00000000009550d3 bd01destroy_file +0x0233
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     11: 0x0000000000955e09 b01pdestroy_perm_file +0x00d9
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     12: 0x0000000000b01e50 _ZNK14Log_ActionFile13RemoveGarbageER18tgg00_TransContextR20SAPDBErr_MessageList +0x0300
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     13: 0x0000000000b79905 _Z29HandleActionMarkFileAsDeletedR18tgg00_TransContextR12Log_UndoFileR21Data_SplitSpaceRea
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            derRN32Data_ChainSplitSpaceBackwardReadI12Log_UndoPageE8IteratorER20SAPDBErr_MessageList +
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            0x01b5
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     14: 0x0000000000b6e843 _ZN11Log_History15ProcessUndoFileER18tgg00_TransContextRK13tgg91_TransNo19SAPDB_Invalidata
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            bleIiLi2147483647EES6_jP15Log_HistoryFilePNS7_8IteratorER20GC_IGarbageCollectorRbSD_R20SAP
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            DBErr_MessageList +0x2493
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     15: 0x0000000000b7366a _ZN11Log_History14RemoveUndoFileER18tgg00_TransContextRK13tgg91_TransNo19SAPDB_Invalidatab
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            leIiLi2147483647EES6_R20GC_IGarbageCollectorjR15Log_HistoryFileRNS9_8IteratorERbSD_R20SAPD
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            BErr_MessageList +0x01ca
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     16: 0x0000000000b760b5 _ZN11Log_History13RemoveHistoryER18tgg00_TransContextjNS_13RemoveOptionsER20GC_IGarbageCol
2008-12-11 10:32:53  3823 ERR 11599 BTRACE                            lectorRbR20SAPDBErr_MessageList +0x0d85
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     17: 0x0000000000a6a13f _ZN23cbd930_GarbageCollectorC1ER18tgg00_TransContextR25cbd930_GarbCollController +0x09df
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     18: 0x0000000000dc7eea _Z18Kernel_NonUserTaskR13RTETask_ITaskR13Trans_ContextR20SAPDBErr_MessageList +0x00fa
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     19: 0x0000000000dc9204 _Z11Kernel_MainR13RTETask_ITask +0x0094
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     20: 0x0000000000e52b38 RTETask_TaskMain +0x0038
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     21: 0x0000000000f028dc _Z23en88_CallKernelTaskMainP9TASK_TYPE +0x00bc
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /opt/sdb/7603/pgm/kernel
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE     22: 0x00002af435227eb0 __start_context +0x0000
2008-12-11 10:32:53  3823 ERR 11599 BTRACE          /lib64/libc-2.4.so
2008-12-11 10:32:53  3823 ERR 11599 BTRACE         Frameinfo [0x0]
2008-12-11 10:32:53  3823 ERR 11599 BTRACE   ----> End of Stack Back Trace <----

lbreddemann
Active Contributor
0 Kudos

Hi Arne,

the current stack back trace has no direct relation to the index problem of yesterday.

Anyhow, it may be the result of some left-overs from the crash since the stack back trace shows, that the garbage collector ran into a problem and wanted to move a page into the free space management that does not exist.

Therefore: it does not seem to be the mentioned bug.

However, I propose you install the most current patch available to you and perform a CHECK DATA WITH UPDATE in admin mode.

Maybe we can trace the error afterwards (as I understand it happens quite often!?).

best regards,

Lars

lbreddemann
Active Contributor
0 Kudos

Hi Arne,

> In the meantime we have migrated to a new hardware, installed the latest 7.6 Version (7.6.03.07 at the time) migrated the complete data using the loader (not using database dumps) but still the problem remains.

Just for clarification - what you call a 'dump' is in reality a backup. The nearest thing to a 'dump' is exactly what you did: exporting the database structure and content via loadercli.

> Some of these statements result in the following error:

>

DBD::MaxDB::st execute failed: POS(1) System error: BD Primkey from inv in primtree not found

> After that a foreign key index on that table is marked as BAD.

Ok, do you have the error message from the KNLDIAG as well? Is there a stack back trace?

Can it be that the table clustered?

If so, you may be hitting PTS 1158669 which is resolved with 7.6.04 Build 17.

Therefore it would be an option to just install the current patch (7.6.05 Build 9 here in SDN) and check whether the issue is gone then.

regards,

Lars