3 Replies Latest reply on Aug 15, 2012 8:58 PM by Laurenfoutz-Oracle

    BDB SQL  Memory corruption in a mutilthreaded environment

      I have a program with multiple threads. The threads do not share the same handle.Occcasionally the program dies with a core. I see a thread always with the following stack:

      #3 0x60000000d336b7c0:0 in closeDB () at ../lang/sql/generated/sqlite3.c:35553
      #4 0x60000000d3388c60:0 in btreeInvalidateHandleCache ()
      at ../lang/sql/generated/sqlite3.c:37914
      #5 0x60000000d3387540:0 in sqlite3BtreeBeginTrans ()
      at ../lang/sql/generated/sqlite3.c:37987
      #6 0x60000000d33d2cc0:0 in sqlite3InitOne ()
      at ../lang/sql/generated/sqlite3.c:80206
      #7 0x60000000d33d1b80:0 in sqlite3Init ()
      at ../lang/sql/generated/sqlite3.c:80378
      #8 0x60000000d33d1770:0 in sqlite3LocateTable ()
      at ../lang/sql/generated/sqlite3.c:80416
      #9 0x60000000d33cebb0:0 in selectExpander ()
      at ../lang/sql/generated/sqlite3.c:84064
      #10 0x60000000d33ce780:0 in sqlite3SelectExpand ()
      at ../lang/sql/generated/sqlite3.c:60440
      #11 0x60000000d33ce470:0 in sqlite3SelectPrep ()
      at ../lang/sql/generated/sqlite3.c:84343
      #12 0x60000000d3444580:0 in sqlite3Select ()
      at ../lang/sql/generated/sqlite3.c:84599
      #13 0x60000000d33ab080:0 in yy_reduce ()
      ---Type <return> to continue, or q <return> to quit---
      at ../lang/sql/generated/sqlite3.c:95943
      #14 0x60000000d33a9100:0 in sqlite3Parser ()
      at ../lang/sql/generated/sqlite3.c:96910
      #15 0x60000000d33a3410:0 in sqlite3RunParser ()
      at ../lang/sql/generated/sqlite3.c:97749
      #16 0x60000000d33e7110:0 in sqlite3Prepare ()
      at ../lang/sql/generated/sqlite3.c:80564
      #17 0x60000000d351b640:0 in sqlite3_prepare_v2 ()

      This may or may not anything to do with the problem - my question why is sqlite trying to close the database ?

      Thanks for your help.