LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2007, 07:27 PM   #1
lakeat
LQ Newbie
 
Registered: May 2007
Location: Shanghai
Distribution: Fedora, Kubuntu, IRIX
Posts: 11

Rep: Reputation: 0
Question SigFault no progress exists:(


Hello,


If the program failed with an error SIGFAULT, and no progress to debug, what shall I do now? Like this:
---------------------------------------------------------------
% gdb ico
...
(gdb) r
Starting program: .../ico

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
You can't do that without a process to debug.
(gdb) bt
No stack.
(gdb) q
----------------------------------------------------------------

After type
% ico
I got a core dump
And then I
% gdb ico core*
...
But I didn't see any information useful.


Could anyone give me some favor, I really appreciate it.



Daniel
 
Old 12-05-2007, 12:04 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
When you have loaded the program and it's core dump, do a backtrace to see where the program failed. The command is bt. You can change the stack frame with the frame command. For example, I made a little test program called t which calls a function called "myfunc" which causes a SEGFAULT:
Code:
% cat t.c
#include <stdlib.h>
#include <string.h>

int myfunc() {
        char* flart=NULL;
        memcpy(flart, "BANANAS", 8);
        return 1;
}

int main()
{
        myfunc();

        return 0;
}

% gcc -g t.c -o t
% ulimit -c unlimited
% ./t
Segmentation fault (core dumped)
% ls -l core
-rw------- 1 matthew matthew 143360 2007-12-05 18:02 core
% gdb t core
GNU gdb 6.6-debian
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 "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./t'.
Program terminated with signal 11, Segmentation fault.
#0  0x08048354 in myfunc () at t.c:6
6               memcpy(flart, "BANANAS", 8);
(gdb) bt
#0  0x08048354 in myfunc () at t.c:6
#1  0x0804837b in main () at t.c:12
(gdb) l
1       #include <stdlib.h>
2       #include <string.h>
3
4       int myfunc() {
5               char* flart=NULL;
6               memcpy(flart, "BANANAS", 8);
7               return 1;
8       }
9
10      int main()
(gdb) frame 1
#1  0x0804837b in main () at t.c:12
12              myfunc();
(gdb) l
7               return 1;
8       }
9
10      int main()
11      {
12              myfunc();
13
14              return 0;
15      }
16
(gdb) quit
So you can see where the program crashed, and it should be clear that it is because of the memcpy function, any why.
 
Old 12-05-2007, 11:32 PM   #3
lakeat
LQ Newbie
 
Registered: May 2007
Location: Shanghai
Distribution: Fedora, Kubuntu, IRIX
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for your reply, Matthew.

Infact my program is a very big one. I can successfully compile and run it under any linux without much trouble.
but on Irix, idon't know what I am missing, I was caught here.
Now, I don't even know what shall I do.

I will post the detailed description here, but 1st, I want to tell that I really hope i can do a bt command, but if it said in gdb:
You can't do that without a process to debug.
then how can I do any bt or other gdb-command?
that's strange, and what makes me headache about.

Here's the detailed description:

Quote:
onyx-bridge 1% uname -a
IRIX64 onyx-bridge 6.5 01080747 IP35
onyx-bridge 2% which blockMesh
/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPDebug/blockMesh
onyx-bridge 3% blockMesh
Segmentation fault (core dumped)
onyx-bridge 4% 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) r
Starting program: /disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPDebug/blockMesh

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
You can't do that without a process to debug.
(gdb) l 1
You can't do that without a process to debug.
(gdb) bt
You can't do that without a process to debug.
(gdb) q
onyx-bridge 5% gdb blockMesh
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) r
Starting program: /disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPDebug/blockMesh

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
You can't do that without a process to debug.
(gdb) r 1
Starting program: /disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPDebug/blockMesh 1

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
You can't do that without a process to debug.
(gdb) l 1
1 /*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
6 \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9 This file is part of OpenFOAM.
10
(gdb) b 15
Breakpoint 1 at 0x10055368: file genBlockMesh.C, line 15.
(gdb) r
Starting program: /disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPDebug/blockMesh 1

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
You can't do that without a process to debug.
(gdb) bt
No stack.
(gdb) q
onyx-bridge 6% par blockMesh
0mS[ 2] (634968): was sent signal SIGUSR1
0mS[ 2] : received signal SIGUSR1 (handler 0x10002aa8)
0mS[ 2] : END-pause() errno = 4 (Interrupted function call)
0mS[ 2] : sigreturn(0x7ffb7a40) OK
0mS[ 2] : execve("/disk4/usr/people/student3/tools/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/Codes/dejagnu-1.4.4/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/gdb/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/binutils/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/texinfo/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/tar/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/sgiN32/gnutools/bin/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/Codes/make-3.81/blockMesh", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/src/mico-2.3.12/platforms/sgi", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/student3-1.4.1/applications/bin/sgiN32GccDPD", 0x7ffb7ea8, 0x7ffb7eb0) errno = 2 (No such file or directory)
0mS[ 2] : execve("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/applications/bin/sgiN32GccDPD", 0x7ffb7ea8, 0x7ffb7eb0)
2mS[ 2] : END-execve() OK
2mS[ 2] : sysconf(_SC_CAP) = 1
2mS[ 2] : syssgi(SGI_PROC_ATTR_GET, 0xfb3a5d0, 0x7ffb7e30, 0, 0, 0) = 0
2mS[ 2] : getuid() = 40436, euid=40436
2mS[ 2] : getuid() = 40436, euid=40436
2mS[ 2] : getgid() = 200 egid=200
2mS[ 2] : getgid() = 200 egid=200
2mS[ 2] : open("/lib32/rld", O_RDONLY, 04) = 3
2mS[ 2] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
2mS[ 2] : elfmap(3, 0x7ffb7cc4, 2) = 0xfb60000
2mS[ 2] : close(3) OK
2mS[ 2] : getpagesize() = 16384
2mS[ 2] : open("/dev/zero", O_RDONLY, 010000) = 3
2mS[ 2] : mmap(0xfbe0000, 32768, PROT_WRITE|PROT_READ, MAP_PRIVATE, 3, 0) = 0xfbe0000
2mS[ 2] : close(3) OK
2mS[ 2] : syssgi(0x5c, 0, 0x3d, 0, 0xfbde1b0, 0x5f) = 0
2mS[ 2] : sysinfo(_MIPS_SI_PROCESSORS, 0x7ffb7d10, 257) = 335
2mS[ 2] : syssgi(SGI_USE_FP_BCOPY, 0, 0x25c0, 0xffffffff, 0x25c0, 0x1) = 0
2mS[ 2] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libmeshTools.so", O_RDONLY, 05) = 3
2mS[ 2] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
2mS[ 2] : elfmap(3, 0x7ffb5d20, 2) = 0x5ffe0000
2mS[ 2] : close(3) OK
2mS[ 2] : open("/dev/zero", O_RDONLY, 01757440000) = 3
2mS[ 2] : mmap(0xfbe8000, 65536, PROT_WRITE|PROT_READ, MAP_PRIVATE, 3, 0) = 0xfbe8000
2mS[ 2] : close(3) OK
2mS[ 2] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libtriSurface.so", O_RDONLY, 05) = 3
3mS[ 2] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
3mS[ 2] : elfmap(3, 0x7ffb5d20, 2) = 0x4000000
3mS[ 2] : close(3) OK
3mS[ 2] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/liblagrangian.so", O_RDONLY, 05) = 3
3mS[ 2] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
3mS[ 2] : elfmap(3, 0x7ffb5d20, 2) = 0x41e0000
3mS[ 2] : close(3) OK
3mS[ 2] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libfiniteVolume.so", O_RDONLY, 05) = 3
3mS[ 2] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
3mS[ 2] : elfmap(3, 0x7ffb5d20, 2) = 0x42e8000
3mS[ 2] : close(3) OK
3mS[ 2] : open("/dev/zero", O_RDONLY, 01757640000) = 3
3mS[ 2] : mmap(0xfbf8000, 229376, PROT_WRITE|PROT_READ, MAP_PRIVATE, 3, 0) = 0xfbf8000
3mS[ 2] : close(3) OK
4mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libPstream.so", O_RDONLY, 05) = 3
4mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
4mS[ 0] : elfmap(3, 0x7ffb5d20, 2) = 0x52dc000
5mS[ 0] : close(3) OK
5mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libdynamicMesh.so", O_RDONLY, 05) = 3
5mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
5mS[ 0] : elfmap(3, 0x7ffb5d20, 2) = 0x53e4000
5mS[ 0] : close(3) OK
5mS[ 0] : open("/dev/zero", O_RDONLY, 01760500000) = 3
5mS[ 0] : mmap(0xfc30000, 131072, PROT_WRITE|PROT_READ, MAP_PRIVATE, 3, 0) = 0xfc30000
5mS[ 0] : close(3) OK
5mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libOpenFOAM.so", O_RDONLY, 05) = 3
5mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
5mS[ 0] : elfmap(3, 0x7ffb5d20, 2) = 0x5998000
5mS[ 0] : close(3) OK
5mS[ 0] : open("/dev/zero", O_RDONLY, 01760740000) = 3
5mS[ 0] : mmap(0xfc50000, 262144, PROT_WRITE|PROT_READ, MAP_PRIVATE, 3, 0) = 0xfc50000
5mS[ 0] : close(3) OK
6mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libfpe.so", O_RDONLY, 05) errno = 2 (No such file or directory)
6mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib/libfpe.so", O_RDONLY, 05) errno = 2 (No such file or directory)
6mS[ 0] : open("/usr/lib32/libfpe.so", O_RDONLY, 05) = 3
6mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
6mS[ 0] : elfmap(3, 0x7ffb5d00, 2) = 0xace0000
6mS[ 0] : close(3) OK
6mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libstdc++.so.6", O_RDONLY, 05) = 3
6mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
6mS[ 0] : elfmap(3, 0x7ffb5d00, 2) = 0x6024000
6mS[ 0] : close(3) OK
6mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libm.so", O_RDONLY, 05) errno = 2 (No such file or directory)
6mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib/libm.so", O_RDONLY, 05) errno = 2 (No such file or directory)
6mS[ 0] : open("/usr/lib32/libm.so", O_RDONLY, 05) = 3
6mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
7mS[ 0] : elfmap(3, 0x7ffb5d00, 2) = 0xd70000
7mS[ 0] : close(3) OK
7mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libgcc_s.so.1", O_RDONLY, 05) = 3
7mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
7mS[ 0] : elfmap(3, 0x7ffb5d20, 2) = 0x6214000
7mS[ 0] : close(3) OK
7mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libc.so.1", O_RDONLY, 05) errno = 2 (No such file or directory)
7mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib/libc.so.1", O_RDONLY, 05) errno = 2 (No such file or directory)
7mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib32/libz.so", O_RDONLY, 05) errno = 2 (No such file or directory)
7mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/sgiN32/gcc-4.2.1/lib/libz.so", O_RDONLY, 05) errno = 2 (No such file or directory)
7mS[ 0] : open("/usr/lib32/libz.so", O_RDONLY, 05) = 3
7mS[ 0] : read(3, <7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00>..., 512) = 512
7mS[ 0] : elfmap(3, 0x7ffb5d00, 2) = 0xdc20000
7mS[ 0] : close(3) OK
305mS[ 0] : getpagesize() = 16384
305mS[ 0] : brk(0x10180000) OK
306mS[ 0] : syssgi(SGI_USE_FP_BCOPY, 0x1017aa9c, 0x2a, 0xffffffff, 0xffffffff, 0x1) = 0
306mS[ 0] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/controlDict", 0x7ffb79f0) errno = 2 (No such file or directory)
306mS[ 0] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/controlDict", 0x7ffb79a0) errno = 2 (No such file or directory)
306mS[ 0] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/controlDict.gz", 0x7ffb79a0) errno = 2 (No such file or directory)
306mS[ 0] : stat("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/controlDict", 0x7ffb79f0) OK
306mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/controlDict", O_RDONLY, 0666) = 3
307mS[ 0] : read(3, "/*----------------------------", 4095) = 4095
309mS[ 0] : brk(0x10184000) OK
310mS[ 0] : brk(0x10188000) OK
312mS[ 0] : read(3, " 0;\n const 0;\n ", 4095) = 4095
312mS[ 0] : brk(0x1018c000) OK
314mS[ 0] : brk(0x10190000) OK
316mS[ 0] : brk(0x10194000) OK
317mS[ 0] : brk(0x10198000) OK
319mS[ 0] : read(3, "tTransport<specieThermo<hConst", 4095) = 4095
319mS[ 0] : brk(0x101a0000) OK
323mS[ 0] : brk(0x101a8000) OK
325mS[ 0] : read(3, "ixedEnthalpy 0;\n mixedSma", 4095) = 4095
327mS[ 0] : brk(0x101b0000) OK
331mS[ 3] : brk(0x101b8000) OK
332mS[ 3] : read(3, " 0;\n SIBS ", 4095) = 4095
334mS[ 3] : brk(0x101c0000) OK
337mS[ 3] : brk(0x101c8000) OK
341mS[ 3] : read(3, ".67;\n */\n}\n\n\n// ***********", 4095) = 96
341mS[ 3] : read(3, 0x1017ac50, 4095) = 0
341mS[ 2] : close(3) OK
346mS[ 2] : brk(0x101d0000) OK
350mS[ 2] : stat("/dev/null.gz", 0x7ffb7980) errno = 2 (No such file or directory)
350mS[ 2] : stat("/dev/null.gz.gz", 0x7ffb7980) errno = 2 (No such file or directory)
350mS[ 2] : open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
351mS[ 2] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/cellModels", 0x7ffb7a10) errno = 2 (No such file or directory)
351mS[ 2] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/cellModels", 0x7ffb79c0) errno = 2 (No such file or directory)
351mS[ 0] : stat("/disk4/usr/people/student3/.OpenFOAM-1.4.1/cellModels.gz", 0x7ffb79c0) errno = 2 (No such file or directory)
351mS[ 0] : stat("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/cellModels", 0x7ffb7a10) OK
351mS[ 0] : open("/disk4/usr/people/student3/OpenFOAM/OpenFOAM-1.4.1/.OpenFOAM-1.4.1/cellModels", O_RDONLY, 0666) = 4
351mS[ 0] : read(4, "/*----------------------------", 4095) = 4095
353mS[ 0] : brk(0x101d8000) OK
357mS[ 0] : read(4, " (5 6)\n (1 2)\n ", 4095) = 4095
364mS[ 0] : read(4, "es\n (1 7)\n (2 8)", 4095) = 169
364mS[ 0] : close(4) OK
364mS[ 0] : gethostname("onyx-bridge", 256) OK
364mS[ 0] : getpid() = 634968, ppid=634975
365mS[ 0] : times(0x601c0d8) = 171301076
365mS[ 0] : sysconf(_SC_CLK_TCK) = 100
370mS[ 0] : received signal SIGSEGV

