Mike Percy created KUDU-1892:
--------------------------------

             Summary: Potential nullptr deref in file cache
                 Key: KUDU-1892
                 URL: https://issues.apache.org/jira/browse/KUDU-1892
             Project: Kudu
          Issue Type: Bug
            Reporter: Mike Percy


I saw the following in raft_consensus-itest in a local environment. It had a 
few patches on top but nothing that seems likely to affect this issue.

Log snippet:

{noformat}
I0221 01:26:17.462975 12146 log.cc:426] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
33e7b3c7fdd64255b209cc8123db9646: Rolled over to a new log segment at 
/tmp/kudutest-1000/raft_consensus-itest.RaftConsensusITest.TestCatchupAfterOpsEvicted.1487669166730301-8186/raft_consensus-itest-cluster/ts-2/data/wals/2c6176fb99ed4fb4a027584aeeb0a708/wal-000000005
I0221 01:26:17.476363 12014 tablet.cc:933] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
33e7b3c7fdd64255b209cc8123db9646: Flush: entering stage 1 (old memrowset 
already frozen for inserts)
I0221 01:26:17.476393 12014 compaction.cc:877] Selected 1 rowsets to compact:
I0221 01:26:17.476404 12014 compaction.cc:880] memrowset(current size on disk: 
~0 bytes)
I0221 01:26:17.476408 12014 tablet.cc:935] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
33e7b3c7fdd64255b209cc8123db9646: Memstore in-memory size: 8257801 bytes
I0221 01:26:17.476425 12014 tablet.cc:1190] T 2c6176fb99ed4fb4a027584aeeb0a708 
P 33e7b3c7fdd64255b209cc8123db9646: Flush: entering phase 1 (flushing 
snapshot). Phase 1 snapshot: MvccSnapshot[committed={T|T < 6093492950936788992}]
I0221 01:26:17.477262 12148 log.cc:541] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
c8ec78660e8642b4b82113d62a3042cb: Max segment size reached. Starting new 
segment allocation
*** Aborted at 1487669177 (unix time) try "date -d @1487669177" if you are 
using GNU date ***
I0221 01:26:17.477612 12148 log.cc:426] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
c8ec78660e8642b4b82113d62a3042cb: Rolled over to a new log segment at 
/tmp/kudutest-1000/raft_consensus-itest.RaftConsensusITest.TestCatchupAfterOpsEvicted.1487669166730301-8186/raft_consensus-itest-cluster/ts-1/data/wals/2c6176fb99ed4fb4a027584aeeb0a708/wal-000000006
I0221 01:26:17.478018 12146 log.cc:541] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
33e7b3c7fdd64255b209cc8123db9646: Max segment size reached. Starting new 
segment allocation
PC: @                0x0 (unknown)
I0221 01:26:17.478278 12146 log.cc:426] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
33e7b3c7fdd64255b209cc8123db9646: Rolled over to a new log segment at 
/tmp/kudutest-1000/raft_consensus-itest.RaftConsensusITest.TestCatchupAfterOpsEvicted.1487669166730301-8186/raft_consensus-itest-cluster/ts-2/data/wals/2c6176fb99ed4fb4a027584aeeb0a708/wal-000000006
*** SIGSEGV (@0x0) received by PID 12009 (TID 0x7fe150a20700) from PID 0; stack 
trace: ***
    @     0x7fe1551d7390 (unknown) at ??:0
    @                0x0 (unknown)
    @     0x7fe154711f05 kudu::(anonymous namespace)::ShardedLRUCache::Insert() 
at ??:0
    @     0x7fe154772b5b kudu::internal::BaseDescriptor<>::InsertIntoCache() at 
??:0
    @     0x7fe1547728d7 kudu::internal::Descriptor<>::ReopenFileIfNecessary() 
at ??:0
    @     0x7fe154772540 kudu::internal::Descriptor<>::InitOnce() at ??:0
    @     0x7fe154772620 kudu::internal::InitCb<>() at ??:0
    @     0x7fe154294b0b GoogleOnceInternalInit() at ??:0
    @     0x7fe157f37069 GoogleOnceDynamic::Init<>() at ??:0
    @     0x7fe1547724f3 kudu::KuduOnceDynamic::Init<>() at ??:0
    @     0x7fe15476ec55 kudu::internal::Descriptor<>::Init() at ??:0
    @     0x7fe15476e4d9 kudu::FileCache<>::OpenExistingFile() at ??:0
    @     0x7fe154a3b26b kudu::fs::internal::LogBlockContainer::Create() at ??:0
    @     0x7fe154a4753b kudu::fs::LogBlockManager::GetOrCreateContainer() at 
??:0
    @     0x7fe154a46ead kudu::fs::LogBlockManager::CreateBlock() at ??:0
    @     0x7fe154a478ce kudu::fs::LogBlockManager::CreateBlock() at ??:0
    @     0x7fe154a325ea kudu::FsManager::CreateNewBlock() at ??:0
    @     0x7fe157ee3090 kudu::tablet::MultiColumnWriter::Open() at ??:0
    @     0x7fe157eb861c kudu::tablet::DiskRowSetWriter::Open() at ??:0
    @     0x7fe157ebb936 kudu::tablet::RollingDiskRowSetWriter::RollWriter() at 
??:0
    @     0x7fe157ebb4cf kudu::tablet::RollingDiskRowSetWriter::Open() at ??:0
    @     0x7fe157e024a2 kudu::tablet::Tablet::DoMergeCompactionOrFlush() at 
