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

Segfaults or aborts #99

Closed
sharanbngr opened this issue Feb 6, 2018 · 4 comments
Closed

Segfaults or aborts #99

sharanbngr opened this issue Feb 6, 2018 · 4 comments

Comments

@sharanbngr
Copy link

sharanbngr commented Feb 6, 2018

I get segfault: 11 or abort: on running pymultinest with some parameter estimation code I have. Sometimes this is associated with an error from malloc but not always. The stack trace varies, but it always include the following,

[er-10-128-232-152:53104] [ 0] 0 libsystem_platform.dylib 0x00007fff5db82f5a _sigtramp + 26

Any help with this is really appreciated. I am running this on my personal laptop. I can run the demo scripts included with pymultinest without errors. However I think the problem is not with my code as I can run it in other clusters without errors. I include some of the stack traces below. Thanks again!

` *****************************************************
 MultiNest v3.10
 Copyright Farhan Feroz & Mike Hobson
 Release Jul 2015

 no. of live points =  100
 dimensionality =    2
 *****************************************************
 Starting MultiNest
 generating live points
[er-10-128-232-152:53610] *** Process received signal ***
[er-10-128-232-152:53610] Signal: Segmentation fault: 11 (11)
[er-10-128-232-152:53610] Signal code:  (0)
[er-10-128-232-152:53610] Failing at address: 0x0
[er-10-128-232-152:53610] [ 0] 0   libsystem_platform.dylib            0x00007fff5db82f5a _sigtramp + 26
[er-10-128-232-152:53610] [ 1] 0   multiarray.so                       0x00000001072b4388 LONG_Descr + 0
[er-10-128-232-152:53610] [ 2] 0   libsystem_malloc.dylib              0x00007fff5daa9403 szone_malloc_should_clear + 422
[er-10-128-232-152:53610] [ 3] 0   libsystem_malloc.dylib              0x00007fff5daa9201 malloc_zone_malloc + 103
[er-10-128-232-152:53610] [ 4] 0   libsystem_malloc.dylib              0x00007fff5daa850b malloc + 24
[er-10-128-232-152:53610] [ 5] 0   multiarray.so                       0x0000000107179357 PyArray_NewFromDescr_int + 1415
[er-10-128-232-152:53610] [ 6] 0   multiarray.so                       0x000000010717988e PyArray_NewFromDescr + 46
[er-10-128-232-152:53610] [ 7] 0   umath.so                            0x000000010745f548 PyUFunc_GenericFunction + 7080
[er-10-128-232-152:53610] [ 8] 0   umath.so                            0x00000001074631e3 ufunc_generic_call + 291
[er-10-128-232-152:53610] [ 9] 0   Python                              0x00007fff40555581 PyObject_Call + 97
[er-10-128-232-152:53610] [10] 0   Python                              0x00007fff405cbf76 PyEval_EvalFrameEx + 2898
[er-10-128-232-152:53610] [11] 0   Python                              0x00007fff405cb232 PyEval_EvalCodeEx + 1551
[er-10-128-232-152:53610] [12] 0   Python                              0x00007fff405d12b4 _PyEval_SliceIndex + 504
[er-10-128-232-152:53610] [13] 0   Python                              0x00007fff405cbb45 PyEval_EvalFrameEx + 1825
[er-10-128-232-152:53610] [14] 0   Python                              0x00007fff405cb232 PyEval_EvalCodeEx + 1551
[er-10-128-232-152:53610] [15] 0   Python                              0x00007fff405d12b4 _PyEval_SliceIndex + 504
[er-10-128-232-152:53610] [16] 0   Python                              0x00007fff405cbb45 PyEval_EvalFrameEx + 1825
[er-10-128-232-152:53610] [17] 0   Python                              0x00007fff405cb232 PyEval_EvalCodeEx + 1551
[er-10-128-232-152:53610] [18] 0   Python                              0x00007fff405d12b4 _PyEval_SliceIndex + 504
[er-10-128-232-152:53610] [19] 0   Python                              0x00007fff405cbb45 PyEval_EvalFrameEx + 1825
[er-10-128-232-152:53610] [20] 0   Python                              0x00007fff405cb232 PyEval_EvalCodeEx + 1551
[er-10-128-232-152:53610] [21] 0   Python                              0x00007fff40572935 PyFunction_SetClosure + 802
[er-10-128-232-152:53610] [22] 0   Python                              0x00007fff40555581 PyObject_Call + 97
[er-10-128-232-152:53610] [23] 0   Python                              0x00007fff405d0bfe PyEval_CallObjectWithKeywords + 159
[er-10-128-232-152:53610] [24] 0   _ctypes.so                          0x000000010754ed6f _ctypes_alloc_callback + 1062
[er-10-128-232-152:53610] [25] 0   libffi.dylib                        0x00007fff5c3289f3 ffi_closure_unix64_inner + 487
[er-10-128-232-152:53610] [26] 0   libffi.dylib                        0x00007fff5c3280e6 ffi_closure_unix64 + 70
[er-10-128-232-152:53610] [27] 0   libmultinest.dylib                  0x000000010c936e0b __nested_MOD_gen_initial_live + 6030
[er-10-128-232-152:53610] [28] 0   libmultinest.dylib                  0x000000010c938290 __nested_MOD_nestsample + 3498
[er-10-128-232-152:53610] [29] 0   libmultinest.dylib                  0x000000010c939bd2 __nested_MOD_nestrun + 5259
[er-10-128-232-152:53610] *** End of error message ***`
*****************************************************
 MultiNest v3.10
 Copyright Farhan Feroz & Mike Hobson
 Release Jul 2015

 no. of live points =  100
 dimensionality =    2
 *****************************************************
 Starting MultiNest
 generating live points
[er-10-128-232-152:53293] *** Process received signal ***
[er-10-128-232-152:53293] Signal: Segmentation fault: 11 (11)
[er-10-128-232-152:53293] Signal code:  (0)
[er-10-128-232-152:53293] Failing at address: 0x0
[er-10-128-232-152:53293] [ 0] 0   libsystem_platform.dylib            0x00007fff5db82f5a _sigtramp + 26
[er-10-128-232-152:53293] [ 1] 0   ???                                 0x0000000000000000 0x0 + 0
[er-10-128-232-152:53293] [ 2] 0   Python                              0x00007fff40595cc6 PyType_Modified + 93
[er-10-128-232-152:53293] [ 3] 0   Python                              0x00007fff40595c5b PyType_ClearCache + 115
[er-10-128-232-152:53293] [ 4] 0   Python                              0x00007fff405e8fb1 Py_Finalize + 281
[er-10-128-232-152:53293] [ 5] 0   Python                              0x00007fff405fa9e7 Py_Main + 3187
[er-10-128-232-152:53293] [ 6] 0   libdyld.dylib                       0x00007fff5d901115 start + 1
[er-10-128-232-152:53293] [ 7] 0   ???                                 0x0000000000000003 0x0 + 3
[er-10-128-232-152:53293] *** End of error message ***
Segmentation fault: 11
@JohannesBuchner
Copy link
Owner

Probably a duplicate of #45. Try a different MPI implementation.

@sharanbngr
Copy link
Author

sharanbngr commented Feb 7, 2018

Hi @JohannesBuchner . The error is just with pymultinest, I wasn't using MPI.

@JohannesBuchner
Copy link
Owner

Hmm. Try to find the input parameters that produce the segfault results and try to make it reproducible. Its probably in one of the numerical libraries you use (not pymultinest). gdb would also help you track down the segfault place.

@sharanbngr
Copy link
Author

sharanbngr commented Feb 9, 2018

I have used gdb and it looks like it happens with libmultinest.so. I have been trying to make it reproducible, but I wanted to post the backtrace if its is of any help

