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

MTUQ plot figures problems #265

Open
tonino0013 opened this issue May 21, 2024 · 2 comments
Open

MTUQ plot figures problems #265

tonino0013 opened this issue May 21, 2024 · 2 comments

Comments

@tonino0013
Copy link

Hello,

I have installed the MTUQ through CONDA environment (following the instructions), no problem so far.

My O.S. is:

Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04

While I try to run the examples I got these messages:


Evaluating surface wave misfit...

  Number of misfit evaluations: 8.400e+05

  about 0 percent finished
  about 25 percent finished
  about 50 percent finished
  about 75 percent finished
  Elapsed time (s): 164.131579

Generating figures...

while trying to have the figures I obtain this:

double free or corruption (out)
Aborted (core dumped)

Trying to do some debug I found:

[Detaching after vfork from child process 33122]
double free or corruption (out)


Thread 1 "python" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7c62859 in __GI_abort () at abort.c:79
#2  0x00007ffff7ccd26e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7df7298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff7cd52fc in malloc_printerr (str=str@entry=0x7ffff7df9670 "double free or corruption (out)") at malloc.c:5347
#4  0x00007ffff7cd6fa0 in _int_free (av=0x7ffff7e2cb80 <main_arena>, p=0x555560ae8ab0, have_lock=<optimized out>) at malloc.c:4314
#5  0x00007fffd281d4de in gmtlib_free_vector_ptr () from /home/asus/anaconda3/envs/mtuq/lib/libgmt.so
#6  0x00007fffd27a5b31 in gmtapi_destroy_data_ptr () from /home/asus/anaconda3/envs/mtuq/lib/libgmt.so
#7  0x00007fffd27b460b in gmtlib_garbage_collection () from /home/asus/anaconda3/envs/mtuq/lib/libgmt.so
#8  0x00007fffd27b4949 in GMT_Destroy_Session () from /home/asus/anaconda3/envs/mtuq/lib/libgmt.so
#9  0x00007ffff7096052 in ffi_call_unix64 () from /home/asus/anaconda3/envs/mtuq/lib/python3.12/lib-dynload/../../libffi.so.8
#10 0x00007ffff7094925 in ffi_call_int () from /home/asus/anaconda3/envs/mtuq/lib/python3.12/lib-dynload/../../libffi.so.8
#11 0x00007ffff709506e in ffi_call () from /home/asus/anaconda3/envs/mtuq/lib/python3.12/lib-dynload/../../libffi.so.8
#12 0x00007ffff70b04a9 in _call_function_pointer (argtypecount=<optimized out>, argcount=1, resmem=0x7fffffffc930, restype=<optimized out>, atypes=<optimized out>, 
    avalues=<optimized out>, pProc=0x7fffd27b48f0 <GMT_Destroy_Session>, flags=4353) at /usr/local/src/conda/python-3.12.3/Modules/_ctypes/callproc.c:931
#13 _ctypes_callproc (pProc=0x7fffd27b48f0 <GMT_Destroy_Session>, argtuple=<optimized out>, flags=4353, argtypes=<optimized out>, restype=<optimized out>, checker=0x0)
    at /usr/local/src/conda/python-3.12.3/Modules/_ctypes/callproc.c:1273
#14 0x00007ffff70a5b31 in PyCFuncPtr_call (self=<optimized out>, inargs=<optimized out>, kwds=0x0) at /usr/local/src/conda/python-3.12.3/Modules/_ctypes/_ctypes.c:4167
#15 0x000055555575f04b in _PyObject_MakeTpCall (tstate=0x555555bee728 <_PyRuntime+459656>, callable=0x7fffd2dc8f50, args=<optimized out>, nargs=1, keywords=0x0)
    at /usr/local/src/conda/python-3.12.3/Include/object.h:704
#16 0x0000555555666fd9 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7ffff7fbcc68, throwflag=<optimized out>) at Python/bytecodes.c:2706
#17 0x00005555557ad03c in _PyEval_EvalFrame (throwflag=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, 
    frame=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, tstate=0x555555bee728 <_PyRuntime+459656>)
    at /usr/local/src/conda/python-3.12.3/Include/internal/pycore_ceval.h:85
--Type <RET> for more, q to quit, c to continue without paging--
#18 _PyEval_Vector (kwnames=0x0, argcount=4, args=0x7ffff7fbcba0, locals=0x0, func=0x7fffd2e01760, tstate=0x555555bee728 <_PyRuntime+459656>)
    at /usr/local/src/conda/python-3.12.3/Python/ceval.c:1683
#19 _PyFunction_Vectorcall (kwnames=0x0, nargsf=<optimized out>, stack=0x7ffff7fbcba0, func=0x7fffd2e01760) at /usr/local/src/conda/python-3.12.3/Objects/call.c:419
#20 _PyObject_VectorcallTstate (tstate=<optimized out>, callable=0x7fffd2e01760, args=0x7ffff7fbcba0, nargsf=<optimized out>, kwnames=0x0)
    at /usr/local/src/conda/python-3.12.3/Include/internal/pycore_call.h:92
#21 0x00005555557acbbd in method_vectorcall (method=<optimized out>, args=0x7ffff7fbcba8, nargsf=<optimized out>, kwnames=0x0)
    at /usr/local/src/conda/python-3.12.3/Objects/classobject.c:61
