Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-1291

madlib.dist_jaccard abnormal for not releasing the memory

    XMLWordPrintableJSON

Details

    Description

      the bug was found by: http://www.wotung.com   or http://www.china-para.com

      when running the following test

      /usr/local/madlib/bin/madpack -s madlib -p hawq -c gpadmin@localhost:5432/postgres -t linalg install-check

      the programe will quit abnoramlly, 

      the case fails even by manual inputing:
      postgres=# select madlib.dist_jaccard('{1,-2,3}','{4,-5,6}');
      server closed the connection unexpectedly
              This probably means the server terminated abnormally
              before or while processing the request.
      The connection to the server was lost. Attempting reset: Failed.

      after the Analysis, we think the servingp process received the abormal SIGNAL and quit, it's from abort() function. the client connection is lost too.

       

      when debugging into function Dist.Jaccard, the memory is not released explicitly, after add the following and recomplie:
       

      x_set.clear();
      y_set.clear();
       
      we can execute the following and not abormal from the function of distJaccard:
      postgres=# select madlib.dist_jaccard('{1,-2,3}','{4,-5,6}');
       dist_jaccard
      --------------
                  1
      (1 row)

      Attachments

        Activity

          People

            Unassigned Unassigned
            astronee astronee jin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: