tsp-devel
[Top][All Lists]
Advanced

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

Re: [Tsp-devel] patch RPC cherche testeurs sous Solaris


From: Stephane Galles
Subject: Re: [Tsp-devel] patch RPC cherche testeurs sous Solaris
Date: Wed, 27 Oct 2004 18:19:34 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913


c'est quoi le test à faire pour reproduire le plantage ? parceque j'ai le même noyau (mais non SMP) mais une glibc 2.3.2.

Un test sur ma config pourrait nous donner des infos.

NOULARD Eric wrote:

Après quelques investigations il s'avère que c'est la fonction svc_destroy
qui semble planter sous Linux (noyau 2.6.8.1 glibc 2.3.3)
si on l'enlève tout bonnement et qu'on fait
seulement

svc_unregister
pmap_unset

ben c'est ok??

D'où 2 questions:

1) A quoi sert réellement svc_destroy?
  l'argument de type SVCXPRT* qui est détruit par svc_destroy
  est utilise (probablement) par svn_run, suite au svc_tcpcreate
  +svc_register. Hors svc_run ne revient jamais, donc que se passe-t-il
  quand on "svc_destroy" quand svc_run n'est pas terminé?

2) est-ce que le patch qui suit serait OK sous Solaris
 Patch applicable avec un
 cd $DEVBASE
 patch -p0 < rpc_linux.patch

Des volontaires pour tester ça sous Solaris
avant que je commite ces changements?

A noter que j'ai donné la version de la glibc car sous Linux
la lib [sun]rpc fait visiblement de la glibc
dans les sources (par exemple de la 2.3.3)
glibc-2.3.3/sunrpc/rpc/svc.h:

#define svc_destroy(xprt)                               \
       (*(xprt)->xp_ops->xp_destroy)(xprt)

Ce qui ne m'aide pas beaucoup...

------------------------------------------------------------------------

Index: src/core/rpc/tsp_server.c
===================================================================
RCS file: /cvsroot/tsp/tsp/src/core/rpc/tsp_server.c,v
retrieving revision 1.18
diff -r1.18 tsp_server.c
39a40
/* FIXME a quoi sert ce define ? */
42a44,46
#include <rpc/pmap_clnt.h>
#include <stdio.h>
#include <unistd.h>
45a50
#include "../ctrl/tsp_provider.h"
50d54
< 51a56,60
#include "tsp_rpc_confprogid.h"

void
tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp) ;

54a64
#define TSP_URL_MAXLENGTH 256
58c68
<   char url[256];
---
 char url[TSP_URL_MAXLENGTH];
64,71c74,76
< < static TSP_provider_info_t server_info;
<    
<   STRACE_IO(("-->IN"));
< < < server_info.info = GLU_get_server_name(); < ---
 static TSP_provider_info_t server_info;        
STRACE_IO(("-->IN")); server_info.info = GLU_get_server_name();
73,75d77
< < < 84,93c86,88 < < < STRACE_IO(("-->IN")); < <
<   TSP_provider_request_open(&req_open, &ans_open);
<    
<   STRACE_IO(("-->OUT"));
< <
---
 STRACE_IO(("-->IN"));     
 TSP_provider_request_open(&req_open, &ans_open);       
 STRACE_IO(("-->OUT"));    
117,119c112
<   STRACE_IO(("-->IN"));
< <
---
 STRACE_IO(("-->IN"));     
121,124c114
< < STRACE_IO(("-->OUT")); < <
---
STRACE_IO(("-->OUT"));
135d124
< 137d125 < 150d137 < 160d146 < 173d158 < 180d164 < 183,186d166 < < < < 189d168
<    
200d178
< 202d179 < 221,224d197 < < void
< tsp_rpc_1(struct svc_req *rqstp, register SVCXPRT *transp) ;
< 260,261c233,234
<    /* svc_create does not exist for linux, we must use the deprecated 
function */
<   pmap_unset (rpc_progid, TSP_RPC_VERSION_INITIAL);
---
 /* svc_create does not exist for linux, we must use the deprecated function */
 //pmap_unset (rpc_progid, TSP_RPC_VERSION_INITIAL);
285a259,261
 //STRACE_DEBUG(("calling svc_exit..."));
 //svc_destroy(config->xprt);

288a265
     
svc_unregister(TSP_get_progid(config->server_number),TSP_RPC_VERSION_INITIAL);
291,293d267
< < STRACE_DEBUG(("calling svc_exit..."));
<   svc_destroy(config->xprt);
314c288
<   TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t 
*)this->config_param;
---
 TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t 
*)(this->config_param);
318,319c292,294
<   strcpy(config->url, "");
< ---
 /* do not buffer overflow */
 memset(&config->url[0],'\0',TSP_URL_MAXLENGTH);
332c307,308
<       sprintf(config->url, TSP_URL_FORMAT, TSP_RPC_PROTOCOL, hostname, 
servername, config->server_number);
---
     snprintf(config->url, TSP_URL_MAXLENGTH,
               TSP_URL_FORMAT, TSP_RPC_PROTOCOL, hostname, servername, 
config->server_number);
346c322
<   TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t 
*)this->config_param;
---
 TSP_rpc_request_config_t *config = (TSP_rpc_request_config_t 
*)(this->config_param);
350c326
<   pthread_detach(pthread_self()); /* FIXME shoudl we do this */
---
 //pthread_detach(pthread_self()); /* FIXME shoudl we do this */
366c342
<   TSP_rpc_request_config_t *config = 
(TSP_rpc_request_config_t*)this->config_param;
---
 TSP_rpc_request_config_t *config = 
(TSP_rpc_request_config_t*)(this->config_param);
375c351
<   TSP_rpc_request_config_t *config = 
(TSP_rpc_request_config_t*)this->config_param;
---
 TSP_rpc_request_config_t *config = 
(TSP_rpc_request_config_t*)(this->config_param);
385c361
< void main(void)
---
int main(void)
392a369
 return 0;
------------------------------------------------------------------------

_______________________________________________
Tsp-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tsp-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]