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

Segmentation fault in LGBM_BoosterFree () when send SIGINT to a running process #3030

Open
sh1ng opened this issue Apr 28, 2020 · 1 comment
Labels

Comments

@sh1ng
Copy link
Contributor

sh1ng commented Apr 28, 2020

Environment info

Operating System: Ubuntu Linux 18

CPU/GPU model: GPU

C++/Python/R version: 2.3.1 and 2.2.4

Error message

[Current thread is 1 (Thread 0x7f02151e6740 (LWP 14089))]
(gdb) bt
#0  0x00007f01e9938719 in LGBM_BoosterFree ()
   from /home/sh1ng/dev/h2oai_env/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
#1  0x00007f01fe7b7dae in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#2  0x00007f01fe7b771f in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#3  0x00007f01fe9cb5c4 in _call_function_pointer (argcount=1, resmem=0x7ffc40063260, restype=<optimized out>, 
    atypes=0x7ffc40063240, avalues=0x7ffc40063250, pProc=0x7f01e99386f0 <LGBM_BoosterFree>, flags=4353)
    at ./Modules/_ctypes/callproc.c:831
#4  _ctypes_callproc () at ./Modules/_ctypes/callproc.c:1195
#5  0x00007f01fe9cbc33 in PyCFuncPtr_call () at ./Modules/_ctypes/_ctypes.c:3970
#6  0x00000000005aa69c in _PyObject_FastCallKeywords ()
#7  0x000000000050ab53 in ?? ()
#8  0x000000000050c549 in _PyEval_EvalFrameDefault ()
#9  0x00000000005093e5 in _PyFunction_FastCallDict ()
#10 0x00000000005951c1 in ?? ()
#11 0x00000000005a508c in _PyObject_FastCallDict ()
#12 0x000000000061a5e1 in ?? ()
#13 0x000000000055c215 in PyObject_CallFinalizerFromDealloc ()
#14 0x000000000054f417 in ?? ()
#15 0x00000000005891e8 in ?? ()
#16 0x00000000005add18 in ?? ()
#17 0x00000000005add2e in ?? ()
#18 0x00000000005add2e in ?? ()
#19 0x00000000005add2e in ?? ()
#20 0x00000000005add2e in ?? ()
#21 0x00000000005add2e in ?? ()
#22 0x000000000050e687 in _PyEval_EvalFrameDefault ()
#23 0x0000000000509ce8 in ?? ()

#0  0x00007f12d1fb0b9e in std::default_delete<LightGBM::ObjectiveFunction>::operator() (__ptr=0x41b3aa0, 
    this=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:78
78		delete __ptr;
[Current thread is 1 (Thread 0x7f1336002740 (LWP 15268))]
(gdb) bt
#0  0x00007f12d1fb0b9e in std::default_delete<LightGBM::ObjectiveFunction>::operator() (__ptr=0x41b3aa0, 
    this=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:78
#1  std::unique_ptr<LightGBM::ObjectiveFunction, std::default_delete<LightGBM::ObjectiveFunction> >::~unique_ptr (
    this=0x3e4de10, __in_chrg=<optimized out>) at /usr/include/c++/7/bits/unique_ptr.h:263
#2  LightGBM::Booster::~Booster (this=0x3e4d870, __in_chrg=<optimized out>)
    at /home/sh1ng/dev/h2o4gpu/LightGBM/src/c_api.cpp:89
#3  LGBM_BoosterFree (handle=0x3e4d870) at /home/sh1ng/dev/h2o4gpu/LightGBM/src/c_api.cpp:1054
#4  0x00007f1321da5dae in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007f1321da571f in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007f1321fb95c4 in _call_function_pointer (argcount=1, resmem=0x7fffe24add10, restype=<optimized out>, 
    atypes=0x7fffe24adcf0, avalues=0x7fffe24add00, pProc=0x7f12d1fb0b75 <LGBM_BoosterFree(BoosterHandle)>, flags=4353)
    at ./Modules/_ctypes/callproc.c:831
#7  _ctypes_callproc () at ./Modules/_ctypes/callproc.c:1195
#8  0x00007f1321fb9c33 in PyCFuncPtr_call () at ./Modules/_ctypes/_ctypes.c:3970
#9  0x00000000005aa69c in _PyObject_FastCallKeywords ()
#10 0x000000000050ab53 in ?? ()
#11 0x000000000050c549 in _PyEval_EvalFrameDefault ()
#12 0x00000000005093e5 in _PyFunction_FastCallDict ()
#13 0x00000000005951c1 in ?? ()
#14 0x00000000005a508c in _PyObject_FastCallDict ()
#15 0x000000000061a5e1 in ?? ()
#16 0x000000000055c215 in PyObject_CallFinalizerFromDealloc ()
#17 0x000000000054f417 in ?? ()
#18 0x00000000005891e8 in ?? ()
#19 0x00000000005add18 in ?? ()
#20 0x00000000005add2e in ?? ()
#21 0x00000000005add2e in ?? ()

more detailed stacktrace from lgbm 2.2.4 compiled with -g O1

Reproducible examples

test.zip

@sh1ng sh1ng changed the title Segmentation fault in LGBM_BoosterFree () Segmentation fault in LGBM_BoosterFree () when send SIGINT to a running process Apr 28, 2020
@guolinke
Copy link
Collaborator

guolinke commented Aug 6, 2020

@sh1ng very sorry for the late response!
Just double confirm, this only happens in GPU, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants