[ 
https://issues.apache.org/jira/browse/MADLIB-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16737633#comment-16737633
 ] 

Nikhil commented on MADLIB-1291:
--------------------------------

[~astronee]

Thanks for reporting the issue. I tried to repro this on postgres and greenplum 
but could not. Also we shouldn't have to explicitly call clear on x_set and 
y_set because the memory for them is on the stack and not the heap (since we 
are just adding std::string as elements to the set). The memory should be 
released once the function is out of scope.

Having said that, I am not sure why calling clear fixes the issue for you. Can 
you provide any other log messages so that we can debug the issue ?

Thanks,
Nikhil 

> madlib.dist_jaccard abnormal for not releasing the memory
> ---------------------------------------------------------
>
>                 Key: MADLIB-1291
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1291
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Module: Linear-Algebra Functions
>            Reporter: astronee jin
>            Priority: Major
>             Fix For: v1.12
>
>
> the bug was found by: [http://www.wotung.com|http://www.wotung.com/]   or 
> [http://www.china-para.com|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)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to