Re: Panel Segfaults




Miguel wrote:
> Can you please provide:
>
> print server_cnx
> print *server_cnx
> print hent
> print *hent
>
> to us?

Sorry for the delay, the problem is on my work machine, which I'm not
around on weekends (At home, panel runs and Wanda segfaults).

My values for these are pretty much the same as the ones Will Woods
posted:

(gdb) print server_cnx
$1 = (IIOPConnection *) 0x80921e0
(gdb) print *server_cnx
$2 = {
  giop_connection = {
    connection_type = GIOP_CONNECTION_IIOP,
    destroy_func = 0x40042278 <iiop_connection_destroy>, 
    get_fd_func = 0x400422dc <iiop_get_fd>,
    refcount = 0, 
    is_valid = 0, 
    connection_class = GIOP_CONNECTION_SERVER,
    last_event = EV_READ,
    orb_data = 0x0, 
    user_data = 0x0
  }, 
  fd = 6, 
  hostname = 0x0, 
  location = {
    sin_family = 2, 
    sin_port = 6935,
    sin_addr = {s_addr = 16777343}, 
    sin_zero = "\000\000\000\000\000\000\000"
  }, 
  is_serversock = 1}
(gdb) print hent
$3 = (struct hostent *) 0x0
(gdb) print *hent
Cannot access memory at address 0x0.
(gdb)

Now, I've found the function where it dies in ORBit/src/IIOP/connection.c.
Here, in the iiop_connection_server() function, it has the following code
right before it dies:

  hn_tmp[64] = '\0';
  gethostname(hn_tmp, 64);
  hent = gethostbyname(hn_tmp);
  if(!hent) {
    g_warning("Couldn't find FQDN of this host [%s]. Your /etc/hosts
               file needs work.", hn_tmp);
    goto failed;
  }
  hent = gethostbyaddr( hent->h_addr, 
                        4 /* hent->h_length - security hole */,
                        AF_INET);

  server_cnx->hostname = g_strdup(hent->h_name);

It looks to me, since it gets past the if(!hent) function, that something
is messing up in the hent=gethostbyaddr line.


However, prior to this is ORBit's version of one of the biggest problems I
had with mico.  For some of the machines I deal with, I have an annoying
but not unheard of PHB (pointy-haired boss) rule.  Machine names are not
allowed.  The machine I am testing on does have a HOSTNAME and an
/etc/hosts file to get panel to run (it was running under mico), but they
should not be there.

ORBit needs to handle gethostbyname() failure gracefully, not by failing
completely.

-Gleef



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]