Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jvm-packages] XGBoostJNI.XGBoosterPredict multi-thread called, then jvm crash. #3027

Closed
matrixlibing opened this issue Jan 11, 2018 · 0 comments

Comments

@matrixlibing
Copy link

matrixlibing commented Jan 11, 2018

crash info :
*** Error in `/usr/lib/jvm/jdk1.8.0_152/bin/java': corrupted size vs. prev_size: 0x00007f3158022d00 ***

Environment info

Operating System: Ubuntu 14.04 LTS

Compiler: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

Package used (python/R/jvm/C++): jvm

xgboost version used: v0.60

If installing from source, please provide

  1. The commit hash (git rev-parse HEAD)
    '4a8d63b6c8711fb839c71e26c659936252df1eb5'
  2. Logs will be helpful (If logs are large, please upload as attachment).

(gdb) bt
#0 0x00007f0e36a7ac37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f0e36a7e028 in __GI_abort () at abort.c:89
#2 0x00007f0e36ab72a4 in __libc_message (do_abort=do_abort@entry=1,
fmt=fmt@entry=0x7f0e36bc9310 "*** Error in `%s': %s: 0x%s \n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007f0e36ac382e in malloc_printerr (ptr=, str=0x7f0e36bc94d8 "double free or corruption (fasttop)", action=1)
at malloc.c:4998
#4 _int_free (av=, p=, have_lock=0) at malloc.c:3842
#5 0x00007f0dfde2fa4b in void std::vector<XGBAPIThreadLocalEntry
, std::allocator<XGBAPIThreadLocalEntry
> >::_M_emplace_back_aux<XGBAPIThreadLocalEntry
const&>(XGBAPIThreadLocalEntry* const&) () from /tmp/libxgboost4j8492379076807211327.so
#6 0x00007f0dfde250c6 in XGBoosterPredict () from /tmp/libxgboost4j8492379076807211327.so
#7 0x00007f0dfde08566 in Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGBoosterPredict () from /tmp/libxgboost4j8492379076807211327.so
#8 0x00007f0e21017a34 in ?? ()
#9 0x00007f0e09941120 in ?? ()
#10 0x0000000409941110 in ?? ()
#11 0x00007f0e184a7000 in ?? ()
#12 0x0000000000000000 in ?? ()

Steps to reproduce

write a java project with a multi-thread
each thread new ml.dmlc.xgboost4j.java.XGBoost.loadModel(dataInStream);
then call Booster.predict(DMatrix data, boolean outputMargin, int treeLimit)

What have you tried?

  1. dump the jvm core file
    2.gdb java core,then bt
    #0 0x00007f0e36a7ac37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
    2.0 version, lots of changes #1 0x00007f0e36a7e028 in __GI_abort () at abort.c:89
    fix loss_type #2 0x00007f0e36ab72a4 in __libc_message (do_abort=do_abort@entry=1,
    fmt=fmt@entry=0x7f0e36bc9310 "*** Error in `%s': %s: 0x%s \n") at ../sysdeps/posix/libc_fatal.c:175
    Missing -lgomp when installing #3 0x00007f0e36ac382e in malloc_printerr (ptr=, str=0x7f0e36bc94d8 "double free or corruption (fasttop)", action=1)
    at malloc.c:4998
    Python Module in Mac #4 _int_free (av=, p=, have_lock=0) at malloc.c:3842
    add return type for xgboost, don't know if it is mac problem #5 0x00007f0dfde2fa4b in void std::vector<XGBAPIThreadLocalEntry
    , std::allocator<XGBAPIThreadLocalEntry
    > >::_M_emplace_back_aux<XGBAPIThreadLocalEntry
    const&>(XGBAPIThreadLocalEntry* const&) () from /tmp/libxgboost4j8492379076807211327.so
    Fix the bug in MAC #6 0x00007f0dfde250c6 in XGBoosterPredict () from /tmp/libxgboost4j8492379076807211327.so
    Compatibility with both Python 2(.7) and 3 #7 0x00007f0dfde08566 in Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGBoosterPredict () from /tmp/libxgboost4j8492379076807211327.so
    xgboost generates root-only trees for python example #8 0x00007f0e21017a34 in ?? ()
    Reproducible random seeds #9 0x00007f0e09941120 in ?? ()
    Error:buffer_indexexceed num_pbuffer #10 0x0000000409941110 in ?? ()
    Determine feature importances #11 0x00007f0e184a7000 in ?? ()
    evalutating only the first n classifiers in an ensemble #12 0x0000000000000000 in ?? ()
@tqchen tqchen closed this as completed Jul 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants