[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

5245.0. "UCX crashes the system" by TIMAMD::VICTOR () Wed Feb 19 1997 10:53

	Hi,


	
	A customer has a problem with ALPHA 7.1 and UCX 4.1 (included in
	the VMS KIT).


	They have a client/server program with C-socket programming (I attach   
        the program below).
	It looks like it keeps in a bucle, and the system hungs and after       
	crashes.

	We can reproduce the crash with the customer program sources.
	 		
	We instaled ECO05 for UCX 4.1 in customer site, but it didn't fix the
	problem.
	
	We have SYSDUMP.DMP.

	Also, we reproduct the problem using the example from TIMA STARS

	"[UCX-VMS] C Socket, Non-Blocking Select() Call After an OOB" 


	It is **VERY URGENT** to tell the customer if this is a product bug or 
	it is a programming problem.

	A great loss of money will be done if we don't solve this problem
        because the customer had this program working with VMS 6.2 and UCX 4.0.

	
	Regards,

	Victor G.

****************************************************************************
CLIENT
***************	

	#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <strings.h>
#include "inet.h"

void err_dump();



main(argc,argv)
int argc;
char *argv[];
{
int i,rc,st;
char buf[100];
int sockfd,newsockfd,clilen,chilpid;
struct sockaddr_in cli_addr,serv_addr;

if ((sockfd = socket(AF_INET,SOCK_STREAM,0))<=0)
    err_dump("Client:Can't open stream socket");

bzero((char*)&serv_addr,sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = inet_addr(argv[1]);
serv_addr.sin_port = htons(3500);
if (connect(sockfd,(struct sockaddr*)&serv_addr,sizeof(serv_addr))<0)
	err_dump("Client: Error en connect");
printf("Conectado\n");
for (i=0 ; i<1000000 ; i++)
	{
	fd_set  rmask;              /* Mascara de sockets */
	/*
	/* mandamos un buffer
	/* */
	if (send(sockfd,"123456789012345678901234567890",30,0)<0)
	    err_dump("Error en send\n");
	/*
	/* esperar la respuesta
	/* */
	FD_ZERO(&rmask);
	FD_SET(sockfd,&rmask);
	st = select(sockfd+1,&rmask,0,0,0);


	rc = recv(sockfd,buf,sizeof(buf),MSG_PEEK);
	if (rc <= 0)
	    err_dump("Error en recv\n");
	if (recv(sockfd,buf,rc,0)<=0)
	    err_dump("Error en recv2\n");
	}
close(sockfd);
exit(0);
}

void err_dump(buf)
char *buf;
{
printf("%s\n",buf);
exit(0);
}


******************************************************************************
	SERVER.
*******************

#include <stdio.h>
#include <types.h>
#include <socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <strings.h>
#include <unistd.h>
#include <stdlib.h>
#include "inet.h"

void err_dump();

main(argc,argv)
int argc;
char *argv[];
{
char buf[100];
int rc,st;
int sockfd,newsockfd,chilpid,i;
unsigned int clilen;
struct sockaddr_in cli_addr,serv_addr;

if ((sockfd = socket(AF_INET,SOCK_STREAM,0))<=0)
    err_dump("Server:Can't open stream socket");

bzero((char*)&serv_addr,sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(3500);

if (bind(sockfd,(struct sockaddr*)&serv_addr,sizeof(serv_addr))<0)
	err_dump("Server:can't bind local address");

listen(sockfd,5);

for ( ; ; )
	{
	clilen = sizeof(cli_addr);
	newsockfd = accept(sockfd,(struct sockaddr*)&cli_addr,&clilen);
	if (newsockfd <0)
		err_dump("Server: accept error");
	printf("Nueva conexi�n\n");
	for (i=0 ; i<1000000 ; i++)
		{
	        fd_set  rmask;              /* Mascara de sockets */
	        /*
	        /* mandamos un buffer
	        /* */
	        if (send(newsockfd,"123456789012345678901234567890",30,0)<0)
	            err_dump("Error en send\n");
	        /*
	        /* esperar la respuesta
	        /* */
	        FD_ZERO(&rmask);
	        FD_SET(newsockfd,&rmask);
	        st = select(newsockfd+1,&rmask,0,0,0);
	        /*
	        /* esperar mensaje
	        /* */
	        rc = recv(newsockfd,buf,sizeof(buf),MSG_PEEK);
	        if (rc <= 0)
	            err_dump("Error en recv\n");
	        if (recv(newsockfd,buf,rc,0)<=0)
	            err_dump("Error en recv2\n");
	        /*
	        /* mandamos contestaci�n
	        /* */
	        if (send(newsockfd,"123456789012345678901234567890",30,0)<0)
	            err_dump("Error en send\n");
		}
	printf("Fin conexi�n\n");
	close(newsockfd);
	}
}

void err_dump(buf)
char *buf;
{
printf("%s\n",buf);
exit(0);
}
T.RTitleUserPersonal
Name
DateLines
5245.1Should be fixed by UCX 4.1 PAT5 ...SOS6::DIETZPierre-Etienne DIETZ, Support/FranceFri Feb 21 1997 04:5927
RE: 5245.0 by TIMAMD::VICTOR -< UCX crashes the system >-
>	A customer has a problem with ALPHA 7.1 and UCX 4.1 
>	... we installed ECO05 ... same crash ...

	Hello Victor,

We had probably the same problem (see note #5097.5), that has been 
IPMT'ed, then fixed by Robert Rappaport, and is now available in the 
following kit: ( LASSIE::UCX$INTERNAL: )

    DEC-AXPVMS-UCXPAT5_41_5-V0500--4.PCSI;1
      17920/17928    30-JAN-1997 16:20:41.00  (RWED,RWED,,)

containing...
!  ECO T   13-JAN-1997      Alpha and VAX
!          Image:
!          UCX$BGDRIVER.EXE                        UCX V4.1-12T  (Alpha)
!          .../...
!          Problem:
!          SSRVEXCEPT, on OpenVMS V7.x, when receiving OOB data.

NB: There is no V4.1 ECO05 today, but there is instead this V4.1 PAT5.
    As a reference, have a look to the STARS article,
    " [UCX-VMS] UCX ECO and PAT status for V4.1, V4.0, V3.3 "

Hope this helps, best regards,
Pierre-Etienne