Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Multithreaded programs and RPCs
@ 1995-09-02  4:00 Scott Miller
  1995-09-04  4:00 ` David Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Miller @ 1995-09-02  4:00 UTC (permalink / raw)



I wrote a simple program that spawns off a thread to act as an RPC server.
It core dumps.  However, if I spawn off a thread to do the 'main' loop, and 
use the main thread to act as the RPC server, it (seems to) work. Why is this?
Can a non-first thread in a process act as an RPC server? Do I need to
compile/link with some different switches?

ONC RPC, OSF1 V3.2, using cc options '-threads -lc_r -lpthreads'. I've also
thrown in '-lmach -lrpc -lrpcsvc'.  Any clues?
 



-- 
--
Scott Miller, in the bowels of Bell-Northern Research          smiller@bnr.ca 
I don't speak for BNR; BNR doesn't speak for me.    aa438@freenet.carleton.ca




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

* Re: Multithreaded programs and RPCs
  1995-09-02  4:00 Multithreaded programs and RPCs Scott Miller
@ 1995-09-04  4:00 ` David Jones
  1995-09-05  4:00   ` Scott Miller
  0 siblings, 1 reply; 3+ messages in thread
From: David Jones @ 1995-09-04  4:00 UTC (permalink / raw)


In message <4289kh$hv6@bcarh8ab.bnr.ca>, smiller@bnr.ca (Scott Miller) writes:
>I wrote a simple program that spawns off a thread to act as an RPC server.
>It core dumps.  However, if I spawn off a thread to do the 'main' loop, and
>use the main thread to act as the RPC server, it (seems to) work. Why is this?
>Can a non-first thread in a process act as an RPC server? Do I need to
>compile/link with some different switches?
>
>ONC RPC, OSF1 V3.2, using cc options '-threads -lc_r -lpthreads'. I've also
>thrown in '-lmach -lrpc -lrpcsvc'.  Any clues?

Most likely the RPC server function overflows the stack in your created thread.


David L. Jones               |      Phone:    (614) 292-6929
Ohio State Unviversity       |      Internet:
2070 Neil Ave. Rm. 122       |               jonesd@kcgl1.eng.ohio-state.edu
Columbus, OH 43210           |               vman+@osu.edu

Disclaimer: Dogs can't tell it's not bacon.



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

* Re: Multithreaded programs and RPCs
  1995-09-04  4:00 ` David Jones
@ 1995-09-05  4:00   ` Scott Miller
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Miller @ 1995-09-05  4:00 UTC (permalink / raw)



In article <42f657$oef@charm.magnus.acs.ohio-state.edu>, JONESD@kcgl1.eng.ohio-state.edu (David Jones) writes:
|> In message <4289kh$hv6@bcarh8ab.bnr.ca>, smiller@bnr.ca (Scott Miller) writes:
|> >I wrote a simple program that spawns off a thread to act as an RPC server.
|> >It core dumps...
|> 
|> Most likely the RPC server function overflows the stack in your created
|> thread.

Yep, that was it.  I was so busy worrying about the libraries that I forgot
about the (default) 21K stack.  It made sense too, because the output of 
tstack in dbx was truncated for one of the threads, which should have
clued me in to a stack problem.  (Or maybe that had nothing to do with it)

Anyway, thanks for the help.  It was appreciated.
-- 
--
Scott Miller, in the bowels of Bell-Northern Research          smiller@bnr.ca 
I don't speak for BNR; BNR doesn't speak for me.    aa438@freenet.carleton.ca




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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-09-02  4:00 Multithreaded programs and RPCs Scott Miller
1995-09-04  4:00 ` David Jones
1995-09-05  4:00   ` Scott Miller

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