You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@madlib.apache.org by "Zhanwei Wang (JIRA)" <ji...@apache.org> on 2019/06/25 00:06:00 UTC

[jira] [Commented] (MADLIB-1291) madlib.dist_jaccard abnormal for not releasing the memory

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

Zhanwei Wang commented on MADLIB-1291:
--------------------------------------

We got the same problem on greenplum 5.17. Madlib version is 1.15.1

 

Master core with sql

 
{code:java}
select madlib.dist_jaccard('{1,-2,3}','{4,-5,6}');{code}
 

 
{code:java}
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `postgres: 5432, gpadmin madlib [local] con68 cmd1 SELECT '.
Program terminated with signal 6, Aborted.
#0 0x00007fae69bd7207 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install hashdata-debug-v2.5.1_3071-1.el7.centos.x86_64
(gdb)
(gdb)
(gdb) bt
#0 0x00007fae69bd7207 in raise () from /lib64/libc.so.6
#1 0x00007fae69bd88f8 in abort () from /lib64/libc.so.6
#2 0x00007fae69c19d27 in __libc_message () from /lib64/libc.so.6
#3 0x00007fae69c22489 in _int_free () from /lib64/libc.so.6
#4 0x00007fae66de0d88 in deallocate (this=0x7ffdabec16e0, __p=0x214fb60)
at /usr/include/c++/4.8.2/ext/new_allocator.h:110
#5 _M_put_node (this=0x7ffdabec16e0, __p=0x214fb60) at /usr/include/c++/4.8.2/bits/stl_tree.h:374
#6 _M_destroy_node (this=0x7ffdabec16e0, __p=0x214fb60)
at /usr/include/c++/4.8.2/bits/stl_tree.h:422
#7 std::_Rb_tree<std::string, std::string, std::_Identity<std::string>, std::less<std::string>, std::allocator<std::string> >::_M_erase (this=this@entry=0x7ffdabec16e0, __x=0x214fb60)
at /usr/include/c++/4.8.2/bits/stl_tree.h:1127
#8 0x00007fae66de0d6f in std::_Rb_tree<std::string, std::string, std::_Identity<std::string>, std::less<std::string>, std::allocator<std::string> >::_M_erase (this=0x7ffdabec16e0, __x=0x214fa70)
at /usr/include/c++/4.8.2/bits/stl_tree.h:1125
#9 0x00007fae4ba386d6 in ~_Rb_tree (this=0x7ffdabec16e0, __in_chrg=<optimized out>)
at /usr/include/c++/4.8.2/bits/stl_tree.h:671
#10 ~set (this=0x7ffdabec16e0, __in_chrg=<optimized out>)
at /usr/include/c++/4.8.2/bits/stl_set.h:90
#11 madlib::modules::linalg::distJaccard (inX=..., inY=...)
at /code/madlib/src/modules/linalg/metric.cpp:256
#12 0x00007fae4ba387ca in madlib::modules::linalg::dist_jaccard::run (
this=this@entry=0x7ffdabec18d0, args=...) at /code/madlib/src/modules/linalg/metric.cpp:479
#13 0x00007fae4bbb4e65 in invoke<madlib::modules::linalg::dist_jaccard> (args=...)
at /code/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/UDF_impl.hpp:82
#14 madlib::dbconnector::postgres::UDF::call<madlib::modules::linalg::dist_jaccard> (
fcinfo=0x7ffdabec2280)
at /code/madlib/src/ports/greenplum/dbconnector/../../postgres/dbconnector/UDF_impl.hpp:161
#15 0x000000000076d689 in ExecMakeFunctionResult (fcache=0x214d908, econtext=0x214e2d8,
isNull=0x7ffdabec270f "", isDone=0x0) at execQual.c:1946
#16 0x000000000076e3f2 in ExecEvalFunc (fcache=0x214d908, econtext=0x214e2d8,
isNull=0x7ffdabec270f "", isDone=0x0) at execQual.c:2406
#17 0x00000000007746b8 in ExecEvalExprSwitchContext (expression=0x214d908, econtext=0x214e2d8,
isNull=0x7ffdabec270f "", isDone=0x0) at execQual.c:5144
#18 0x00000000008cb315 in evaluate_expr (expr=0x2156148, result_type=701, result_typmod=-1)
at clauses.c:3881
#19 0x00000000008ca798 in evaluate_function (funcid=16764, result_type=701, result_typmod=-1,
args=0x2156050, func_tuple=0x7fae6ead4c58, context=0x7ffdabec3ae0) at clauses.c:3482
#20 0x00000000008ca191 in simplify_function (funcid=16764, result_type=701, result_typmod=-1,
args=0x7ffdabec2850, allow_inline=1 '\001', context=0x7ffdabec3ae0) at clauses.c:3261
#21 0x00000000008c7cd8 in eval_const_expressions_mutator (node=0x21554c8, context=0x7ffdabec3ae0)
at clauses.c:2075
#22 0x00000000008cd235 in expression_tree_mutator (node=0x2155450,
mutator=0x8c79ec <eval_const_expressions_mutator>, context=0x7ffdabec3ae0) at clauses.c:4502
#23 0x00000000008c9c0f in eval_const_expressions_mutator (node=0x2155450, context=0x7ffdabec3ae0)
at clauses.c:2959
#24 0x00000000008cd32b in expression_tree_mutator (node=0x21553b0,
mutator=0x8c79ec <eval_const_expressions_mutator>, context=0x7ffdabec3ae0) at clauses.c:4538
#25 0x00000000008c9c0f in eval_const_expressions_mutator (node=0x21553b0, context=0x7ffdabec3ae0)
---Type <return> to continue, or q <return> to quit---
at clauses.c:2959
#26 0x00000000008cd82b in query_tree_mutator (query=0x2155e00,
mutator=0x8c79ec <eval_const_expressions_mutator>, context=0x7ffdabec3ae0, flags=0)
at clauses.c:4646
#27 0x00000000008ce202 in query_or_expression_tree_mutator (node=0x214b2f8,
mutator=0x8c79ec <eval_const_expressions_mutator>, context=0x7ffdabec3ae0, flags=0)
at clauses.c:4892
#28 0x00000000008c7712 in fold_constants (glob=0x214a600, q=0x214b2f8, boundParams=0x0,
max_size=102400) at clauses.c:1816
#29 0x00000000008bd084 in preprocess_query_optimizer (glob=0x214a600, query=0x214b2f8,
boundParams=0x0) at transform.c:57
#30 0x00000000008be225 in optimize_query (parse=0x214a738, boundParams=0x0) at orca.c:132
#31 0x000000000089e504 in standard_planner (parse=0x214a738, cursorOptions=0, boundParams=0x0)
at planner.c:205
#32 0x000000000089e456 in planner (parse=0x214a738, cursorOptions=0, boundParams=0x0)
at planner.c:163
#33 0x00000000009698d0 in pg_plan_query (querytree=0x214a738, cursorOptions=0, boundParams=0x0)
at postgres.c:915
#34 0x0000000000969a22 in pg_plan_queries (querytrees=0x2155288, cursorOptions=0, boundParams=0x0,
needSnapshot=0 '\000') at postgres.c:992
#35 0x000000000096afba in exec_simple_query (
query_string=0x21494d0 "select madlib.dist_jaccard('{1,-2,3}','{4,-5,6}');", seqServerHost=0x0,
seqServerPort=-1, serializedLogicPartCtx=0x0, serializedLogicPartCtxLen=0) at postgres.c:1718
#36 0x000000000096fcf3 in PostgresMain (argc=1, argv=0x1f4fd70, dbname=0x1f4fbb0 "madlib",
username=0x1f4fb70 "gpadmin") at postgres.c:4976
#37 0x00000000008fc33a in BackendRun (port=0x1f50f90) at postmaster.c:6781
#38 0x00000000008fb9c6 in BackendStartup (port=0x1f50f90) at postmaster.c:6455
#39 0x00000000008f4586 in ServerLoop () at postmaster.c:2447
#40 0x00000000008f2e8f in PostmasterMain (argc=15, argv=0x1f269c0) at postmaster.c:1531
#41 0x000000000080ade3 in main (argc=15, argv=0x1f269c0) at main.c:211
(gdb)
(gdb)
(gdb)

{code}

> 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
>
> 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)