lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

fedora-core 1 segfault
Goto page 1, 2  Next
 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
ras1
Beginner


Joined: 31 Aug 2003
Posts: 9

PostPosted: Sun Nov 09, 2003 7:04 am    Post subject: fedora-core 1 segfault Reply with quote

hello folks,

I just recently switched from rh 9 to fedora core 1, and I can't get netmrg to run on this rascal. netmrg_cron.sh segfaults everytime. Not sure what is causing it. I have included some of the output of strace right before it segfaults.

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xbf3ad000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2601
read(3, "", 4096) = 0
close(3) = 0
munmap(0xbf3ad000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "/usr/local/bin/netmrg_cron.sh: l"..., 96/usr/local/bin/netmrg_cron.sh: line 31: 11647 Segmentation fault $netmrg >$output 2>$error
) = 96

thanks in advance for you time,

--ras
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Mon Nov 10, 2003 12:02 am    Post subject: Reply with quote

Hmm... it looks as though bash is segfaulting when trying to run the script? That seems really odd to me.

Could you try running netmrg-gatherer manually to see if that works?
Back to top
ras1
Beginner


Joined: 31 Aug 2003
Posts: 9

PostPosted: Mon Nov 10, 2003 4:05 am    Post subject: Reply with quote

here is the end output of strace ./netmrg-gatherer:

