From: c632692@csdeca.cs.missouri.edu (Vepa V Sirish)
Subject: Re: Increasing pthread stack in an RPC-server.
Date: 1995/06/06 [thread overview]
Message-ID: <3r1tkm$ond@news.missouri.edu> (raw)
In-Reply-To: D9Cysp.63p@undergrad.math.uwaterloo.ca
Gopi K. Attaluri (gkattalu@neumann.uwaterloo.ca) wrote:
: hi,
: I am writing RPC-based server application using Encina and DCE. I
: run into problems such as corrupted stacks and corrupted pthread internal
: data structures. I suspect that they are due to stack overflow of server
: threads.
: The documentation for pthreads says that stack-size must be specified
: at thread creation time. But, the server threads are created by the RPC-runtime
: not the application itself. Is there any way I can "instruct" the RPC run-time
: to allocate a larger stack to each thread?
: Thanks,
: -gopi krishna.
: ---
: Gopi K. Attaluri
: Department of Computer Science
: University of Waterloo
: gkattalu@neumann.uwaterloo.ca
use rpc_mgmt_set_server_stack_size
#define STACKSIZE (64*1024)
{
int st ;
unsigned int thread_stk_size = STACKSIZE ;
rpc_mgmt_set_server_stack_size(thread_stk_size,&st) ;
if (st != rpc_s_ok) {
handle the error here
}
thread_status = pthread_attr_getstacksize(thread_atribs) ;
CHECK(thread_status,"attr_getstacksize failed") ;
thread_status = pthread_attr_setstacksize(&thread_atribs,thread_stk_size);
CHECK(thread_status,"setstacksize failed");
}
Ideally one would check if the current stack size is less than what is to be
set and then proceed to increase the stack size.
hope this helps
-sirish
--
*******************************************************************************
316 A&S Bldg, U of Missouri, Columbia MO 65211
E-mail : sirish@csdeca.cs.missouri.edu, c632692@mizzou1.missouri.edu
*******************************************************************************
prev parent reply other threads:[~1995-06-06 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-05-29 4:00 Increasing pthread stack in an RPC-server Gopi K. Attaluri
1995-06-06 4:00 ` Vepa V Sirish [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox