lakeat
March 28, 2008, 3:42am
1
Hi experts,
A good day to you all.
With debug option, I compiled a big program called OpenFOAM (Written mainly in c++) on IRIX.
after it is finished, I got a SEGV when I executed it.
I noticed that the core file is quite a big block (800M)!
However, I can get very little information from it. I did:
and then
here's the outcome
This GDB was configured as "mips-sgi-irix6.5".
(gdb) core core
Core was generated by `wmkdep'.
Program terminated with signal 11, Segmentation fault.
warning: wrong size gregset struct in core file
warning: wrong size gregset struct in core file
#0 0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
what shall I do now?
what does it mean by saying "wrong size gregset struct in core file", is it fatal?
How can I use core file?
Thank you.
Daniel
Hi Daniel,
Use executable file also while analyzing the core file.
e.g.
gdb -e OpenFOAM -c core
This should give you better insight as i have noticed with my code.
Regards,
Vinod.
lakeat:
Hi experts,
A good day to you all.
With debug option, I compiled a big program called OpenFOAM (Written mainly in c++) on IRIX.
after it is finished, I got a SEGV when I executed it.
I noticed that the core file is quite a big block (800M)!
However, I can get very little information from it. I did:
and then
here's the outcome
what shall I do now?
what does it mean by saying "wrong size gregset struct in core file", is it fatal?
How can I use core file?
Thank you.
Daniel
lakeat
March 28, 2008, 5:00am
3
Thank you, Vinod,
Okay, here's what I got now.
onyx-bridge 12% ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 524288
memory(kbytes) 29096416
coredump(blocks) unlimited
nofiles(descriptors) 2500
vmemory(kbytes) unlimited
concurrency(threads) 1024
onyx-bridge 13% blockMesh
Segmentation fault (core dumped)
onyx-bridge 14% gdb
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5".
(gdb) core core
Core was generated by `blockMesh'.
Program terminated with signal 11, Segmentation fault.
warning: wrong size gregset struct in core file
warning: wrong size gregset struct in core file
#0 0x00000000 in ?? ()
(gdb) q
onyx-bridge 15% ls
blockMesh core extrudeMesh
onyx-bridge 16% rm core
onyx-bridge 17% gdb -e blockMesh -c core
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5".
/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/mesh/generation/core: No such file or directory.
(gdb) q
onyx-bridge 18% blockMesh
Illegal instruction (core dumped)
onyx-bridge 19% ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 524288
memory(kbytes) 29096416
coredump(blocks) unlimited
nofiles(descriptors) 2500
vmemory(kbytes) unlimited
concurrency(threads) 1024
onyx-bridge 20% gdb -e blockMesh -c core
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5".
warning: shared library handler failed to enable breakpoint
Core was generated by `blockMesh'.
Program terminated with signal 4, Illegal instruction.
You can't do that without a process to debug.
(gdb) bt
You can't do that without a process to debug.
(gdb) core core
warning: shared library handler failed to enable breakpoint
Core was generated by `blockMesh'.
Program terminated with signal 4, Illegal instruction.
You can't do that without a process to debug.
(gdb) q
onyx-bridge 21% gdb blockMesh core
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5"...
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libmeshTools.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libmeshTools.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libtriSurface.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libtriSurface.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/liblagrangian.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/liblagrangian.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libfiniteVolume.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libfiniteVolume.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libPstream.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libPstream.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libdynamicMesh.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libdynamicMesh.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libOpenFOAM.so...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libOpenFOAM.so
Reading symbols from /usr/lib32/libfpe.so...done.
Loaded symbols for /usr/lib32/libfpe.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libstdc++.so.6...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libstdc++.so.6
Reading symbols from /usr/lib32/libm.so...done.
Loaded symbols for /usr/lib32/libm.so
Reading symbols from /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libgcc_s.so.1...done.
Loaded symbols for /disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libgcc_s.so.1
Reading symbols from /usr/lib32/libc.so.1...done.
Loaded symbols for /usr/lib32/libc.so.1
Reading symbols from /usr/lib32/libz.so...done.
Loaded symbols for /usr/lib32/libz.so
You can't do that without a process to debug.
(gdb) bt
You can't do that without a process to debug.
Regards,
Daniel
lakeat
March 28, 2008, 5:02am
4
What makes me frustrated, I couldn't see anything useful.
Daniel
V3l0
March 28, 2008, 11:05am
5
Look in your code in
warning: shared library handler failed to enable breakpoint
Core was generated by `blockMesh'.
Program terminated with signal 4, Illegal instruction.
lakeat
March 29, 2008, 10:06am
6
In fact, there's no problem at all under any linux system, I can use it very well under OpenSUSE, Fedora, or Ubuntu.
No offence V3l0, I mean the answer is not an easy one to have and blockMesh is above reproach.
On sgi-Irix6.5, after a core dump, I was adviced to perform a "strace", but I got the following information:
ERROR: tracer already exists
what shall I do now?
I am justing wandering, dear experts, what is the best way to locate the problem, to diagnose the diseases?
Daniel
Lazzar
March 30, 2008, 9:17am
7
> gdb blockMesh core
and then when gdb did load the libraries and core file:
(gdb) bt
this should give you the backtrace when the programm died.
i'm not sure why it didn't work for you.
Alternatively you can start the program directly in gdb and issue bt after the prog died.
> gdb blockMesh
(gdb) run
lakeat
March 31, 2008, 1:50am
8
Thank you all, and thank you Lazzar, I appreciate it.
what you adviced I have tried before, it is something like this
onyx-bridge 13% blockMesh
Segmentation fault (core dumped)
onyx-bridge 14% gdb
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.5".
(gdb) core core
Core was generated by `blockMesh'.
Program terminated with signal 11, Segmentation fault.
warning: wrong size gregset struct in core file
warning: wrong size gregset struct in core file
#0 0x00000000 in ?? ()
(gdb)
And I dont know what do these warning and error really mean!
And another question, is there a subforum for sgi-IRIX under this forum?
Daniel
Lazzar
March 31, 2008, 2:57pm
9
maybe you could try with dbx instead gdb if it is installed.
in dbx you type 'where' instead of 'bt' to get the backtrace.
MySQL Bugs: #25344: Segmentation violation when try to run the perror utility
the above link shows a case where gdb didn't work, but dbx showed a useful backtrace on irix.
lakeat
April 1, 2008, 8:46pm
10
Thank you Lazzar, that helps.
With dbx I have found a little bit more information than gdb.
However, I am still very frustrated, for the dbx show me as if something wrong with a *.C file, however, there's no problem at all when I compile it under any linux, that is to say, it shouldn't have to be the problem.
So, I doubt whether dbx have given me the right information!!!
CFD codes is extremely huge! I will keep on looking.
Best Regards,
Daniel