System call summary:
Average Total
Name #Calls Time(ms) Time(ms)
-----------------------------------------
execve 12 0.15 1.80
open 29 0.05 1.33
elfmap 13 0.09 1.19
read 23 0.02 0.56
stat 10 0.05 0.51
brk 15 0.01 0.14
close 20 0.01 0.12
mmap 5 0.01 0.05
syssgi 4 0.00 0.01
sysconf 2 0.00 0.00
gethostname 1 0.00 0.00
getpagesize 2 0.00 0.00
times 1 0.00 0.00
getuid 2 0.00 0.00
sigreturn 1 0.00 0.00
sysinfo 1 0.00 0.00
getpid 1 0.00 0.00
getgid 2 0.00 0.00
onyx-bridge 7%
Anyway, thanks for your time and patience

Best Regards,
Daniel
 
Old 12-06-2007, 02:42 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
To do a backtrace, you need either a running (but stopped) process in memory, or a core file. The core file is essentially a dump of the process state at the time it crashed.

Does the core file actually exist? When you see the "Segmentation fault (core dumped)" message, it can be mis-leading, because if the core file size limit is set to 0, it will not create one despite the message.

Before you run the program, make sure the core size limit is set to unlimited, and that you have enough disk space / quota to create it (it might be very large):
Code:
ulimit -c unlimited
Then run the program, and verify that the core file has been produced. After the core file has been created, you should also check that the disk still has space left:
Code:
df -h .
If it says 100% in the usage column, free up some space and try again.

