[odb-users] Failure after upgrading from 2.1.1 to 2.3.0 version

Ella Vishnevsky ellav at checkpoint.com
Thu Aug 4 06:47:33 EDT 2016


Hey,

I'm running the same code using version 2.1.1 and 2.3.0 :

                odb::database  *db  = new odb::sqlite::database("TEST", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
                odb::transaction t (db->begin());

                domains *domain_to_add = new domains("TESTER");
                domains *domain_to_add1 = new domains("TESTER1");
                domains *domain_to_add2 = new domains("TESTER2");

                db->persist(domain_to_add);
                db->persist(domain_to_add1);
                db->persist(domain_to_add2);
                t.commit();

                typedef odb::query<domains> query;
                typedef odb::result<domains> result;

                odb::transaction tt (db->begin ());

                result r  = db->query<domains> (query::domain=="TESTER");
                std::string test;
                std::vector<std::string> hell;

                for (result::iterator i (r.begin ()); i != r.end (); ++i)
                {
                                test = i->domain();
                                hell.push_back(test);
                }

                tt.commit();



When running version 2.1.1 everything works as expected, but the moment I upgrade to 2.3.0 I get the following  errors:

[Expert at gw-32b051:0]# *** glibc detected *** /opt/CPsuite-R77/fw1/teCurrentPack/temain: double free or corruption (out): 0x0bba98c8 ***
======= Backtrace: =========
/lib/libc.so.6[0xf7bf1aa6]
/lib/libc.so.6(cfree+0x90)[0xf7bf4fe0]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xf7d88fd1]
/usr/lib/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1d)[0xf7d65b9d]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb6sqlite9statementD1Ev+0x105)[0x94c7be5]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb6sqlite16select_statementD0Ev+0x18)[0x94c1f48]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb6sqlite18object_result_implIN2te7domainsEE10invalidateEv+0xf4)[0x864d3f4]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb10connection18invalidate_resultsEv+0x20)[0x94d0720]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb6sqlite16transaction_impl6commitEv+0x16)[0x94c8ff6]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3odb11transaction6commitEv+0x37)[0x94d7057]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN2te6Daemon25StartApplicationSpecificsEv+0x2ea7)[0x84fb767]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3NAC2IS22BasicDaemonApplication10InitializeEv+0x3db)[0x9055fcb]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_ZN3NAC2IS16BasicApplication9MainStartEv+0x17)[0x84be157]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_Z8main_tediPPKc+0xf63)[0x847fc93]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(_Z8main_cmdiPPcRi+0x1e0)[0x8433c50]
/opt/CPsuite-R77/fw1/teCurrentPack/temain(main+0x37)[0x8433cd7]
/lib/libc.so.6(__libc_start_main+0xdc)[0xf7ba0dec]
/opt/CPsuite-R77/fw1/teCurrentPack/temain[0x84339b1]
======= Memory map: ========
08048000-09a44000 r-xp 00000000 fd:03 16908333                           /var/log/files_repository/Raw_Files/D100C612-9D05-48AA-9F2A-F8C42528F100/47086/temain
09a44000-09aeb000 rwxp 019fc000 fd:03 16908333                           /var/log/files_repository/Raw_Files/D100C612-9D05-48AA-9F2A-F8C42528F100/47086/temain
09aeb000-0ad0c000 rwxp 09aeb000 00:00 0
0b1d2000-0bc47000 rwxp 0b1d2000 00:00 0
ed23f000-ed247000 rwxs 00000000 fd:00 7573953                            /var/opt/CPsuite-R77/fw1/conf/te_tcsi_db-shm
ed247000-ed248000 ---p ed247000 00:00 0
ed248000-edc48000 rwxp ed248000 00:00 0
edc48000-edc49000 ---p edc48000 00:00 0
edc49000-ee649000 rwxp edc49000 00:00 0
ee64b000-ee64c000 ---p ee64b000 00:00 0
ee64c000-ee68c000 rwxp ee64c000 00:00 0
ee68c000-ee68d000 ---p ee68c000 00:00 0
ee68d000-ef08d000 rwxp ee68d000 00:00 0
ef08d000-ef08e000 ---p ef08d000 00:00 0
ef08e000-efa8e000 rwxp ef08e000 00:00 0
efa8e000-f7a91000 rwxs 00000000 fd:00 7576456                            /var/opt/CPsuite-R77/fw1/database/fwauth.NDB
f7a91000-f7b12000 rwxp f7a91000 00:00 0
f7b12000-f7b1b000 r-xp 00000000 fd:00 8258025                            /lib/libnss_files-2.5.so
f7b1b000-f7b1c000 r-xp 00008000 fd:00 8258025                            /lib/libnss_files-2.5.so
f7b1c000-f7b1d000 rwxp 00009000 fd:00 8258025                            /lib/libnss_files-2.5.so
f7b23000-f7b64000 rwxp f7b23000 00:00 0
f7b64000-f7b76000 r-xp 00000000 fd:00 8258046                            /lib/libaudit.so.0.0.0
f7b76000-f7b78000 rwxp 00011000 fd:00 8258046                            /lib/libaudit.so.0.0.0
f7b78000-f7b8a000 r-xp 00000000 fd:00 6096584                            /usr/lib/libz.so.1.2.3
f7b8a000-f7b8b000 rwxp 00011000 fd:00 6096584                            /usr/lib/libz.so.1.2.3
f7b8b000-f7cc5000 r-xp 00000000 fd:00 8258009                            /lib/libc-2.5.so
f7cc5000-f7cc7000 r-xp 0013a000 fd:00 8258009                            /lib/libc-2.5.so
f7cc7000-f7cc8000 rwxp 0013c000 fd:00 8258009                            /lib/libc-2.5.so
f7cc8000-f7ccc000 rwxp f7cc8000 00:00 0
f7ccc000-f7cd7000 r-xp 00000000 fd:00 8257999                            /lib/libgcc_s-4.1.2-20080825.so.1
f7cd7000-f7cd8000 rwxp 0000a000 fd:00 8257999                            /lib/libgcc_s-4.1.2-20080825.so.1
f7cd8000-f7db6000 r-xp 00000000 fd:00 6096580                            /usr/lib/libstdc++.so.6.0.8
f7db6000-f7db9000 r-xp 000dd000 fd:00 6096580                            /usr/lib/libstdc++.so.6.0.8
f7db9000-f7dbb000 rwxp 000e0000 fd:00 6096580                            /usr/lib/libstdc++.so.6.0.8
f7dbb000-f7dc1000 rwxp f7dbb000 00:00 0
f7dc1000-f7de6000 r-xp 00000000 fd:00 8258017                            /lib/libm-2.5.so
f7de6000-f7de7000 r-xp 00024000 fd:00 8258017                            /lib/libm-2.5.so
f7de7000-f7de8000 rwxp 00025000 fd:00 8258017                            /lib/libm-2.5.so
f7de8000-f7dfb000 r-xp 00000000 fd:00 8258019                            /lib/libnsl-2.5.so
f7dfb000-f7dfc000 r-xp 00012000 fd:00 8258019                            /lib/libnsl-2.5.so
f7dfc000-f7dfd000 rwxp 00013000 fd:00 8258019                            /lib/libnsl-2.5.so
f7dfd000-f7dff000 rwxp f7dfd000 00:00 0
f7dff000-f7e09000 r-xp 00000000 fd:00 8258092                            /lib/libpam.so.0.81.5
f7e09000-f7e0a000 rwxp 0000a000 fd:00 8258092                            /lib/libpam.so.0.81.5
f7e0a000-f7e0c000 r-xp 00000000 fd:00 8258015                            /lib/libdl-2.5.so
f7e0c000-f7e0d000 r-xp 00001000 fd:00 8258015                            /lib/libdl-2.5.so
f7e0d000-f7e0e000 rwxp 00002000 fd:00 8258015                            /lib/libdl-2.5.so
f7e0e000-f7e0f000 rwxp f7e0e000 00:00 0
f7e0f000-f7e1e000 r-xp 00000000 fd:00 8258035                            /lib/libresolv-2.5.so
f7e1e000-f7e1f000 r-xp 0000e000 fd:00 8258035                            /lib/libresolv-2.5.so
f7e1f000-f7e20000 rwxp 0000f000 fd:00 8258035                            /lib/libresolv-2.5.so
f7e20000-f7e22000 rwxp f7e20000 00:00 0
f7e22000-f7e35000 r-xp 00000000 fd:00 8258033                            /lib/libpthread-2.5.so
f7e35000-f7e36000 r-xp 00012000 fd:00 8258033                            /lib/libpthread-2.5.so
f7e36000-f7e37000 rwxp 00013000 fd:00 8258033                            /lib/libpthread-2.5.so
f7e37000-f7e39000 rwxp f7e37000 00:00 0
f7e3d000-f7e3f000 rwxp f7e3d000 00:00 0
f7e3f000-f7f5a000 r-xp 00000000 fd:00 1736849                            /opt/CPshrd-R77/lib/libxml2.so.2
f7f5a000-f7f61000 rwxp 0011a000 fd:00 1736849                            /opt/CPshrd-R77/lib/libxml2.so.2
f7f61000-f7f62000 rwxp f7f61000 00:00 0
f7f62000-f7f7b000 r-xp 00000000 fd:00 8258002                            /lib/ld-2.5.so
f7f7b000-f7f7c000 r-xp 00019000 fd:00 8258002                            /lib/ld-2.5.so
f7f7c000-f7f7d000 rwxp 0001a000 fd:00 8258002                            /lib/ld-2.5.so
ffcbe000-ffea2000 rwxp ffcbe000 00:00 0                                  [stack]


