[petsc-users] KSP_Solve crashes in debug mode

Sajid Ali Syed sasyed at fnal.gov
Thu Feb 9 17:03:48 CST 2023


I added “-malloc_debug” in a .petscrc file and ran it again. The backtrace from lldb is in the attached file. The crash now seems to be at:

Process 32660 stopped* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x16f603fb8)
    frame #0: 0x0000000112ecc8f8 libpetsc.3.018.dylib`PetscFPrintf(comm=0, fd=0x0000000000000000, format=0x0000000000000000) at mprint.c:601
   598               `PetscViewerASCIISynchronizedPrintf()`, `PetscSynchronizedFlush()`
   599      @*/
   600      PetscErrorCode PetscFPrintf(MPI_Comm comm, FILE *fd, const char format[], ...)
-> 601      {
   602       PetscMPIInt rank;
   603      
   604       PetscFunctionBegin;
(lldb) frame info
frame #0: 0x0000000112ecc8f8 libpetsc.3.018.dylib`PetscFPrintf(comm=0, fd=0x0000000000000000, format=0x0000000000000000) at mprint.c:601
(lldb)


The trace seems to indicate some sort of infinite loop causing an overflow.

PS: I'm using a arm64 mac, so I don't have access to valgrind.

Thank You,
Sajid Ali (he/him) | Research Associate
Scientific Computing Division
Fermi National Accelerator Laboratory
s-sajid-ali.github.io<http://s-sajid-ali.github.io>

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230209/2c87eaf0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb_ksp_crash_session
Type: application/octet-stream
Size: 6775342 bytes
Desc: lldb_ksp_crash_session
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230209/2c87eaf0/attachment-0001.obj>


More information about the petsc-users mailing list