Linux - SoftwareThis 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.
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.
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
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.
/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`
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.
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).
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
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.
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.
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);
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.