LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 03-09-2016, 11:19 PM   #1
zigmobridge
LQ Newbie
 
Registered: Mar 2016
Posts: 2

Rep: Reputation: Disabled
SIGSEGV: Segmentation fault occur ./a.exe command of gfortran


$ ./a.exe
EVALUATING from: 2010 1
.............To: 2010 361
Reading modis data...
Writing..modis.2010.daily
record number: 1

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x53C872B1
#1 0x53D0BDCB
#2 0x61033A22
Segmentation fault (core dumped)

Last edited by zigmobridge; 03-09-2016 at 11:22 PM. Reason: Please help me out how to solve it
 
Old 03-09-2016, 11:50 PM   #2
OregonJim
Member
 
Registered: Feb 2016
Posts: 98

Rep: Reputation: Disabled
Did you compile with debug symbols enabled? You can run it under gdb to determine exactly where it blows up...
 
1 members found this post helpful.
Old 03-10-2016, 12:13 AM   #3
zigmobridge
LQ Newbie
 
Registered: Mar 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Yeah, I also ran it under gdb, it also says as follows.
If any error can be solved, please let me know how to do...


shelly@hasegawa2 /cygdrive/e/WEB-DHM/MODIS/MODIS_data
$ gfortran -o a.exe server.f

shelly@hasegawa2 /cygdrive/e/WEB-DHM/MODIS/MODIS_data
$ gdb ./a.exe
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./a.exe...done.
(gdb) run
Starting program: /cygdrive/e/WEB-DHM/MODIS/MODIS_data/a.exe
[New Thread 5356.0x14e8]
[New Thread 5356.0x3cc]
[New Thread 5356.0x878]
[New Thread 5356.0xbdc]
EVALUATING from: 2010 1
.............To: 2010 361
Reading modis data...
Writing..modis.2010.daily
record number: 1

Program received signal SIGSEGV, Segmentation fault.
0x00401f40 in MAIN__ ()
(gdb)
 
Old 03-10-2016, 02:21 PM   #4
OregonJim
Member
 
Registered: Feb 2016
Posts: 98

Rep: Reputation: Disabled
Um, why are you posting Windows problems in a Linux forum?
 
Old 03-10-2016, 02:25 PM   #5
hydrurga
Senior Member
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 18.1 MATE
Posts: 1,876

Rep: Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603
Quote:
Originally Posted by OregonJim View Post
Um, why are you posting Windows problems in a Linux forum?
What makes you think it's a Windows problem?

Edit: Ah, I see, because it's being run under cygwin.

Last edited by hydrurga; 03-10-2016 at 02:27 PM.
 
Old 03-10-2016, 02:59 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,355

Rep: Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989Reputation: 1989
A seg fault typically occurs when a program tries to write to memory that doesn't belong to it. It's usually caused by a program running past the end of an array or using memory locations before they've been allocated (or after they've been deallocated).

Since you haven't posted the source code, or even the name of the program or a link to it, I'm not sure what you expect us to do. Maybe contact the code provider?
 
1 members found this post helpful.
  


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
Program received signal SIGSEGV, Segmentation fault leblinux Programming 18 05-15-2014 07:42 AM
SIGSEGV segmentation fault at strftime_l lib64/libc.so.6 smilebhuff Linux - Kernel 8 05-15-2012 10:24 AM
ImageMagick : SIGSEGV, Segmentation fault pramod.srk Linux - Newbie 7 06-18-2009 08:20 AM
Program received signal SIGSEGV, Segmentation fault go939 Programming 4 08-22-2007 07:54 PM
SIGSEGV- segmentation fault during execution ashwinipahuja Programming 5 05-02-2004 11:02 PM


All times are GMT -5. The time now is 08:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration