create new tag
view all tags

1. invalid use of functions and services due to the upgrade of external libraries and tools (Numbers of this type: 4)

  • Reasons: Because of the upgrade of external libraries and tools, some changes have found in the functions and services used in BOSS. If they are not correctly fixed, segment faults, warnings, failure in loading share libraries will happen. These cases are:
  • 1. upgrade to Gaudiv21, the way of accessing service pointers changed
    • examples: seen in Hypernews: "Error in CalibMySQLCnv initialize", "Warning/Error at run-time check"
  • 2. upgrade to Gaudiv21, the way of reference counting for the life of objects
    • examples: seen in Hypernews: "about the WARNING at the end of simulation job"
  • 3. upgrade to gfortran from g77, changing from .F files to .f90 files is not a correct way, which leads to failure of loading share libraries.
    • examples: seen in Hypernews: "changing .F to .f90 is not a correct way"

2. invalid use of std::string::npos since its size changed from 4 bytes to 8 bytes(Numbers of this type: 6)

  • Reasons: In 64bit native mode, std::string::npos belongs to 8 types instead of 4 types in 32-bit mode.
    npos are defined as: static const size_type npos = -1;
    Therefore, in 32-bit, npos is FFFFFFFF, and in 64-bit, npos is FFFFFFFFFFFFFFFF. In program, some places wrongly compared std::string::npos with usigned int or int.
  • The correct way is: (1)directly compare the results of string operation with npos.eg. if (str.find("abc") == string::npos) (2)use "size_type" or "size_t"

3. segment faults caused by array bounds exceed, infinity or invalid numbers(Numbers of this type: 3)

  • Reasons: Some situations are not expected in programs, which caused array bounds to exceed, or inifinity to happen. Due to the differences of memory management between 32-bit and 64-bit, such kinds of errors caused segment faults in 64-bit systems, but not in 32-bit systems. These cases are:
  • 1. arrays are not correctly defined
    • examples: seen in Hypernews: "about the reconstruction MDCTSF jobs"
  • 2. invalid numbers happened
    • examples: seen in Hypernews: "dE/dx reconstruction error"

4. dead loops in Geant4.

  • Reasons: have shared surfaces among the constituent volumes when applying a Boolean subtraction.
  • Protection: in G4SubtractionSolid::DistanceToIn, if loop after 10000 times, return kInfinity;

5. lustre data I/O errors

  • Reasons: incomatibility between lustre client versions and lustre server versions.
  • Cases: dead locks happened in the lustre when reading random trigger files in the same run from more than one jobs.

6. segment fault caused by pointer violation

  • Reasons: some pointers are null or illegal. some are caused by not enough protection and the change of the related processes.
  • Examples:
  • EventWriter: the related process wiped off m_common.m_mcEvt and m_common.m_recEvt in new 64-bit version for raw data reconstruction, but this is not protected by code, which leads to segment fault in ROOT branch filling.
    • Solutions:
             if(m_common.m_recEvt) m_single_outputTrees->Branch("TDigiEvent","TDigiEvent",&m_common.m_recEvt,32000,1);
             if(m_common.m_EvtHeader) m_single_outputTrees->Branch("TEvtHeader","TEvtHeader",&m_common.m_EvtHeader,32000,1);
             if(m_common.m_hltEvt) m_single_outputTrees->Branch("THltEvent","THltEvent",&m_common.m_hltEvt,32000,1);
             if(m_common.m_mcEvt) m_single_outputTrees->Branch("TMcEvent","TMcEvent",&m_common.m_mcEvt,32000,1);
             if(m_common.m_trigEvt) m_single_outputTrees->Branch("TTrigEvent","TTrigEvent",&m_common.m_trigEvt,32000,1);
    • keep bufsize as low as possible, or Virtual size will increase significaultly.

-- ZhangXiaomei - 2011-01-20

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2011-03-16 - ZhangXiaomei
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback