Hi All,

The Server that I am using is:   Server version: Apache/1.3.9 (Unix),
running on Solaris.

I am expecting a packet on a UDP socket in a mod_perl script.  The
message is a variable length message and am having trouble unpacking
it.   The apache web server crashes and there is a core file ( gdb
'where' command info at the bottom of this message).


Here is a snippet of the perl code :
sub error_check_message
{
  my ($msg, $log) = @_ ;
  my($msg_type, $num_str) = unpack "C1C1", $msg;

  my($len);

  if($msg_type != 20)
  {
   return undef;
  }

   $log->info("msg $msg_type, num of strings = $num_str");

    # Httpd crashes at this point
   my ($xx, $name, $len, $val) = unpack "C2pC1p", $msg;

   $log->info("msg $msg_type, num of strings = $num_str , name = $name,
Len = $len Val = $val");


} # end of function



Here is more info from the gdb debugger:
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.6"...(no debugging
symbols found)...
Core was generated by `httpd -X'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libm.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...(no
debugging symbols found)...
done.
Reading symbols from
/opt/local/lib/perl5/5.00503/sun4-solaris/auto/Socket/Socket.so...
(no debugging symbols found)...done.
Reading symbols from
/opt/local/lib/perl5/5.00503/sun4-solaris/auto/IO/IO.so...
(no debugging symbols found)...done.
Reading symbols from
/opt/local/lib/perl5/5.00503/sun4-solaris/auto/Fcntl/Fcntl.so...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/nss_nis.so.1...(no debugging symbols
found)...done.
#0  0xef5a4614 in strlen ()
(gdb) where
#0  0xef5a4614 in strlen ()
#1  0x15f1bc in Perl_sv_setpv ()
#2  0x172d0c in Perl_pp_unpack ()
#3  0x19c32c in Perl_runops_standard ()
#4  0x112b24 in perl_call_sv ()
#5  0x3479c in perl_call_handler ()
#6  0x33f00 in perl_run_stacked_handlers ()
#7  0x32508 in perl_handler ()
#8  0x995c0 in ap_invoke_handler ()
#9  0xbf178 in process_request_internal ()
#10 0xbf240 in ap_process_request ()
#11 0xaef88 in child_main ()
#12 0xaf2e0 in make_child ()
#13 0xaf578 in startup_children ()
#14 0xb00ec in standalone_main ()
#15 0xb10f0 in main ()


Reply via email to