Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9959

When passing command line arguments to a python script that contain a '$' sign, ROOT segfaults.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.14/08
    • Fix Version/s: 6.18/00
    • Component/s: PyROOT
    • Labels:
    • Environment:

      ROOT 6.14: /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/bin/root

      Python 2.7.15: /cvmfs/sft.cern.ch/lcg/releases/LCG_94/Python/2.7.15/x86_64-slc6-gcc62-opt/bin/python

      Description

      When passing command line arguments to a python script that contain a '$' sign, ROOT segfaults. Apparently, ROOT reads all command line arguments when it is imported, which could lead to all sorts of unexpected behaviour, since one doesn't expect a library to do that.

      An example script is attached.

      % python rootargumentexample.py --var 'Sum$(minvis)'
      {{ Sum$(minvis)}}
      {{ ROOT imported}}
      {{ Error in <TSystem::ExpandFileName>: input: Sum$, output: Sum$}}

      {{ *** Break *** segmentation violation}}

      ===========================================================
      {{ There was a crash.}}
      {{ This is the entire stack trace of all threads:}}
      {{ ===========================================================}}
      {{ import itertools}}
      {{ #0 0x00000038aacac89e in waitpid () from /lib64/libc.so.6}}
      {{ #1 0x00000038aac3e4e9 in do_system () from /lib64/libc.so.6}}
      {{ #2 0x00007f219314aebd in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #3 0x00007f219314d624 in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #4 <signal handler called>}}
      {{ #5 0x00000038aad286b8 in __strchr_sse42 () from /lib64/libc.so.6}}
      {{ #6 0x00007f219306a29d in TSystem::SplitAclicMode(char const*, TString&, TString&, TString&) const () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #7 0x00007f2192fffd8e in TApplication::GetOptions(int*, char**) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #8 0x00007f2193000662 in TApplication::TApplication(char const*, int*, char*, void, int) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #9 0x00007f2196adaa54 in PyROOT::TPyROOTApplication::TPyROOTApplication(char const*, int*, char**, bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libPyROOT.so}}
      {{ #10 0x00007f2196adabf7 in PyROOT::TPyROOTApplication::CreatePyROOTApplication(bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libPyROOT.so}}
      {{ #11 0x00007f219da6f045 in ?? ()}}
      {{ #12 0x00007fffe0d8e350 in ?? ()}}
      {{ #13 0x0000000004b21180 in ?? ()}}
      {{ #14 0x0000000004b215f0 in ?? ()}}
      {{ #15 0x00007f218e994eb0 in TClingCallFunc::IFacePtr() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so}}
      {{ #16 0x0000000000000000 in ?? ()}}
      {{ ===========================================================}}

      The lines below might hint at the cause of the crash.
      {{ You may get help by asking at the ROOT forum http://root.cern.ch/forum}}
      {{ Only if you are really convinced it is a bug in ROOT then please submit a}}
      {{ report at http://root.cern.ch/bugs Please post the ENTIRE stack trace}}
      {{ from above as an attachment in addition to anything else}}
      {{ that might help us fixing this issue.}}
      {{ ===========================================================}}
      {{ #5 0x00000038aad286b8 in __strchr_sse42 () from /lib64/libc.so.6}}
      {{ #6 0x00007f219306a29d in TSystem::SplitAclicMode(char const*, TString&, TString&, TString&) const () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #7 0x00007f2192fffd8e in TApplication::GetOptions(int*, char**) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #8 0x00007f2193000662 in TApplication::TApplication(char const*, int*, char*, void, int) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCore.so}}
      {{ #9 0x00007f2196adaa54 in PyROOT::TPyROOTApplication::TPyROOTApplication(char const*, int*, char**, bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libPyROOT.so}}
      {{ #10 0x00007f2196adabf7 in PyROOT::TPyROOTApplication::CreatePyROOTApplication(bool) () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libPyROOT.so}}
      {{ #11 0x00007f219da6f045 in ?? ()}}
      {{ #12 0x00007fffe0d8e350 in ?? ()}}
      {{ #13 0x0000000004b21180 in ?? ()}}
      {{ #14 0x0000000004b215f0 in ?? ()}}
      {{ #15 0x00007f218e994eb0 in TClingCallFunc::IFacePtr() () from /cvmfs/sft.cern.ch/lcg/releases/LCG_94/ROOT/6.14.04/x86_64-slc6-gcc62-opt/lib/libCling.so}}
      {{ #16 0x0000000000000000 in ?? ()}}
      {{ ===========================================================}}

        Attachments

          Activity

            People

            • Assignee:
              dpiparo Danilo Piparo
              Reporter:
              jneundor Jonas Neundorf
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Actual Start:
                Actual End: