xgboost icon indicating copy to clipboard operation
xgboost copied to clipboard

JVM is restarted when System.load("lib/linux/aarch64/libxgboost4j.so")

Open ngocnam1202 opened this issue 3 years ago • 2 comments

I'm building the jar file for xgboost4j that supports Linux aarch64. According to this document, I can build the shared object now, and my jar file also contains that shared object at lib/linux/aarch64/libxgboost4j.so

To test the jar, I use it as a library in my application and call new ml.dmlc.xgboost4j.java.DMatrix(""); It will call XGBoostJNI >>> NativeLibLoader.initXGBoost() >>> System.load(temp); The problem is JVM will be restarted when exec System.load(temp);

First time image

After installing libgomp No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again image

After running ulimit -c unlimited image

Running java with -XX:+CreateCoredumpOnCrash image

hs_err_pid286.log hs_err_pid338.log hs_err_pid357.log

ngocnam1202 avatar Feb 21 '23 05:02 ngocnam1202

This is the definition of the split function:

inline std::vector<std::string> Split(const std::string& s, char delim) {
  std::string item;
  std::istringstream is(s);
  std::vector<std::string> ret;
  while (std::getline(is, item, delim)) {
    ret.push_back(item);
  }
  return ret;
}

I don't think there's anything obvious there that can cause a segfault. Maybe the c++ tool chain (along with glibc) is not correctly configured?

trivialfis avatar Feb 25 '23 22:02 trivialfis

Closing due to lack of response. Feel free to reopen if there's further available information.

trivialfis avatar Mar 28 '23 17:03 trivialfis