Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-27-2008, 03:24 AM
|
#1
|
Member
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269
Rep:
|
segmentation fault error
Hi
i am getting an error for my analog reports does anyone know how to resolve this problem the error is:
/home/admin/run-analog: line 8: 31079 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31080 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31081 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31082 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31083 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31084 Segmentation fault rmagic ./$i
/home/admin/run-analog: line 8: 31085 Segmentation fault rmagic ./$i
there is more but its the same just different numbers
|
|
|
05-27-2008, 08:09 PM
|
#2
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Rep:
|
what is /home/admin/run-analog? Is it a shell script? binary program? Did you write it? Do you have the source for it?
Segmentation fault means that a program has read/written memory outside of its memory allocation. It's impossible to tell why it's doing that without looking at the code.
|
|
|
05-28-2008, 04:49 AM
|
#3
|
Member
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269
Original Poster
Rep:
|
/home/admin/run-analog is a script that i use to run the report it has been working fine up till a couple of days ago
this is the script
Quote:
#!/bin/bash
cd /etc/analog/
#find /var/log/sitelogs/ -name "*.log" | xargs -L250 ~admin/dnstran1.5.2/dnstran -settings dnstran.conf
for i in `ls *.cfg`
do
analog +g$i
done
for i in `ls *.ini`
do
rmagic ./$i
done
# copy global previous report to a dated directory
mkdir -p /var/www/default_holding_page/reports/`date -d "$(date +%Y-%m-15) 1 month ago" +%Y-%m`
cp -r /var/www/default_holding_page/reports/prev /var/www/default_holding_page/reports/`date -d "$(date +%Y-%m-15) 1 month ago" +%Y-%m`
|
|
|
|
05-28-2008, 01:26 PM
|
#4
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Rep:
|
is it possible that $i is empty?
maybe you (or someone else) changed an alias for 'ls' recently? If you "alias ls" does it give anything back?
Last edited by BrianK; 05-28-2008 at 01:29 PM.
|
|
|
05-29-2008, 04:19 AM
|
#5
|
Member
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269
Original Poster
Rep:
|
yes
# alias ls
alias ls='ls $LS_OPTIONS'
i also tried running rmagic on its own it still came up with the error
#rmagic site.ini
Segmentation fault
i reinstalled rmagic and tried again i got
# rmagic site.ini
gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 928.
Last edited by mahmoud; 05-29-2008 at 10:51 AM.
|
|
|
05-29-2008, 04:34 PM
|
#6
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Rep:
|
well, that alias line doesn't help at all without knowing what $LS_OPTIONS is.
that said, it sounds like you found your problem... rmagic is seg-faulting. Are you sure that site.ini file should work? I know nothing about rmagic (is it a Ruby binding for ImageMagick?), so it's going to be hard for me to help you from here on out, but I would double check that site.ini is a good file - maybe test it somewhere else with a working rmagic. If it's a good file, then I'd start looking at dependecies - something was probably updated without something else knowing about it. Did you install rmagic with your package management system or by hand? (that's a rhetorical question - if you did it by hand, I would try again with the package management system, even if it's an older version).
Good luck!
|
|
|
05-30-2008, 03:29 AM
|
#7
|
Member
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269
Original Poster
Rep:
|
the funny thing is it was working fine till some certain updates came in i used debain testing
so the update must have affected it in some way also its broken on all my serevrs
and i just installed a fresh one on my machine and it is broken as well. so i tried reinstalling it using aptitude
this is the error
# rmagic site.ini
Quote:
gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 928.
|
also it was working fine, site.ini is just an example for the many config files i have
here are examples of my .ini and .cgf files in the /etc/analog folder
.ini
Quote:
[statistics]
File_In = /var/www/site/public/reports/report.dat
Frame_File_Out = index.html
Format= XHTML 1.0
Verbose = E
[reports]
Active_Column=R
File_Out = /var/www/site/public/reports/
Title_Font = Helvetica,Arial,sans-serif
Title_BG_Color = #000000
Title_Font_Color = #FFCC00
Data_Font = Helvetica,Arial,sans-serif
Data_Color_1 = #D0FFD0
Data_Color_2 = #F0FFF0
Data_Total_Color = #FFCC66
Data_Header_Color = #9999CC
[QUICK]
Rows = ALL
[graphs]
BG_Color = #FFFFCC
[navigation]
File_Out = nav.html
[website]
Title = Web Statistics for www.site.com
Webmaster = info@domain.co.uk
Base_URL = http://www.site.com
|
.cfg
Quote:
OUTFILE /var/www/site/public/reports/report.dat
APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{forensic-id}n\")
APACHELOGFORMAT (%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\")
LOGFILE /var/log/sitelogs/*site-access.log
LOGFILE /var/log/sitelogs/*site-access.log.gz
HOSTNAME "www.site.com"
HOSTURL "http://www.site.com"
IMAGEDIR "http://www.site.com/reports/"
REFREPEXCLUDE http://www.site.com/*
REFSITEEXCLUDE http://www.site.com/
CONFIGFILE ./common.inc
|
i also checked in the syslog and found and error
May 30 10:20:29 gaffer kernel: rmagic[29640]: segfault at 0000000b eip 08097496 esp bfb03098 error 4
Last edited by mahmoud; 05-30-2008 at 05:00 AM.
|
|
|
06-11-2008, 11:24 AM
|
#8
|
LQ Newbie
Registered: Jun 2008
Location: Spain
Distribution: Ubuntu,Gentoo,Debian
Posts: 2
Rep:
|
Quote:
Originally Posted by mahmoud
yes
i reinstalled rmagic and tried again i got
# rmagic site.ini
gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 928.
|
I get a similar one:
Code:
gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 918.
Mine is:
Code:
# cat /etc/issue
Debian GNU/Linux lenny/sid \n \l
|
|
|
10-22-2008, 06:29 AM
|
#9
|
LQ Newbie
Registered: Oct 2008
Location: Newcastle upon Tyne
Distribution: Ubuntu 8.04
Posts: 6
Rep:
|
Quote:
Originally Posted by chetoo
I get a similar one:
Code:
gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 918.
|
Did you ever find a solution to this problem as I am getting the same when trying to run rmagic.
Regards, Kenneth.
|
|
|
10-26-2008, 05:31 AM
|
#10
|
LQ Newbie
Registered: Jun 2008
Location: Spain
Distribution: Ubuntu,Gentoo,Debian
Posts: 2
Rep:
|
Quote:
Originally Posted by kenmiles
Did you ever find a solution to this problem as I am getting the same when trying to run rmagic.
Regards, Kenneth.
|
Nop, still the same some months after, and even after a dist-upgrade. Could it be some weird data on hte log files? I do not know.
|
|
|
02-24-2009, 01:11 PM
|
#11
|
LQ Newbie
Registered: Feb 2009
Posts: 2
Rep:
|
A solution was posted over at Launchpad (see below). You need to make a minor patch to the Settings.pm file because of a change in how gd library works.
--- Settings-orig.pm 2009-01-09 08:42:44.000000000 +0900
+++ Settings.pm 2009-01-09 08:43:07.000000000 +0900
@@ -907,7 +907,7 @@
# Check GD for support of desired output format. If none
# given or not capable, then set output format accordingly.
#
- my $g = new GD::Image(0,0);
+ my $g = new GD::Image(1,1);
if( defined $self->val( 'graphs', 'Format' ) ) {
if( $self->val( 'graphs', 'Format' ) =~ /jpe?g/i ) {
I have verified that this works. I'll get a patched Report Magic released in a few weeks but it may take a while to get through the distros.
--
Jeremy Wadsack
Forum won't let me post a URL so you'll have to piece this together:
https
://
bugs.
launchpad.
net/ubuntu/+source/rmagic/+bug/315280
|
|
|
All times are GMT -5. The time now is 10:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|