#22 0x0000555555773fbf in _PyObject_VectorcallTstate (kwnames=0x0, kwnames@entry=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, 
    nargsf=9223372036854775811, nargsf@entry=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, args=0x7ffff7fbcba8, 
    args@entry=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, callable=0x7fffe2be8f40, 
    callable@entry=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>, tstate=0x555555bee728 <_PyRuntime+459656>, 
    tstate@entry=<error reading variable: dwarf2_find_location_expression: Corrupted DWARF expression.>)
    at /usr/local/src/conda/python-3.12.3/Include/internal/pycore_call.h:77
#23 PyObject_Vectorcall (callable=0x7fffe2be8f40, args=0x7ffff7fbcba8, nargsf=9223372036854775811, kwnames=0x0) at /usr/local/src/conda/python-3.12.3/Objects/call.c:325
#24 0x0000555555666fd9 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=0x7ffff7fbca98, throwflag=<optimized out>) at Python/bytecodes.c:2706
#25 0x000055555581940e in PyEval_EvalCode (co=0x555555d5dc90, globals=<optimized out>, locals=0x7ffff71d9580) at /usr/local/src/conda/python-3.12.3/Python/ceval.c:578
#26 0x000055555583d11a in run_eval_code_obj (tstate=0x555555bee728 <_PyRuntime+459656>, co=0x555555d5dc90, globals=0x7ffff71d9580, locals=0x7ffff71d9580)
    at /usr/local/src/conda/python-3.12.3/Python/pythonrun.c:1722
#27 0x000055555583830b in run_mod (mod=<optimized out>, filename=0x7ffff72cded0, globals=0x7ffff71d9580, locals=0x7ffff71d9580, flags=0x7fffffffd250, arena=0x7ffff734d830)
    at /usr/local/src/conda/python-3.12.3/Python/pythonrun.c:1743
#28 0x0000555555851120 in pyrun_file (fp=0x555555c28ea0, filename=0x7ffff72cded0, start=<optimized out>, globals=0x7ffff71d9580, locals=0x7ffff71d9580, closeit=1, 
    flags=0x7fffffffd250) at /usr/local/src/conda/python-3.12.3/Python/pythonrun.c:1643
#29 0x0000555555850c6e in _PyRun_SimpleFileObject (fp=0x555555c28ea0, filename=0x7ffff72cded0, closeit=1, flags=0x7fffffffd250)
--Type <RET> for more, q to quit, c to continue without paging--
    at /usr/local/src/conda/python-3.12.3/Python/pythonrun.c:433
#30 0x00005555558503b4 in _PyRun_AnyFileObject (fp=0x555555c28ea0, filename=0x7ffff72cded0, closeit=1, flags=0x7fffffffd250)
    at /usr/local/src/conda/python-3.12.3/Python/pythonrun.c:78
#31 0x0000555555848a22 in pymain_run_file_obj (skip_source_first_line=0, filename=0x7ffff72cded0, program_name=0x7ffff7118ff0)
    at /usr/local/src/conda/python-3.12.3/Modules/main.c:360
#32 pymain_run_file (config=0x555555b91308 <_PyRuntime+77672>) at /usr/local/src/conda/python-3.12.3/Modules/main.c:379
#33 pymain_run_python (exitcode=0x7fffffffd224) at /usr/local/src/conda/python-3.12.3/Modules/main.c:629
#34 Py_RunMain () at /usr/local/src/conda/python-3.12.3/Modules/main.c:709
#35 0x0000555555801997 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at /usr/local/src/conda/python-3.12.3/Modules/main.c:763
#36 0x00007ffff7c64083 in __libc_start_main (main=0x5555558018d0 <main>, argc=2, argv=0x7fffffffd488, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffd478) at ../csu/libc-start.c:308
#37 0x0000555555801811 in _start () at /usr/local/src/conda/python-3.12.3/Parser/parser.c:41555

It seems that GMT is broken, does anybody have this error?

Thanks in advance

@thurinj
Copy link
Member

thurinj commented May 23, 2024

Hello @tonino0013,

Thanks for reporting the error. It indeed seems like an issue related to GMT, as indicated by the memory-related error occurring during the GMT garbage collection process.

Could you please let us know how you installed GMT? Specifically, did you use conda install 'pygmt=0.9', or was GMT installed in your Python environment before installing MTUQ?

Additionally, can you check if GMT/pygmt works outside of the MTUQ script? You can test this by running a simple pygmt command to see if it functions correctly.

Please also verify the versions of GMT and pygmt that your environment is using. You can do this by running the following Python code:

import pygmt
print(pygmt.__version__)
print(pygmt.__gmt_version__)

I hope we'll be able to help. We are also planning to release a version of MTUQ without as much dependencies to GMT as the current one, as GMT has been problematic in a few instances.

Thank you!

@tonino0013
Copy link
Author

Hello @thurinj ,

Thank you for the prompt answer.

PyGMT was installed before, I updated to v0.12, I must downgrade this version right?

I applied CONDA to install PyGMT, I think GMT was installed within PyGMT procedure.

print(pygmt.__gmt_version__)
The last command shows me an error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pygmt' has no attribute '__gmt_version__'. Did you mean: '__version__'?

Let me downgrade the PyGMT to 0.9 version and I will let you known.

Stay safe,

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