old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xbf533000
set_thread_area({entry_number:-1 -> 6, base_addr:0xbf5332a0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xbf537000, 16803) = 0
set_tid_address(0xbf5332e8) = 29600
rt_sigaction(SIGRTMIN, {0x2fa620, [], SA_RESTORER|SA_SIGINFO, 0x300f10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0
brk(0) = 0x811b000
brk(0x813c000) = 0x813c000
brk(0) = 0x813c000
futex(0x269764, FUTEX_WAKE, 2147483647) = 0
stat64("/usr/local/etc/netmrg.xml", {st_mode=S_IFREG|0644, st_size=788, ...}) = 0
stat64("/usr/local/etc/netmrg.xml", {st_mode=S_IFREG|0644, st_size=788, ...}) = 0
stat64("/usr/local/etc/netmrg.xml", {st_mode=S_IFREG|0644, st_size=788, ...}) = 0
open("/usr/local/etc/netmrg.xml", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=788, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xbf53b000
read(3, "<netmrg>\n\t<database>\n\t\t<host>loc"..., 16384) = 788
read(3, "", 12288) = 0
_llseek(3, 0, [788], SEEK_CUR) = 0
read(3, "", 4096) = 0
read(3, "", 4096) = 0
close(3) = 0
munmap(0xbf53b000, 4096) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Mon Nov 10, 2003 2:59 pm    Post subject: Reply with quote

If you compiled from source, did you try recompiling after upgrading to Fedora?
Back to top
ras1
Beginner


Joined: 31 Aug 2003
Posts: 9

PostPosted: Mon Nov 10, 2003 9:12 pm    Post subject: Reply with quote

Yeah, I first tried to install the rpm but it was complaining that it needed rrdtool installed (which I compiled and put int /bin/rrdtool). I then proceeded to compile the latest netmrg and it gave me those errors when I ran it. After that I tried to compile an older version netmrg-0.10pre2 because that's whath I was running on rh8 but I got the same error. It could just be something dumb that fedora has done (wouldn't surprise me), but I really like netmrg so I thought I wouold let you folks know.

--ras
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Tue Nov 11, 2003 2:37 am    Post subject: Reply with quote

Not sure what changed in this version of libxml2, but it seems to be the culprit.

Try editing your settings.cpp file, line 93:

Old line:
Code:
sprintf(temp, "%s", input);


Replace with this:
Code:
snprintf(temp, 1023, "%s", input);


That prevented my NetMRG from segfaulting on parsing the config file (on Fedora). That may not be the only issue we'll encounter, though.

Please let us know if this fixes the problem.
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Tue Nov 11, 2003 2:45 am    Post subject: Reply with quote

We'll continue to discuss this issue here, but it is now also being tracked as bug#90.
Back to top
ras1
Beginner


Joined: 31 Aug 2003
Posts: 9

PostPosted: Tue Nov 11, 2003 6:36 am    Post subject: Reply with quote

Changing that line in settings.cpp fixed the problem :) Thanks folks for your quick response, and keep up the good work with netmrg!

--ras
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Mon Nov 17, 2003 9:05 pm    Post subject: Reply with quote

Just in case people are still watching this thread, I wanted to let everyone know that I've rolled a new RPM for 0.10 to address this problem. I've also rolled an rrdtool package for FC1 that can be found in the contribs section of our page.
You can find all the packages here: http://www.netmrg.net/download.php

-Doug
Back to top
presidency
Beginner


Joined: 29 Feb 2004
Posts: 4
Location: Dhaka, Bangladesh

PostPosted: Sun Feb 29, 2004 6:52 am    Post subject: Seg Fault on FC1 (Installed from RPM) Reply with quote

Hello,

I just discovered NetMRG when I was trying to find some GUI for MRTG.

*Preamble*
I downloaded the netmrg-0.13.tar.gz and ran "./configure" and "make" - the package compiled without any problems since I had all the required libraries / dependencies on my Redhat Fedora Core 1 system. However, I actually installed the NetMRG binary RPM "/binary/netmrg-0.13-1.fc1.i386.rpm" package instead of running "make install". RRDtool 1.0.46

*Status*

NetMRG Web GUI works without any problems and I can get the graphs. However, when the "/usr/bin/netmrg_cron.sh" is run a 2 minute intervals from cron, I get the same error message that a previous post was about in this list ->

"/usr/bin/netmrg_cron.sh: line 31: 11700 Segmentation fault $netmrg >$output
2>$error"

I looked for the "settings.cpp" file as directed in the earlier post, and the "RPM" package had not installed any file with that name. However, I did find that file in the NetMRG src directory ->"netmrg-0.13/src". Should I replace the line as instructed in the earlier post, recompile NetMRG from source again and re-install using "make install"?

The "settings.cpp" file already had the replaced line (line 93) mentioned in the earlier post. What do I do now, do a "make install" after compiling from the netmrg-0.13 source?

Thank you for your time and help.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Mon Mar 01, 2004 1:51 am    Post subject: Re: Seg Fault on FC1 (Installed from RPM) Reply with quote

presidency wrote:
"/usr/bin/netmrg_cron.sh: line 31: 11700 Segmentation fault $netmrg >$output
2>$error"


Try running:

Code:
/usr/bin/netmrg-gatherer -sm


and posting the output. I'm not sure what's going on if you're getting graphs; NetMRG might be stepping on itself.

Also, you don't really need both the source and the RPM. Just one or the other is fine.

Let us know the output and we'll see what we can figure out.

-Doug
Back to top
presidency
Beginner


Joined: 29 Feb 2004
Posts: 4
Location: Dhaka, Bangladesh

PostPosted: Mon Mar 01, 2004 4:33 am    Post subject: Output of "/usr/bin/netmrg-gatherer -sm" Reply with quote

Following is the output of "/usr/bin/netmrg-gatherer -sm" . It looks like it is running fine, however, when I run the "/usr/binnetmrg_cron.sh" script, thats when the error occurs and emailed.

[mhkhan@aparajita]# /usr/bin/netmrg-gatherer -sm
NetMRG starting.
Start time is 1078115412
Creating Lockfile.
Initializing SNMP library.
Initializing RRDTOOL pipe.
[Dev: 0001] Starting device thread.
[Dev: 0001] MySQL connection established.
[Dev: 0001] Template Linux Box / <Field Omitted>
[Dev: 0001] SNMP Uptime is 12960546
[Dev: 0001] [Sub: 0001] Starting Subdevice.
[Dev: 0001] [Sub: 0001] [Mon: 0009] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0009] Value: 76
[Dev: 0001] [Sub: 0001] [Mon: 0008] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0008] Value: 1
[Dev: 0001] [Sub: 0001] [Mon: 0001] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0001] Value: 538408
[Dev: 0001] [Sub: 0001] [Mon: 0002] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0002] Value: 45270
[Dev: 0001] [Sub: 0001] [Mon: 0003] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0003] Value: 95827
[Dev: 0001] [Sub: 0001] [Mon: 0004] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0004] Value: 0.23
[Dev: 0001] [Sub: 0001] [Mon: 0005] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0005] Value: 0.11
[Dev: 0001] [Sub: 0001] [Mon: 0006] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0006] Value: 0.03
[Dev: 0001] [Sub: 0001] [Mon: 0011] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0011] Value: 951616
[Dev: 0001] [Sub: 0001] [Mon: 0010] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0010] Value: 4408
[Dev: 0001] [Sub: 0001] [Mon: 0007] Starting Monitor.
[Dev: 0001] [Sub: 0001] [Mon: 0007] Value: 3
[Dev: 0001] [Sub: 0002] Starting Subdevice.
[Dev: 0001] [Sub: 0002] Interface subdevice has no interface parameters.
[Dev: 0001] [Sub: 0002] Subdevice aborted due to previous errors.
[Dev: 0001] [Sub: 0003] Starting Subdevice.
[Dev: 0001] [Sub: 0003] Disk subdevice has no disk parameters.
[Dev: 0001] [Sub: 0003] Subdevice aborted due to previous errors.
[Dev: 0001] [Sub: 0004] Starting Subdevice.
[Dev: 0001] [Sub: 0004] [Mon: 0017] Starting Monitor.
[PASSIVE] Last: 0, Now: 1
[Dev: 0001] [Sub: 0004] [Mon: 0017] Value: 249409005
[Dev: 0001] [Sub: 0004] [Mon: 0018] Starting Monitor.
[Dev: 0001] [Sub: 0004] [Mon: 0018] Value: 47093156
[Dev: 0001] [Sub: 0005] Starting Subdevice.
[Dev: 0001] [Sub: 0005] [Mon: 0019] Starting Monitor.
[Dev: 0001] [Sub: 0005] [Mon: 0019] Value: 145248251
[Dev: 0001] [Sub: 0005] [Mon: 0020] Starting Monitor.
[Dev: 0001] [Sub: 0005] [Mon: 0020] Value: 310129985
[Dev: 0001] [Sub: 0006] Starting Subdevice.
[Dev: 0001] [Sub: 0006] [Mon: 0021] Starting Monitor.
[Dev: 0001] [Sub: 0006] [Mon: 0021] Value: U
[Dev: 0001] [Sub: 0006] [Mon: 0022] Starting Monitor.
[Dev: 0001] [Sub: 0006] [Mon: 0022] Value: U
[Dev: 0001] [Sub: 0007] Starting Subdevice.
[Dev: 0001] [Sub: 0007] [Mon: 0023] Starting Monitor.
[Dev: 0001] [Sub: 0007] [Mon: 0023] Value: U
[Dev: 0001] [Sub: 0007] [Mon: 0024] Starting Monitor.
[Dev: 0001] [Sub: 0007] [Mon: 0024] Value: U
[Dev: 0001] [Sub: 0008] Starting Subdevice.
[Dev: 0001] [Sub: 0008] [Mon: 0025] Starting Monitor.
[Dev: 0001] [Sub: 0008] [Mon: 0025] Value: U
[Dev: 0001] [Sub: 0008] [Mon: 0026] Starting Monitor.
[Dev: 0001] [Sub: 0008] [Mon: 0026] Value: U
[Dev: 0001] Ending device thread.
Thread Ended.
[PASSIVE] Last: 1, Now: 0
Closed MySQL connection.
Runtime: 0
Closed RRDTOOL pipe.
Cleaned up SNMP.
[mhkhan@aparajita]#

