DataTransferSession keeps busy while waiting for a mount to be required
Seen with a dev-environment instance with a recent CTA build from main (i.e. version approx > 4.7.9). cta-taped task for idle tape drive(s) more or less constantly in Run state and repeatedly sending requests to the catalogue, e.g.:
14314 cta 20 0 913808 49536 10252 R 50.0 0.7 21:27.41 cta-tpd-VDSTK1
14315 cta 20 0 915128 50772 10252 R 50.0 0.7 22:01.43 cta-tpd-VDSTK2
typical stack trace seen when attaching to a busy tpd:
[...]
#10 0x00007f534f64f340 in cta::catalogue::CatalogueRetryWrapper::getTapeDrive (this=0x1134f00, tapeDriveName="VDSTK2") at /devwork/local/CTA/catalogue/CatalogueRetryWrapper.hpp:715
#11 0x00007f534f7a692a in cta::TapeDrivesCatalogueState::getDriveStates (this=0x11641d0, lc=...) at /devwork/local/CTA/catalogue/TapeDrivesCatalogueState.cpp:74
#12 0x00007f5351796d9f in cta::OStoreDB::fetchMountInfo (this=0x115fa80, tmdi=..., re=..., purpose=cta::SchedulerDatabase::GET_NEXT_MOUNT, logContext=...) at /devwork/local/CTA/scheduler/OStoreDB/OStoreDB.cpp:486
#13 0x00007f535179a315 in cta::OStoreDB::getMountInfoNoLock (this=0x115fa80, purpose=cta::SchedulerDatabase::GET_NEXT_MOUNT, logContext=...) at /devwork/local/CTA/scheduler/OStoreDB/OStoreDB.cpp:726
#14 0x00007f53517436da in cta::Scheduler::getNextMountDryRun (this=0x7ffdd6205050, logicalLibraryName="VLSTK", driveName="VDSTK1", lc=...) at /devwork/local/CTA/scheduler/Scheduler.cpp:1276
#15 0x00000000004ba413 in castor::tape::tapeserver::daemon::DataTransferSession::execute (this=0x7ffdd6205130) at /devwork/local/CTA/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp:171
[...]
Seems to be DataTransferSession
is not waiting the expected 10 seconds in case no new mount is found.
Edited by David Smith