(gdb) bt
#0  0xb7fd9ce5 in __kernel_vsyscall ()
#1  0xb7e18ea9 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#2  0xb7e1a407 in __GI_abort () at abort.c:89
#3  0xb7e5437c in __libc_message (do_abort=2, fmt=0xb7f4ce54 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#4  0xb7e5a2f7 in malloc_printerr (action=<optimized out>, str=0xb7f4cec4 "double free or corruption (!prev)", ptr=<optimized out>, ar_ptr=0xb7f9f780 <main_arena>) at malloc.c:5006
#5  0xb7e5ac31 in _int_free (av=0xb7f9f780 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3867
#6  0xb36254f1 in __nested_MOD_gen_initial_live () from /home/sharan/bayesPE/MultiNest/MultiNest/lib/libmultinest.so
#7  0xb36263a2 in __nested_MOD_nestsample () from /home/sharan/bayesPE/MultiNest/MultiNest/lib/libmultinest.so
#8  0xb3627d64 in __nested_MOD_nestrun () from /home/sharan/bayesPE/MultiNest/MultiNest/lib/libmultinest.so
#9  0xb35e838f in run () from /home/sharan/bayesPE/MultiNest/MultiNest/lib/libmultinest.so
#10 0xb7fcfe3a in ffi_call_SYSV () from /usr/lib/i386-linux-gnu/libffi.so.6
#11 0xb7fcfaac in ffi_call () from /usr/lib/i386-linux-gnu/libffi.so.6
#12 0xb603636f in _call_function_pointer (argcount=24, resmem=0xbfffe5d0, restype=0xb7a98734, atypes=0xbfffe4f0, avalues=0xbfffe560, pProc=0xb35e8196 <run>, flags=4353) at /build/python2.7-wOdbWs/python2.7-2.7.12/Modules/_ctypes/callproc.c:837
#13 _ctypes_callproc (pProc=0xb35e8196 <run>, argtuple=0xb295e194, flags=4353, argtypes=0x0, restype=0xb60555b4, checker=0x0) at /build/python2.7-wOdbWs/python2.7-2.7.12/Modules/_ctypes/callproc.c:1180
#14 0xb603b2d1 in PyCFuncPtr_call.lto_priv.107 (self=0xb369db8c, inargs=0xb295e194, kwds=0x0) at /build/python2.7-wOdbWs/python2.7-2.7.12/Modules/_ctypes/_ctypes.c:3954
#15 0x080e8400 in PyObject_Call () at ../Objects/abstract.c:2546
#16 0x080ff641 in ext_do_call (nk=<optimized out>, na=<optimized out>, flags=<optimized out>, pp_stack=<optimized out>, func=0xb369db8c) at ../Python/ceval.c:4664
#17 PyEval_EvalFrameEx () at ../Python/ceval.c:3026
#18 0x080facc5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582
#19 0x08102165 in fast_function (nk=5, na=<optimized out>, n=<optimized out>, pp_stack=0xbfffeadc, func=<optimized out>) at ../Python/ceval.c:4445
#20 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4370
#21 PyEval_EvalFrameEx () at ../Python/ceval.c:2987
#22 0x080facc5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582
#23 0x08102165 in fast_function (nk=0, na=<optimized out>, n=<optimized out>, pp_stack=0xbfffec3c, func=<optimized out>) at ../Python/ceval.c:4445
#24 call_function (oparg=<optimized out>, pp_stack=<optimized out>) at ../Python/ceval.c:4370
#25 PyEval_EvalFrameEx () at ../Python/ceval.c:2987
#26 0x080facc5 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582
#27 0x0812903c in PyEval_EvalCode (locals=<optimized out>, globals=0xb7d6a714, co=0xb7d244e8) at ../Python/ceval.c:669
#28 run_mod.lto_priv () at ../Python/pythonrun.c:1376
#29 0x08124548 in PyRun_FileExFlags () at ../Python/pythonrun.c:1362
#30 0x0812309b in PyRun_SimpleFileExFlags () at ../Python/pythonrun.c:948
#31 0x080d6f70 in Py_Main () at ../Modules/main.c:640
#32 0x080d6a0b in main (argc=3, argv=0xbfffef64) at ../Modules/python.c:20

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

No branches or pull requests

2 participants