Thanks,

mhkhan.
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Tue Mar 02, 2004 10:54 pm    Post subject: Reply with quote

That's really odd. Essentially, that script is just a wrapper for netmrg-gatherer. Try running netmrg-gatherer with no options, and see if it segfaults then.
Back to top
presidency
Beginner


Joined: 29 Feb 2004
Posts: 4
Location: Dhaka, Bangladesh

PostPosted: Sun Mar 07, 2004 8:48 am    Post subject: Output of running NetMRG-gathgerer Reply with quote

Following is the output if I only run netmrg-gatherer:


[mhkhan@aparajita]# netmrg-gatherer
NetMRG starting.
[Dev: 0001] Starting device thread.
[Dev: 0001] [Sub: 0002] Interface subdevice has no interface parameters.
[Dev: 0001] [Sub: 0002] Subdevice aborted due to previous errors.
[Dev: 0001] [Sub: 0003] Disk subdevice has no disk parameters.
[Dev: 0001] [Sub: 0003] Subdevice aborted due to previous errors.
[Dev: 0001] Ending device thread.
Thread Ended.
[mhkhan@aparajita]#


Any ideas? I am pretty much stuck .... Thanks

balleman wrote:
That's really odd. Essentially, that script is just a wrapper for netmrg-gatherer. Try running netmrg-gatherer with no options, and see if it segfaults then.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Sun Mar 07, 2004 12:27 pm    Post subject: Re: Output of running NetMRG-gathgerer Reply with quote

presidency wrote:
Any ideas? I am pretty much stuck .... Thanks


Hopefully not ;)
Let us know the output of this:

Code:
ls -al /bin/sh


Mine shows:

Code:
$ ls -al /bin/sh
lrwxrwxrwx    1 root     root            4 Jan  6 23:48 /bin/sh -> bash


We haven't done any testing of the cron wrapper script with other shells than 'sh' and 'bash2', so if you didn't install bash, it might be linked to something else.
The netmrg_cron.sh script is just a wrapper for netmrg-gatherer, so if you wanted to put that in cron instead and redirect the output somewhere, that would be fine.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group