Skip to content

FAQ / Known Issues#

As a general advice, when you encounter an error, check in JIRA if it has not already been solved in the past.

CORAL#

CORAL tests fail in cdash when a new platform is added#

When checking the logs in cdash we can see these errors:

ERROR! No platform-specific CORAL_BINARY_TAG_HASH is defined: add BINARY_TAG to CMakeLists.txt
The environment variable CORAL_BINARY_TAG_HASH is uniquely hardcoded depending on the BINARY_TAG platform identifier in the CMakeLists.txt file of the CoralTest package; this file must be modified every time a new platform is added. Currently, the CORAL master branch is used in environment dev3, and the latest tag is used in dev4. To fix this issue in dev3, you only need to add the platforms to this list like in this commit. Once it is working as expected in dev3, you can create a new tag to fix it in dev4.

example of debugging an issue:#

I created a small test for CORAL, in mytest.cpp:

// Include files
#include <iostream>
#include <cstdlib>
#include <limits>
#include <map>
#include <sstream>
#include <stdexcept>
#include "CoralBase/Attribute.h"
#include "CoralBase/AttributeList.h"
#include "CoralBase/TimeStamp.h"
#include "CoralKernel/Context.h"
#include "CoralKernel/RefCounted.h"
#include "RelationalAccess/ConnectionService.h"
#include "RelationalAccess/IConnectionService.h"
#include "RelationalAccess/IDatabaseServiceDescription.h"
#include "RelationalAccess/IDatabaseServiceSet.h"
#include "RelationalAccess/ICursor.h"
#include "RelationalAccess/ILookupService.h"
#include "RelationalAccess/IQuery.h"
#include "RelationalAccess/ISchema.h"
#include "RelationalAccess/ISessionProxy.h"
#include "RelationalAccess/ITable.h"
#include "RelationalAccess/ITableDataEditor.h"
#include "RelationalAccess/ITablePrivilegeManager.h"
#include "RelationalAccess/ITransaction.h"
#include "RelationalAccess/ITypeConverter.h"
#include "RelationalAccess/IWebCacheControl.h"
#include "RelationalAccess/TableDescription.h"
int main(){
  static coral::ConnectionService connSvc;
  coral::AccessMode accessMode = coral::Update;
  std::auto_ptr<coral::ISessionProxy> session( connSvc.connect( "CORAL-MySQL-cdelort/admin", accessMode ) );
  coral::ITable& table = session->nominalSchema().tableHandle( "RunNumber" );
  std::unique_ptr< coral::IQuery > query( table.newQuery() );
  coral::ICursor& c = query->execute();
  while(c.next()) {
    const coral::AttributeList& row = c.currentRow();
    int duration = -1;
    if(!row["Duration"].isNull()) duration = row["Duration"].data<int>();
    std::cout << duration << std::endl;
  }
  return 0;
}
Then I did these mistakes:
source setupLCG.sh # to get the correct g++
g++ mytest.cpp -I./include -L./lib -llcg_ConnectionService -llcg_CoralAccess -llcg_CoralBase -llcg_CoralCommon -llcg_CoralKernel -llcg_CoralMonitor -llcg_CoralServerBase -llcg_CoralServerProxy -llcg_CoralServer -llcg_CoralSockets -llcg_CoralStubs -llcg_EnvironmentAuthenticationService -llcg_FrontierAccess -llcg_MonitoringService -llcg_MySQLAccess -llcg_OracleAccess -llcg_PyCoral -llcg_RelationalAccess -llcg_RelationalService -llcg_SQLiteAccess -llcg_XMLAuthenticationService -llcg_XMLLookupService
doing this gives a lot of ./lib/liblcg_MySQLAccess.so: undefined reference to `coral::Attribute::shareData(coral::Attribute const&)'... Second try:

 ./x86_64-centos7-gcc7-dbg/cc-sh
 g++ mytest.cpp -I./include -L./lib -llcg_ConnectionService -llcg_CoralAccess -llcg_CoralBase -llcg_CoralCommon -llcg_CoralKernel -llcg_CoralMonitor -llcg_CoralServerBase -llcg_CoralServerProxy -llcg_CoralServer -llcg_CoralSockets -llcg_CoralStubs -llcg_EnvironmentAuthenticationService -llcg_FrontierAccess -llcg_MonitoringService -llcg_MySQLAccess -llcg_OracleAccess -llcg_PyCoral -llcg_RelationalAccess -llcg_RelationalService -llcg_SQLiteAccess -llcg_XMLAuthenticationService -llcg_XMLLookupService
This creates a.out.
 ./a.out
 CORAL/Services/XMLLookupService Error Could not open "dblookup.xml" for reading
terminate called after throwing an instance of 'coral::ReplicaNotAvailableException'
  what():  No physical Update connection for "CORAL-MySQL-cdelort/admin" is available. ( CORAL : "ReplicaCatalogue::replicasForConnection" from "CORAL/Services/ConnectionService" )
Aborted

I was missing the exports:

export CORAL_QMTEST_USER=cdelort
export CORAL_AUTH_PATH=/afs/cern.ch/sw/lcg/app/releases/CORAL/internal/private/db/$CORAL_QMTEST_USER
export CORAL_DBLOOKUP_PATH=$CORAL_AUTH_PATH
export CORAL_NETWORKGLITCHTEST_USER=lcg_pool_nightly
./a.out
terminate called after throwing an instance of 'coral::TransactionNotActiveException'
  what():  A transaction is not active ( CORAL : "ISchema::tableHandle" from "CORAL/RelationalPlugins/mysql" )
Aborted
I needed to fix my code (add session->transaction().start( false ); // read-write and session->transaction().commit();)

./a.out
terminate called after throwing an instance of 'coral::AttributeException'
  what():  Attempt to assign attribute "Duration" of type long with int ( CORAL : "Attribute" from "CoralBase" )
Aborted
Finally I got the result I expected!

COOL#

building COOL fails due to an issue with boost version#

Situation#

Sometimes I get issues where the boost version requested when building COOL is not the latest one. While building COOL, it was looking for example for libboost_thread.so.1.66.0 when libboost_thread.so.1.69.0 is in cvmfs...

Root cause#

This is usually because the CORAL build used is too old. It can happen with the gitlab CI/CD if the latest build of CORAL dates from a few weeks/months. It can also happen when testing locally for the same reason.

Solution#

The solution is to re-build CORAL, for example when testing locally, in the CORAL folder: ./cc-build -b x86_64-centos7-gcc9-dbg -v dev4/latest. If this is happening in gitlab, you can rerun the job, for example click on retry on the right top here

Run with a special build of ROOT#

./cc-build -b x86_64-centos7-gcc62-dbg -v dev3/Fri
./x86_64-centos7-gcc62-dbg/cc-sh 
export COOL_QMTEST_USER=sftnight;export CORAL_AUTH_PATH=/home/cdelort/;export CORAL_DBLOOKUP_PATH=/home/cdelort/;export COOLTESTDB=sqlite_file:AAAA/DDDD
python tests/bin/test_Channels.py
# only one test from a suite:
test_IFolder.py TestIFolder.test_listChannels

#Use a special ROOT:
#follow https://root.cern.ch/building-root with some changes:
#vdt made the build fail after 45minutes, so I removed it. The build takes more than 1hour (with 4 cores).
mkdir <builddir>
cd <builddir> 
time cmake -G Ninja -Dvdt=OFF /git/root 
time cmake --build . -- -j4

#Then to use Pyroot (only thing used for COOL)

export PYTHONPATH=/git/rootbuild-fixed/lib/:$PYTHONPATH;export LD_LIBRARY_PATH=/git/rootbuild-fixed/lib/:$LD_LIBRARY_PATH

[root@cdelort-training-03 bash] /git/cool/x86_64-centos7-gcc62-dbg > export PYTHONPATH=/git/rootbuild-working/lib/:$PYTHONPATH
[root@cdelort-training-03 bash] /git/cool/x86_64-centos7-gcc62-dbg > test_IFolder.py TestIFolder.test_listChannels
Fatal in <TROOT::InitInterpreter>: cannot load library /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/Fri/x86_64-centos7-gcc62-dbg/lib/libRIO.so: undefined symbol: _ZN10TClassEdit7STLKindENSt12experimental15fundamentals_v117basic_string_viewIcSt11char_traitsIcEEE
[root@cdelort-training-03 bash] /git/cool/x86_64-centos7-gcc62-dbg > export LD_LIBRARY_PATH=/git/rootbuild-working/lib/:$LD_LIBRARY_PATH
[root@cdelort-training-03 bash] /git/cool/x86_64-centos7-gcc62-dbg > test_IFolder.py TestIFolder.test_listChannels
test_listChannels (__main__.TestIFolder) ... ok

----------------------------------------------------------------------
Ran 1 test in 5.544s

OK