and another error I saw:
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xf7b6eba0 in raise () from /lib/libc.so.6
#2  0xf7b704b1 in abort () from /lib/libc.so.6
#3  0xf7ba4dfb in __libc_message () from /lib/libc.so.6
#4  0xf7bacaa6 in _int_free () from /lib/libc.so.6
#5  0xf7baffe0 in free () from /lib/libc.so.6
#6  0xf7d43fd1 in operator delete(void*) () from /usr/lib/libstdc++.so.6
#7  0x08ada5d5 in dec (p=0xd9f84e78, this=0xd9c44bdc) at /local_ckp/xl/odb/2_3_E/include/odb/details/shared-ptr/base.txx:172
#8  ~shared_ptr (this=0xd9c44bdc, __in_chrg=<optimized out>) at /local_ckp/xl/odb/2_3_E/include/odb/details/shared-ptr.hxx:26
#9  odb::sqlite::object_result_impl<te::domains_sha1>::~object_result_impl (this=0xd9c44bb0, __in_chrg=<optimized out>)
    at /local_ckp/xl/odb_sqlite/2_3_E_2/include/odb/sqlite/simple-object-result.txx:21
#10 0x08ada812 in odb::sqlite::object_result_impl<te::domains_sha1>::~object_result_impl (this=0xd9c44bb0, __in_chrg=<optimized out>)
    at /local_ckp/xl/odb_sqlite/2_3_E_2/include/odb/sqlite/simple-object-result.txx:22
#11 0x0865a9d2 in dec (p=0xd9c44bb0, this=0xffab05d8) at /local_ckp/xl/odb/odb_2_3_0/include/odb/details/shared-ptr/base.txx:172
#12 ~shared_ptr (this=0xffab05d8, __in_chrg=<optimized out>) at /local_ckp/xl/odb/odb_2_3_0/include/odb/details/shared-ptr.hxx:26
#13 ~result (this=0xffab05d8, __in_chrg=<optimized out>) at /local_ckp/xl/odb/odb_2_3_0/include/odb/result.hxx:76
#14 te::OdbDatabase::OdbQuery<te::domains_sha1> (this=0xc3bcd58, _vect=std::vector of length 0, capacity 0, _max=1)



Can you please advise? What it the difference between the two versions, I can't seem to understand why I fail =\


More information about the odb-users mailing list