Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Increasing pthread stack in an RPC-server.
@ 1995-05-29  4:00 Gopi K. Attaluri
  1995-06-06  4:00 ` Vepa V Sirish
  0 siblings, 1 reply; 2+ messages in thread
From: Gopi K. Attaluri @ 1995-05-29  4:00 UTC (permalink / raw)



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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Increasing pthread stack in an RPC-server.
  1995-05-29  4:00 Increasing pthread stack in an RPC-server Gopi K. Attaluri
@ 1995-06-06  4:00 ` Vepa V Sirish
  0 siblings, 0 replies; 2+ messages in thread
From: Vepa V Sirish @ 1995-06-06  4:00 UTC (permalink / raw)


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
*******************************************************************************



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-06-06  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-05-29  4:00 Increasing pthread stack in an RPC-server Gopi K. Attaluri
1995-06-06  4:00 ` Vepa V Sirish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox