Sponsored Content
Full Discussion: Perl script error
Top Forums Shell Programming and Scripting Perl script error Post 302247099 by KevinADC on Wednesday 15th of October 2008 02:35:08 AM
Old 10-15-2008
From what I know a segmentation fault is an error caused by the operating system or a program that tries to read/write to memory that it's not supposed to. It is possible that the perl program is using too much memory and causing the error. My guess would be that the array you are building is growing too big.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Perl Error with ftptail script

Hello everyone, I'm a starting website admin who 2 days ago decided to make the move from shared hosting to a vps on a linux (ubuntu 8.04) platform. This opened a whole new world for me, since I never worked with the console, SSH, linux,... before. I managed to get LAMP setup after a day of... (2 Replies)
Discussion started by: Cooki3s!
2 Replies

2. Shell Programming and Scripting

error in output of perl script

Hi, This is my piece of code. my $logFile = $ARGV; die "usage: $0 <logFile>" unless $logFile; die "Logfile $logFile doesn't exist" unless -f "$logFile"; open(my $log, "<", $logFile) or die "Can't open $logFile for reading."; print "Processing file $logFile...\n"; #my $authenticates... (2 Replies)
Discussion started by: namishtiwari
2 Replies

3. Shell Programming and Scripting

Need help understanding perl script error

I solicited this site earlier this week and got a good answer for a perl Script so I made this script from what understood from the answers But now I have a bug and I'm stump. It doesn't parse correctly the Output it stays on the first line My $f2 and reprints in a endless loop I'm sure there... (3 Replies)
Discussion started by: Ex-Capsa
3 Replies

4. Shell Programming and Scripting

Perl script to rename file,error

#!/usr/bin/perl $FL="ch.txt"; $CFL="mytext.txt"; print "This script will rename textfiles."; mv $FL $CFL; print "Done."; perl file.pl Error: Can't locate object method "mv" via package "ch.txt" (perhaps you forgot to load "ch.txt"?) at file.pl line 7. (5 Replies)
Discussion started by: cola
5 Replies

5. Shell Programming and Scripting

perl script processing error

open(IN,"input_file") or die "Can't open Input file.\n"; while (<IN>) { chomp; $line = $_; if($line != '') { print "\nprocessing $line\n"; $size = 0; $hrid = $line; @project_id_array = null; $size = @project_id_array;... (3 Replies)
Discussion started by: vishwakar
3 Replies

6. Shell Programming and Scripting

Perl : Error in calling script

I am getting a strange error with perl's inbuilt script flush.pl. I am callling this script in my other script but it kept throwing error: flush.pl did not return a true value at ./abc.pl line 1 abc.pl has: require 'flush.pl'; Not sure why this error is coming. Can someone pls throw... (4 Replies)
Discussion started by: abhisharma23
4 Replies

7. Shell Programming and Scripting

Error in executing Perl script

Hello All I am facing an issue The unix script is running fine in unix environment which uses ssh connection but when I try to run the same in informatica environment (same server where I was running the unix script manually successfully) its showing the below error command-line line 0:... (11 Replies)
Discussion started by: Pratik4891
11 Replies

8. Programming

getting error in my perl script

hi Here is my code written to identify the particular position which is after a string (chr*). my input file looks some thing like this aaanbb:anhn:iuopl:12345 chr1 12345 asnmkol * # kjiiii.....anmkij:lpolk:lopll:abnnj chr5 123222 polko * dddfgg .... aaanbb:anhn:iuopl:aanjuj chr2 44345 asnmkol... (1 Reply)
Discussion started by: anurupa777
1 Replies

9. Homework & Coursework Questions

A2p, error in the perl script?

1. The problem statement, all variables and given/known data: filename = awkdata Part 1: Write an awk program that removes the first field and prints only those lines where the third field is greater than 15 million. Part 2: Do the same command above, but with perl instead of awk.... (0 Replies)
Discussion started by: AZbase10
0 Replies

10. Shell Programming and Scripting

Slight error with my perl script that I could use some help on

So I have a perl script that prompts the user to enter either q or Q to exit the program or c to continue said program. If the user inputs anything other than those three keys they will be prompted again and again for an appropriate input. My script works for the most part except for one small... (6 Replies)
Discussion started by: Eric1
6 Replies
NJAMDPM(1)						      General Commands Manual							NJAMDPM(1)

NAME
njamdpm - Not Just Another Malloc Debugger Post-Mortem SYNOPSIS
njamdpm [OPTIONS] <HEAP FILE> DESCRIPTION
njamdpm is a companion utility that allows you to examine the persistent heap saved by libnjamd(3) You can do things like query for certain addresses, show memory leaks, and show all past allocated memory. As of NJAMD 0.6.0, gdb(1) is required to make sense of the return addresses. USAGE
Options HEAP FILE The heap file will be in the current directory with a name of the form njamd-<pid>-heap, but only if NJAMD_PERSISTANT_HEAP was in the environment at the time of program execution -a address Search through the heap file for a chunk of memory that contains address. This can be VERY helpful when using gdb. Simply find the address that you accessed to cause the segmentation fault, use njamdpm to look it up in the heap, and viola! You have all sorts of info about the chunk: When it was allocated, when it was freed, how big is is, etc. -d depth When displaying return address info, only display depth return addresses. The max is specified in ./include/lib/njamd.h in the define TRACE_DEPTH (default is 3). -t Trim the heap file down to only the used portion. This is useful if for some reason the program somehow exits without trimming its own heap file down first. Note that when the heap file appears huge it's not actually taking up disk space. -s Dump basic status info about peak memory usage, NJAMD overhead, etc. Useful for determining if you should buy more ram, or write me an angry email :) -l Dump memory leaks in the heap. Also shows you info about where the memory was leaked, along with a total. Do note that this total and the subtotals are aligned bytes. They are aligned to the alignment of your architecture, or as specified by the value the NJAMD_ALIGN environment variable had when the heap was created. -f Dump freed memory in the heap. This option is only available if LIBNJAMD ran without NJAMD_CHK_FREE=none set. Using gdb with njamdpm When a segmentation fault happens, it's because, of course, you accessed an invalid address. So all you need to do is get gdb to give you the address you accessed, and then feed it to njamdpm. Ie if the segfault occurs on a line that does buf[i] = 2, issue print &buf[i] to gdb. Note that libnjamd(3) now has a function __nj_ptr_info that can be called from gdb that performs all this without njamdpm. To get gdb to translate these return addresses into something meaningful, issue info line *0xaddress to obtain the line number of the allocation request, or list *0xaddress to see the adjacent code as well. NOTES
Eventually I hope to add symbol translation right into njamdpm. AUTHORS
Mike Perry <mikepery@fscked.org> SEE ALSO
http://freshmeat.net/appindex/development/debugging.html njamd(3), efence(3), malloc(3), mmap(2), mprotect(2) NJAMD - 5 Oct 2000 NJAMDPM(1)
All times are GMT -4. The time now is 10:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy