dynamobi/dynamobi — Issue #549: [FRG-323] Some tests use LucidDB session personality in an unsafe way
Author: dynamobi-build
Created: 2011-12-30 03:34:50+00:00
State: open
Labels: FRG, Test

[reporter="jvs", created="Sat, 21 Jun 2008 15:06:50 -0500 (GMT-05:00)"]
LucidDB DML implementation assumes that timed checkpoints are disabled, since LucidDB checkpoints need to be executed explicitly at the end of the DML statement. If they happen unexpectedly, they may encounter X-locked pages being changed by the DML operator.

When run with a full LucidDB environment, there's no problem (since we turn off timed checkpoints there as part of catalog initialization), but when run from Farrago unit tests via personality-switching, it's possible to hit a sporadic failure like this:

[java] Running net.sf.farrago.test.FarragoSqlTest

[java] java: ../../fennel/cache/CacheMethodsImpl.h:732: uint fennel::CacheImpl::checkpointPages(fennel::PagePredicate&, fennel::CheckpointType) [with PageT = fennel::TwoQPage, VictimPolicyT = fennel::TwoQVictimPolicy]: Assertion `!page.isExclusiveLockHeld()' failed.

[java] *** CAUGHT SIGNAL 6; BACKTRACE:

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(fennel::AutoBacktrace::signal_handler(int)+0x37) [0x4b725]

[java] [0xffffe420]

[java] [0xffffe410]

[java] /lib/tls/i686/cmov/libc.so.6(gsignal+0x55) [0xb7e02875]

[java] /lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7e04201]

[java] /lib/tls/i686/cmov/libc.so.6(__assert_fail+0xee) [0x23b6e]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_cache.so(fennel::CacheImpl >::checkpointPages(fennel::PagePredicate&, fennel::CheckpointType)+0x115) [0x40ccf]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_segment.so(fennel::VersionedSegment::delegatedCheckpoint(fennel::Segment&, fennel::CheckpointType)+0x115) [0xb4f43]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_segment.so(fennel::DelegatingSegment::delegatedCheckpoint(fennel::Segment&, fennel::CheckpointType)+0x3c) [0x72e44]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_segment.so(fennel::Segment::checkpoint(fennel::CheckpointType)+0xa8) [0x8495a]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_db.so.0(fennel::Database::checkpointImpl(fennel::CheckpointType)+0x169) [0x1fb09]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_db.so.0(fennel::CheckpointThread::run()+0xda) [0x1bd04]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(fennel::Thread::initAndRun()+0x27) [0x85233]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(boost::_mfi::mf0::operator()(fennel::Thread*) const+0x46) [0x85cf4]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(void boost::_bi::list1 >::operator(), boost::_bi::list0>(boost::_bi::type, boost::_mfi::mf0&, boost::_bi::list0&, int)+0x46) [0x85d68]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(boost::_bi::bind_t, boost::_bi::list1 > >::operator()()+0x49) [0x85db9]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/libfennel/.libs/libfennel_common.so(boost::detail::function::void_function_obj_invoker0, boost::_bi::list1 > >, void>::invoke(boost::detail::function::any_pointer)+0x23) [0x85de3]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/../thirdparty/boost/lib/libboost_thread-gcc-mt-gdp-1_33.so.1.33.0(boost::function0 >::operator()() const+0xad) [0x38999]

[java] /home/build/cc/depot/bootstrap/build/open/fennel/../thirdparty/boost/lib/libboost_thread-gcc-mt-gdp-1_33.so.1.33.0 [0xb3838802]

[java] /lib/tls/i686/cmov/libpthread.so.0 [0xb7f5046b]

[java] /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7eab6de]

Resolving this requires coming up with a way to disable the timed checkpoints, but we don't want to do that generically for Farrago since by default they are expected to be a part of a typical DBMS implementation.