Custom Query (541 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (40 - 42 of 541)

Ticket Resolution Summary Owner Reporter
#44 fixed Sniffwave segfaults on linux w/ no params except data flag somebody stefan
Description

"sniffwave WAVE_RING" is fine. "sniffwave WAVE_RING y" seg faults. "sniffwave WAVE_RING wild wild wild wild y" is fine.

This is a 64 bit Ubuntu 9.1 Linux box.

earthworm@polar:/media/data2mirror/tankplayer_queue$ sniffwave WAVE_RING y
Segmentation fault
earthworm@polar:/media/data2mirror/tankplayer_queue$ sniffwave WAVE_RING wild wild wild wild y
Sniffing WAVE_RING for wild.wild.wild.wild
20100313_UTC_03:24:46 sniffwave: inRing flushed 494 packets of 1037400 bytes total.
MCM.1.SI.-- (0x2 0x0) 0 s2 1018 10.0 2010/03/09 06:48:20.40 (1268117300.4000) 2010/03/09 06:50:02.10 (1268117402.1000)  i255 m25 t19 len2100 [333284.87]
    88     82     81     92     89     83     97    106     89     90 
    87     83     83     89     84     90     94     86     73     67 
    71     98     83     82     92     97     90     85     89     89 
    91     99     87     82     96     96     91     82     84     88 
    91     87     88     86     98     97     87     90     92     85 
    85     82     88     87     80     87     87     87     96     99 
    95     86     90    101     90     87     94     94     93     92 
#45 fixed wave_serverV logging change to alert about client IP paulf paulf
Description

This request came from Mike Hagerty, code fix is from Dave Kragness.

Paul,
Here's the code for printing out WS client  IP addr and thread #.  I wasn't sure what exactly changed, so I included chunks of code at a time, when probably only 1 line in the chunk has changed.

If this turns out to be clear as mud, let me know.

-david

in equiv of server_thread.c I have:

/********* START CODE SNIPPET *********/

int ListenForMsg( int iSocketDesc, char *pRcvBuffer, int iMyThreadID)
     /* Returns <0 if error; Reads individual characters from a file
      * descriptor <iSocketDesc> into the supplied buffer <pRcvBuffer> until
      * either we run out of buffer space (returning ERR_OVRFLOW) or we find a
      * newline character on the * input stream (returning the number of
      * characters read, including the newline)...  */

      /* This function should not be reading in one char at a time.
         This is a lot of overhead.
         DavidK 9/21/98
      */

{
  int             iCIndex;
  int             iReadResult;

  /*              Validate params: */
  ew_assert(iSocketDesc > 0, __LINE__);
  ew_assert((BOOL)pRcvBuffer, __LINE__);

  if (iWS6ServerDebug >= WS6_DEBUG_ADVANCED_USER)
     logit("et", "ListenForMsg: listening at the socket[%d]... \n", iMyThreadID);

  /* Listen to the socket for incoming characters until our buffer is full... */
  /* Note: pRcvBuffer now declared as kMAX_CLIENT_MSG_LEN+1 so we can't overrun
     buffer with the appended null byte (null byte is not part of message) */
  for (iCIndex = 0 ; iCIndex < kMAX_CLIENT_MSG_LEN ; iCIndex++)
  {
    iReadResult = recv_ew(iSocketDesc, &pRcvBuffer[iCIndex], 1, 0,
                          ClientTimeout);
    if (iReadResult==1 && pRcvBuffer[iCIndex] == '\n')
    {
      /* If we got a newline, we're done gathering */
      pRcvBuffer[iCIndex + 1] = '\0';
      return 1;
    }
    if (iReadResult <= 0)
    {
      if(iReadResult == 0)
      {
        logit("t","ws6_server:  Client closed socket.\n");
        return 0;
      }
      else
      {
        if(iCIndex == 0)
        {
          if(socketGetError_ew() == WOULDBLOCK_EW)
            logit("t","ws6_server:  Client socket[%d:%s] timed out.\n", iMyThreadID, client_ip[iMyThreadID]);
          else
            if (iWS6ServerDebug >= WS6_DEBUG_ADVANCED_USER)
              logit("t","ws6_server:  Client closed socket[%d:%s] (quickly).\n", iMyThreadID, client_ip[iMyThreadID]);
          return 0;
        }
        logit("et","ws6_server:ListenForMsg[%d:%s]: Bad socket read. "
                   "iReadResult = %d\n", iMyThreadID, client_ip[iMyThreadID], iReadResult);
        /* Broken socket.  Client must have gone away... */
        return -2;
      }
    }  /* end if (iReadResult <= 0) */
  }  /* end for (iCIndex < kMAX_CLIENT_MSG_LEN) */
  logit( "","ListenForMsg[%d:%s]: Error - message buffer overflow\n", iMyThreadID, client_ip[iMyThreadID]);
  return -3;
}

/********* END CODE SNIPPET *********/

in wave_serverV.h, I have

/********* START CODE SNIPPET *********/

typedef char szIP16[16];  /* used to store IP addr of client */

extern szIP16 * client_ip;  /* Array of client IP addresses (one per server thread)   */

/********* END CODE SNIPPET *********/


and in equiv of wave_serverV.c in  ServerMgr() thread (just avove the StartThreadWithArg() call to fire up the server thread,  I have


/********* START CODE SNIPPET *********/


    strcpy( client_ip[freeThrd], inet_ntoa(client[freeThrd].sin_addr) );
    if (iWS6ServerDebug >= WS6_DEBUG_ADVANCED_USER)
      logit("t","[A%d:%s](%d)\n", freeThrd, strrchr(client_ip[freeThrd],'.') ? strrchr(client_ip[freeThrd],'.') : "<UNKNOWN>",
            ServerThreadInfo[freeThrd].ActiveSocket);
    else
      printf("[A%d:%s]\n", freeThrd, strrchr(client_ip[freeThrd],'.') ? strrchr(client_ip[freeThrd],'.') : "<UNKNOWN>" );

    /* Start the Server thread
     **************************/
    if (iWS6ServerDebug >= WS6_DEBUG_ADVANCED_USER)
      logit("","Starting ServerThread %d \n",freeThrd);
   
    if ( StartThreadWithArg(  ServerThread, &freeThrd, (unsigned)THREAD_STACK, &tidSockSrv[freeThrd] )  == -1 )
    {
      logit( "e", "ws6_server: Error starting  SocketSender thread. Exiting.\n" );
      closesocket_ew( ServerThreadInfo[freeThrd].ActiveSocket,
                      SOCKET_CLOSE_IMMEDIATELY_EW );
      goto HeavyRestart;
    }

/********* END CODE SNIPPET *********/


I think that's



Paul Friberg wrote:
> Great, thanks. EW7.4 is ready to be pushed soon. I just finished clean compilation tests
> on 4 OS's (SPARC solaris, Win XP, Fedora Core Linux, Mac OS X).
>
> Cheers,
>
> Paul
>
> David Kragness wrote:
>   
>> Paul,
>> I believe I have code to do most of what Pete describes below.
>> I'll send it to you when I get a chance.
>> -david
>>
>> Peter Lombard wrote:
>>     
>>> Paul,
>>>
>>> The wave_serverV protocol is pretty well described in the comments at the top
>>> of wave_serverV.c. It does not support passing the client name to the server.
>>>
>>> If you add the client hostname to the ServerThreadInfo struct, then it can be
>>> passed to the thread that handles the client connection after it has been
>>> accepted.
>>>
>>> Or you could modify the code to print the thread ID (index to ServerThreadInfo
>>> array) when the connection is accepted and when the connection closes. Then
>>> the log file reader could find the matching "Connection accepted" and "Client
>>> closed" log entries.
>>>
>>> Pete
>>>
>>>
>>> Paul Friberg writes:
>>>   >  Thanks Pete,
>>>   >
>>>   >  I am well aware of gethostbyaddr() ;^)  What I meant was that I don't know if the IP
>>>   >  info is available in the server client handling thread where the "Client closed socket" message is spewed out.
>>>   >
>>>   >  Also, you know the wave_serverV client code better than I, so maybe you can comment if the
>>>   >  protocol (which seems to never have been fully documented, in a document at least) has any
>>>   >  indication of the program name of the client.
>>>   >
>>>   >  Cheers,
>>>   >
>>>   >  Paul
>>>   >
>>>   >  Peter Lombard wrote:
>>>   >  >  Paul,
>>>   >  >
>>>   >  >  wave_serverV can try to look up the hostname from the IP address. See for
>>>   >  >  example the code in AQMS in lib/tntcp/TCPConnServer.C:
>>>   >  >
>>>   >  >  TCPConn* TCPConnServer::Accept()
>>>   >  >  {
>>>   >  >    int clientsd;
>>>   >  >    struct sockaddr_in claddr;
>>>   >  >    socklen_t claddrlen;
>>>   >  >    struct hostent *hp;
>>>   >  >    char *ipaddr;
>>>   >  >
>>>   >  >    if ((valid != TN_TRUE) || (mysession == NULL)) {
>>>   >  >      return(new TCPConn());
>>>   >  >    }
>>>   >  >
>>>   >  >    // Accept the next waiting client
>>>   >  >    claddrlen = sizeof(struct sockaddr_in);
>>>   >  >    clientsd = accept(mysession->sd, (struct sockaddr *)&claddr,&claddrlen);
>>>   >  >    if (clientsd<  0) {
>>>   >  >      std::cout<<  "Error (TCPConnServer::Accept): Failure accepting client"<<  std::endl;
>>>   >  >      return(new TCPConn());
>>>   >  >    }
>>>   >  >
>>>   >  >    // Retrieve the client address
>>>   >  >    hp = gethostbyaddr((char *)&(claddr.sin_addr.s_addr),
>>>   >  >                       sizeof(claddr.sin_addr.s_addr), AF_INET);
>>>   >  >    if (hp == NULL) {
>>>   >  >      ipaddr = inet_ntoa(claddr.sin_addr);
>>>   >  >      std::cout<<  "Error (TCPConnServer::Accept): Invalid client address:"
>>>   >  >           <<  ipaddr<<  std::endl;
>>>   >  >      close(clientsd);
>>>   >  >      return(new TCPConn());
>>>   >  >    }
>>>   >  >
>>>   >  >    return(new TCPConn(clientsd, Client(hp->h_name, claddr.sin_port)));
>>>   >  >  }
>>>   >  >
>>>   >  >  Pete
>>>   >  >
>>>   >  >
>>>   >  >  Paul Friberg writes:
>>>   >  >   >  Hi Mike,
>>>   >  >   >
>>>   >  >   >  It might be able to add the IP of the client, but unless the wave_serverV protocol
>>>   >  >   >  actually includes the name of the client, getting that information is impossible.
>>>   >  >   >
>>>   >  >   >  Dave Kragness might know as he knows this code best of all.
>>>   >  >   >
>>>   >  >   >  I have checked Dave's wave_serverV end of tank fix into cvs and test compiled, but
>>>   >  >   >  don't have a test environment that produces the error being seen.
>>>   >  >   >
>>>   >  >   >  if nobody on ewdev has this env, I will seek volunteers to test this from the
>>>   >  >   >  earthw list...time for earthw folks to help and step up for testing :)
>>>   >  >   >
>>>   >  >   >  Cheers,
>>>   >  >   >
>>>   >  >   >  Paul
>>>   >  >   >
>>>   >  >   >  Mike Hagerty wrote:
>>>   >  >   >  >  Hi Stefan (and everyone else).
>>>   >  >   >  >  I'm not sure if I'm already subscribed to this list - I guess I'll
>>>   >  >   >  >  know if I receive a copy of this.
>>>   >  >   >  >
>>>   >  >   >  >  I just wanted to suggest something:  It seems to me that wave_serverV
>>>   >  >   >  >  generates the most error messages
>>>   >  >   >  >  of any earthworm module (?).  It would be very helpful to know what
>>>   >  >   >  >  client is requesting data from wave_serverV
>>>   >  >   >  >  when an error message is generated.
>>>   >  >   >  >
>>>   >  >   >  >  So, for example, even something in the wave_serverV logfile like:
>>>   >  >   >  >     Wave_serverV:   Client closed socket.
>>>   >  >   >  >
>>>   >  >   >  >  It would be great to know *which* client it was (e.g., heli_ewII,
>>>   >  >   >  >  waveman2disk, ew2mseed ...) and the ip address
>>>   >  >   >  >  of the machine the client was running on.
>>>   >  >   >  >
>>>   >  >   >  >  Just my two cents.
>>>   >  >   >  >
>>>   >  >   >  >  Cheers,
>>>   >  >   >  >
>>>   >  >   >  >  -Mike Hagerty
>>>   >  >   >  >  _______________________________________________
>>>   >  >   >  >  Ewdev mailing list
>>>   >  >   >  >  Ewdev@isti.com
>>>   >  >   >  >  http://bigboy.isti.com/mailman/listinfo/ewdev
>>>   >  >   >
>>>   >  >   >  _______________________________________________
>>>   >  >   >  Ewdev mailing list
>>>   >  >   >  Ewdev@isti.com
>>>   >  >   >  http://bigboy.isti.com/mailman/listinfo/ewdev
>>>   >
>>>   >  _______________________________________________
>>>   >  Ewdev mailing list
>>>   >  Ewdev@isti.com
>>>   >  http://bigboy.isti.com/mailman/listinfo/ewdev
>>> _______________________________________________
>>> Ewdev mailing list
>>> Ewdev@isti.com
>>> http://bigboy.isti.com/mailman/listinfo/ewdev
>>>
>>>
>>>       
>> _______________________________________________
>> Ewdev mailing list
>> Ewdev@isti.com
>> http://bigboy.isti.com/mailman/listinfo/ewdev
>>     
>
> _______________________________________________
> Ewdev mailing list
> Ewdev@isti.com
> http://bigboy.isti.com/mailman/listinfo/ewdev
>
>   

#46 fixed sgram not being made for windows paulf paulf
Description

sgram was left out of the display/Makefile....why? Get it to compile on win for 7.4

Note: See TracQuery for help on using queries.