??:0
    @     0x7fe157e019aa kudu::tablet::Tablet::FlushInternal() at ??:0
    @     0x7fe157e00bc6 kudu::tablet::Tablet::FlushUnlocked() at ??:0
    @     0x7fe157e5a0a1 kudu::tablet::FlushMRSOp::Perform() at ??:0
    @     0x7fe1547a541a kudu::MaintenanceManager::LaunchOp() at ??:0
    @     0x7fe1547abee1 boost::_mfi::mf1<>::operator()() at ??:0
    @     0x7fe1547abe3f boost::_bi::list2<>::operator()<>() at ??:0
    @     0x7fe1547abdca boost::_bi::bind_t<>::operator()() at ??:0
    @     0x7fe1547abb50 
boost::detail::function::void_function_obj_invoker0<>::invoke() at ??:0
    @     0x7fe1577d0888 boost::function0<>::operator()() at ??:0
    @     0x7fe1548250f9 kudu::FunctionRunnable::Run() at ??:0
I0221 01:26:17.504663 11878 tablet.cc:933] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
c8ec78660e8642b4b82113d62a3042cb: Flush: entering stage 1 (old memrowset 
already frozen for inserts)
I0221 01:26:17.504683 11878 compaction.cc:877] Selected 1 rowsets to compact:
I0221 01:26:17.504693 11878 compaction.cc:880] memrowset(current size on disk: 
~0 bytes)
I0221 01:26:17.504696 11878 tablet.cc:935] T 2c6176fb99ed4fb4a027584aeeb0a708 P 
c8ec78660e8642b4b82113d62a3042cb: Memstore in-memory size: 8257801 bytes
I0221 01:26:17.504708 11878 tablet.cc:1190] T 2c6176fb99ed4fb4a027584aeeb0a708 
P c8ec78660e8642b4b82113d62a3042cb: Flush: entering phase 1 (flushing 
snapshot). Phase 1 snapshot: MvccSnapshot[committed={T|T < 6093492950989471744 
or (T in {6093492950989471744})}]
*** Aborted at 1487669177 (unix time) try "date -d @1487669177" if you are 
using GNU date ***
PC: @                0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 11873 (TID 0x7f789ffff700) from PID 0; stack 
trace: ***
    @     0x7f78b0f6f390 (unknown) at ??:0
    @                0x0 (unknown)
    @     0x7f78b04a9f05 kudu::(anonymous namespace)::ShardedLRUCache::Insert() 
at ??:0
    @     0x7f78b050ab5b kudu::internal::BaseDescriptor<>::InsertIntoCache() at 
??:0
    @     0x7f78b050a8d7 kudu::internal::Descriptor<>::ReopenFileIfNecessary() 
at ??:0
    @     0x7f78b050a540 kudu::internal::Descriptor<>::InitOnce() at ??:0
    @     0x7f78b050a620 kudu::internal::InitCb<>() at ??:0
    @     0x7f78b002cb0b GoogleOnceInternalInit() at ??:0
    @     0x7f78b3ccf069 GoogleOnceDynamic::Init<>() at ??:0
    @     0x7f78b050a4f3 kudu::KuduOnceDynamic::Init<>() at ??:0
    @     0x7f78b0506c55 kudu::internal::Descriptor<>::Init() at ??:0
    @     0x7f78b05064d9 kudu::FileCache<>::OpenExistingFile() at ??:0
    @     0x7f78b07d326b kudu::fs::internal::LogBlockContainer::Create() at ??:0
    @     0x7f78b07df53b kudu::fs::LogBlockManager::GetOrCreateContainer() at 
??:0
    @     0x7f78b07deead kudu::fs::LogBlockManager::CreateBlock() at ??:0
    @     0x7f78b07df8ce kudu::fs::LogBlockManager::CreateBlock() at ??:0
    @     0x7f78b07ca5ea kudu::FsManager::CreateNewBlock() at ??:0
    @     0x7f78b3c7b090 kudu::tablet::MultiColumnWriter::Open() at ??:0
    @     0x7f78b3c5061c kudu::tablet::DiskRowSetWriter::Open() at ??:0
    @     0x7f78b3c53936 kudu::tablet::RollingDiskRowSetWriter::RollWriter() at 
??:0
    @     0x7f78b3c534cf kudu::tablet::RollingDiskRowSetWriter::Open() at ??:0
    @     0x7f78b3b9a4a2 kudu::tablet::Tablet::DoMergeCompactionOrFlush() at 
??:0
    @     0x7f78b3b999aa kudu::tablet::Tablet::FlushInternal() at ??:0
    @     0x7f78b3b98bc6 kudu::tablet::Tablet::FlushUnlocked() at ??:0
    @     0x7f78b3bf20a1 kudu::tablet::FlushMRSOp::Perform() at ??:0
    @     0x7f78b053d41a kudu::MaintenanceManager::LaunchOp() at ??:0
    @     0x7f78b0543ee1 boost::_mfi::mf1<>::operator()() at ??:0
    @     0x7f78b0543e3f boost::_bi::list2<>::operator()<>() at ??:0
    @     0x7f78b0543dca boost::_bi::bind_t<>::operator()() at ??:0
    @     0x7f78b0543b50 
boost::detail::function::void_function_obj_invoker0<>::invoke() at ??:0
    @     0x7f78b3568888 boost::function0<>::operator()() at ??:0
    @     0x7f78b05bd0f9 kudu::FunctionRunnable::Run() at ??:0
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to