If you operate on a system with disk quotas enabled, you should also verify the you are not bumping up against the quota limit (use the quota -v
command to check).

If you're sure the core file is not being truncated by limited space, then run gdb.

Of course, your application also needs to have been built using the -g option to gcc to include debugging symbols, else gdb won't be able to make any sense of it.

Another approach is to run the program from within gdb, and after the segv, then just type "bt". If you still get this message at that point, then I'm afraid I have no idea what is happening.
 
Old 12-09-2007, 06:40 AM   #5
lakeat
LQ Newbie
 
Registered: May 2007
Location: Shanghai
Distribution: Fedora, Kubuntu, IRIX
Posts: 11

Original Poster
Rep: Reputation: 0
I really appreciate your help, Matthew.
I did all that according to what you told me, and the outcome is the same
Quote:
onyx-bridge 4% 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.
this is exactly what my outcome is.
And could anyone help me!

Daniel
 
Old 12-09-2007, 08:43 AM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
Sorry, I am out of ideas. I googled the error message and found similar threads in other forums, for example:

http://www.unix.com/high-level-progr...ess-debug.html

Amusingly the replies there were much the same as mine, and then there seems to be much puzzlement!
 
Old 12-10-2007, 01:04 AM   #7
lakeat
LQ Newbie
 
Registered: May 2007
Location: Shanghai
Distribution: Fedora, Kubuntu, IRIX
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by matthewg42 View Post
Sorry, I am out of ideas. I googled the error message and found similar threads in other forums, for example:

http://www.unix.com/high-level-progr...ess-debug.html

Amusingly the replies there were much the same as mine, and then there seems to be much puzzlement!
Yes, that's my post also.
I feel a little depressed.
Thank you Matt

Daniel
 
Old 12-10-2007, 05:10 AM   #8
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
The common theme seems to be gdb running on IRIX or some Windows systems. I would recommend taking it up with the gdb project directly. There may be a patch which fixes it, or they might be able to direct you to a known-good older version of gdb on your platform.

Last edited by matthewg42; 12-10-2007 at 05:12 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
To exists or not to exists, this is the Q. Inbal Linux - Newbie 3 07-18-2006 06:04 AM
Some progress - but need more help mrh7184 Linux - Wireless Networking 1 10-04-2005 06:58 AM
why this mesasge exists? alaios Programming 10 07-16-2005 04:39 PM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 08:29 AM
file exists? raven Programming 7 10-26-2003 07:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration