Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-28544

DFUServer crashes when source file is not distributed file.

    XMLWordPrintable

Details

    • Regression
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.10.4
    • 8.10.6
    • DFU Server
    • None
    • Any

    Description

      By the core trace generated by the OBT there is a SEGFAULT (null pointer deference):

      Using host libthread_db library "/lib64/libthread_db.so.1".
      Core was generated by `dfuserver'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00007f4891216c00 in FileSprayer::getAPICopyClient (this=0x7f485bffdca0) at /home/centos/build/CE/platform/HPCC-Platform/dali/ft/filecopy.cpp:1526
      1526        distributedSource->getClusterName(0, sourceClusterName);  

      The related source from filecopy.cpp:1519-1533

       IAPICopyClient * FileSprayer::getAPICopyClient()
      {
          bool needCalcCRC = calcCRC();
          if (needCalcCRC && !sources.item(0).hasCRC)
              return nullptr;    
          StringBuffer sourceClusterName;
          distributedSource->getClusterName(0, sourceClusterName);
          Owned<IStoragePlane> sourcePlane = getDataStoragePlane(sourceClusterName.str(), false);
          Owned<IStorageApiInfo> sourceAPIInfo = sourcePlane->getStorageApiInfo();
          if (!sourceAPIInfo)
              return nullptr;

      The problem is in Spray operation when source file is not a distributed file and the distributedSource is nullptr.

       

      A possible fix is:

      IAPICopyClient * FileSprayer::getAPICopyClient()
      {
          bool needCalcCRC = calcCRC();
          if (needCalcCRC && !sources.item(0).hasCRC)
              return nullptr;    
          
          if (!distributedSource)
              return nullptr;    
      
          StringBuffer sourceClusterName;
          distributedSource->getClusterName(0, sourceClusterName);
          Owned<IStoragePlane> sourcePlane = getDataStoragePlane(sourceClusterName.str(), false);
          Owned<IStorageApiInfo> sourceAPIInfo = sourcePlane->getStorageApiInfo();
          if (!sourceAPIInfo)
              return nullptr;    StringBuffer targetClusterName;
      
          if (!distributedTarget)
              return nullptr;

       

      Attachments

        Activity

          People

            attilavamos Attila Vamos
            attilavamos Attila Vamos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: