Mathias Koerber wrote:
> We did use Dtrace with syscall::sendto:entry/exit to prove that the
> application did send the packet, but so far we have no clue how to
> determine what happens to the packet afterwards.

Can you show us the trace script you used and the output it showed?  How
about details on the network configuration and the packet being sent?
Perhaps there's something in the details that someone here (or on
networking-discuss) will recognize.

For what it's worth, I was able to use the following trivial dtrace
script to follow a packet all the way from sendto in the kernel down to
the device driver on a Solaris 10 system, and see the MIB updates along
the way.  MIB updates provide a fair indication of error activity.
(Note that tracing 'sendto' might not work for all UDP sockets ... if
the socket is connected and uses write(), you won't see any trace
activity.)  (Also note that on a busy system, you may need to provide
more conditions on the initial probe [such as checking execname], and
may want to limit the module[s] in which you're tracing.)

#!/usr/sbin/dtrace -Fs -

syscall::sendto:entry
{
        self->trace++;
}

fbt:::
/self->trace/
{
}

mib:::
/self->trace/
{
}

syscall::sendto:return
/self->trace/
{
        self->trace = 0;
}

-- 
James Carlson         42.703N 71.076W         <carls...@workingcode.com>
CPU FUNCTION                                 
  3  -> sendto32                              
  3  <- sendto32                              
  3  -> sendto                                
  3    -> sendit                              
  3      -> getsonode                         
  3        -> getf                            
  3          -> set_active_fd                 
  3          <- set_active_fd                 
  3        <- getf                            
  3      <- getsonode                         
  3      -> sotpi_sendmsg                     
  3        -> sosend_dgram                    
  3          -> so_addr_verify                
  3          <- so_addr_verify                
  3        <- sosend_dgram                    
  3        -> sodgram_direct                  
  3          -> canput                        
  3          <- canput                        
  3          -> mcopyinuio                    
  3            -> allocb_cred                 
  3              -> allocb                    
  3                -> kmem_cache_alloc        
  3                <- kmem_cache_alloc        
  3              <- allocb                    
  3              -> crhold                    
  3              <- crhold                    
  3            <- allocb_cred                 
  3            -> uiomove                     
  3            <- uiomove                     
  3          <- mcopyinuio                    
  3          -> udp_wput_data                 
  3            -> UDP_WR                      
  3            <- UDP_WR                      
  3            -> udp_output                  
  3              -> udp_output_v4             
  3                -> mblk_setcred            
  3                <- mblk_setcred            
  3               | udp_output_v4:udpOutDatagrams 
  3                -> udp_send_data           
  3                  -> crgetlabel            
  3                  <- crgetlabel            
  3                  -> ire_cache_lookup      
  3                  <- ire_cache_lookup      
  3                 | udp_send_data:ipOutRequests 
  3                  -> ire_to_ill            
  3                  <- ire_to_ill            
  3                  -> putnext               
  3                    -> ce_wput             
  3                      -> vlan_set_fast_b_band_q 
  3                      <- vlan_set_fast_b_band_q 
  3                      -> ce_start          
  3                        -> WR              
  3                        <- WR              
  3                        -> ddi_get_devstate 
  3                        <- ddi_get_devstate 
  3                        -> hcksum_retrieve 
  3                        <- hcksum_retrieve 
  3                        -> pci_dma_sync    
  3                          -> ddi_get_instance 
  3                          <- ddi_get_instance 
  3                          -> ddi_get_soft_state 
  3                          <- ddi_get_soft_state 
  3                        <- pci_dma_sync    
  3                        -> pci_dma_sync    
  3                          -> ddi_get_instance 
  3                          <- ddi_get_instance 
  3                          -> ddi_get_soft_state 
  3                          <- ddi_get_soft_state 
  3                        <- pci_dma_sync    
  3                        -> ddi_check_acc_handle 
  3                        <- ddi_check_acc_handle 
  3                      <- ce_start          
  3                    <- ce_wput             
  3                  <- putnext               
  3                <- udp_send_data           
  3              <- udp_output_v4             
  3            <- udp_output                  
  3          <- udp_wput_data                 
  3          -> udp_exit                      
  3            -> cv_broadcast                
  3            <- cv_broadcast                
  3          <- udp_exit                      
  3        <- sodgram_direct                  
  3      <- sotpi_sendmsg                     
  3      -> lwp_stat_update                   
  3      <- lwp_stat_update                   
  3      -> so_update_attrs                   
  3      <- so_update_attrs                   
  3      -> releasef                          
  3        -> clear_active_fd                 
  3        <- clear_active_fd                 
  3        -> cv_broadcast                    
  3        <- cv_broadcast                    
  3      <- releasef                          
  3    <- sendit                              
  3  <- sendto                                


_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to