check_ftp segmentation fault

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Dec 17 10:16:12 CET 2002


Dear Sir,

I am writing to thank you for your letter and ask you to post

1 What version of check_ftp are you using (check_ftp -V) 

2 a backtrace of the core dump (vi)

3 What OS check_ftp is installed onto and 

4 How it was installed (built from source, package or RPM, other ? If
other, please specify)

On Sun, Dec 15, 2002 at 01:32:10AM -0600, Steve Dearth wrote:
> I get a seg fault when running:
> 
> check_ftp -H (IP) -p 21
> 

Does this happen from the command line ?

If so,

  locate the core file (check_ftp.core
 
  cd to that location

  post the results of the backtrace like this

tsitc> gdb -c check_ftp.core <path_to_plugin>/check_ftp
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read
called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c
line 933 in fill_symbuf

Core was generated by `check_ftp'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libutil.so.3...done.
Reading symbols from /usr/lib/libkvm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  my_inet_aton (cp=0x0, addr=0xbfbff704) at netutils.c:344

warning: Source file is more recent than executable.

344             c=*cp;
(gdb) bt
#0  my_inet_aton (cp=0x0, addr=0xbfbff704) at netutils.c:344
#1  0x804a8e6 in my_connect (host_name=0x0, port=21, sd=0xbfbff77c,
proto=0xbfbff73c "tcp") at netutils.c:283
#2  0x804a884 in my_tcp_connect (host_name=0x0, port=21,
sd=0xbfbff77c) at netutils.c:250
#3  0x8048d6c in main (argc=2, argv=0xbfbffbd4) at check_ftp.c:81
#4  0x8048c7d in _start ()
(gdb) q
tsitc> 

ie all you need do is type 'bt<Enter>' and then 'q<Enter>'.

In this case, the segmentation violation ocurred in the function named
'my_connect' probably because (in my case) it was passed a null pointer
== non_existent character string, 'host_name', that should have
contained the host name of the FTP service to be checked.

Otherwise, I cannot help.

> However it works fine when I do:
> 
> check_tcp -H (IP) -p 21
>

This is probably irrelevant. There is something wrong with the check_ftp
program, not the host you are checking.
 
> 
> What gives?
> 
>

Has it ever worked ?

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/




More information about the Users mailing list