Segmentation Fault(Core Dump) Error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Segmentation Fault(Core Dump) Error
# 1  
Old 08-02-2010
Segmentation Fault(Core Dump) Error

Hi all,

I have a folder with some 28 files. I have a script file that will iteratively take one file at a time from the folder and provide an output for the input file. Till the 7th file, there was no problem but from the 8th file onwards, i got this Segmentation Fault(Core Dump) error. A file named "Core" is getting created also. When i checked my log file, it showed the above mentioned error in this line :

java -Xms1024m -Xmx1024m -classpath "jars" a.b.c -f propertiesFile

Can someone suggest a solution?

Thanks in advance.
# 2  
Old 08-03-2010
There is not really enough here to make good suggestions. Have your tried to run a debugger (jdi, jdb, etc.) on the class code to see where it is crashing? You need to see what incoming data is like just before the segfault, and where in the code it is crashing.

Segfaulting is usually the result of trying to store XXX data into a memory location, where only X memory is allocated.
# 3  
Old 08-03-2010
Hi,

I didn't try running any debugger. I will just describe the problem in detail. I have some 20 odd xls files which has some data in it. The filesize is less than 600KB put together. I have an unix script that will iteratively pick one file at a time and then call a java pgm which will perform some operations n write a output text file.

Given below is the code snippet:

Code:
FILES="*"
for file in `ls $FILES`
do
java -Xms512m -Xmx512m -classpath "-jars" javaFile $file        --Line NO 4
done

am passing the filename to the java pgm for performing some operations. Out of the 20 odd files , till the 9th file the whole pgm runs perfectly after which for each file i am getting an error in Line No.4 saying "Segmentation Fault(Core Dump)". I am running this script in unix server.

I tried executing a script file tat takes an input file size of 30MB and tat generates an output file of same size. The execution went well and i got no segementation fault for this scenario.

But in the case of less file size am getting this error. Can someone suggest an idea?

Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Tilda Segmentation fault (core dumped)

Can anyone tell me why I keep getting a Segmentation fault when I try to run tilda? $ tilda Segmentation fault (core dumped) It seemed to run after I deleted my tilda directory like this thread said to do. Unfortunately it wouldn't let me set my keybinding with anything I tried. ... (0 Replies)
Discussion started by: cokedude
0 Replies

2. UNIX for Advanced & Expert Users

Segmentation Fault/ core dumped in metadb

When I was trying to mirror in my v880 server after OS up gradation from 8 to 10 metadb -afc 3 /dev/dsk/c1t1d0s7 I got an error metadb: Segmentation Fault Segmentation Fault (core dumped) Then I logged a case to Oracle/sun team they suggest "Please could you try metadb -ac 3... (0 Replies)
Discussion started by: taherahmed
0 Replies

3. Programming

getting Segmentation Fault (core dumped) error but Program runs fine.

i am executing following program int main() { char str; FILE * fp; int i=0; ... (4 Replies)
Discussion started by: bhavesh.sapra
4 Replies

4. Red Hat

Segmentation fault (core dumped)

Hi All, I am getting "Segmentation fault (core dumped)" error in the runtime. I am new this please can you tell me why is that i am getting this error and I am not sure of my compilation : gcc -c avc_test.c gcc -c md5.c gcc avc_test.o md5.o -shared -Llibcoreavc_sdk.so -o proj ... (1 Reply)
Discussion started by: fido.genial
1 Replies

5. Solaris

segmentation fault core dumped

i am getting segmentation fault (core dumped) i tried following things but couldn't understand what is wrong with my prog and where the problem is.... i have only adb debugger available on solaris.... so plz help bash-3.00$ pstack core core 'core' of 765: ./mod_generalised_tapinread... (4 Replies)
Discussion started by: junaid.nehvi
4 Replies

6. UNIX for Advanced & Expert Users

Segmentation Fault and Core dump

Hi All, I have this dbt since long ... What is the difference between Segmentation Fault and Core Dump ? As far as I know Seg fault is due to memory leakage or memory which cannot be accessed. Please let me know if I am wrong. Can some one tell me what is the diff between Segmentation... (1 Reply)
Discussion started by: shubhranshu
1 Replies

7. HP-UX

memory fault(core dump)

i am getting memory fault (core dump) in a C program i want to know which statement execution caused it. i tried following things $ gdb generalised_tapinread_mod HP gdb 5.4.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x. Copyright 1986 - 2001 Free Software Foundation, Inc.... (2 Replies)
Discussion started by: junaid.nehvi
2 Replies

8. Solaris

Segmentation Fault (core dumped)

i am getting Segmentation Fault (core dumped) on solaris, but when i run the same program with same input on linux it runs successfully. How can i trace the fault in program on solaris. (6 Replies)
Discussion started by: junaid.nehvi
6 Replies

9. Programming

Segmentation Fault (core dumped)

what r the situations to receive an error msg like the one below Segmentation Fault (core dumped) (2 Replies)
Discussion started by: bankpro
2 Replies

10. UNIX for Dummies Questions & Answers

Segmentation fault (core dumped)

Hello To All! Now anfd then I receive a message on my console: Segmentation fault (core dumped) What does it mean? Or more precisely what are the implications? :confused: (1 Reply)
Discussion started by: Ivo
1 Replies
Login or Register to Ask a Question