comp.lang.ada
 help / color / mirror / Atom feed
* Using DCE RPC with Ada
@ 1994-10-26 16:57 crist
  1994-10-27  1:40 ` R. William Beckwith
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: crist @ 1994-10-26 16:57 UTC (permalink / raw)



I'm trying to build a very simple client/server application using DCE RPC and
Ada which is giving me problems.  My DCE client is currently written in C
running on an IBM RS/6000 with AIX 3.2.5.  My DCE server uses C for server
initialization and Verdix 6.2.1 Ada for the server manager procedures and also
runs on a 6000.  The server main program is in Ada and simply calls the server
initialization C code using a pragma INTERFACE.  If the server manager Ada code
only contains null statements or simple assignment statements things appear to
work but it isn't very useful.  However, if the server manager code tries to
return data to the client or tries to use the TEXT_IO package the server core
dumps after receiving a SIGTRAP (5) signal from AIX.  I'm assuming that the
problem has something to do with the Ada Runtime and DCE Runtime systems not
playing nicely with each other in my server executable since both Runtime
systems are multi-threaded.  Anyone out there have any experience, or at least
some thoughts, on using DCE RPC with Ada that they would like to share?
Thanks!
--
Rick Crist
Loral Federal Systems
Owego, NY
(607) 751-5086       rcrist@lfs.loral.com



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

* Re: Using DCE RPC with Ada
  1994-10-26 16:57 Using DCE RPC with Ada crist
@ 1994-10-27  1:40 ` R. William Beckwith
  1994-10-31  9:25 ` David Emery
  1994-11-02 21:37 ` Stef Van Vlierberghe
  2 siblings, 0 replies; 4+ messages in thread
From: R. William Beckwith @ 1994-10-27  1:40 UTC (permalink / raw)


Text_IO's usually use a mutex to protect the non-reentrant
O/S I/O routines.  The use of the mutex in a thread that the
Ada kernel doesn't know about (didn't create) will usually
cause a problem like you are describing.

I hate to say it, but you're probably going to have to
pragma to printf to print anything.

... Bill

-- 
e-mail: Bill.Beckwith@ois.com       |    Team Ada
Objective Interface Systems, Inc.   | dist, full O-O
1895 Preston White Drive, Suite 250 | multithreading
Reston, VA  22091-5448  U.S.A.      |    built in



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

* Re: Using DCE RPC with Ada
  1994-10-26 16:57 Using DCE RPC with Ada crist
  1994-10-27  1:40 ` R. William Beckwith
@ 1994-10-31  9:25 ` David Emery
  1994-11-02 21:37 ` Stef Van Vlierberghe
  2 siblings, 0 replies; 4+ messages in thread
From: David Emery @ 1994-10-31  9:25 UTC (permalink / raw)


In general, Ada/DCE interfacing is not 'reliable' due to the
interactions (and lack thereof) between Ada tasks and DCE threads.  Do
NOT expect this to be fixed anytime soon.  

The Ada community worked hard to get the forthcoming POSIX threads
standard to be 'Ada Friendly'.  We were only partially successful.
Once POSIX threads comes out, Ada RTS vendors can work on integrating
Ada tasks and POSIX/C threads.  

In the meantime, strange things can happen...

				dave
--
--The preceeding opinions do not necessarily reflect the opinions of
--The MITRE Corporation or its sponsors. 
-- "A good plan violently executed -NOW- is better than a perfect plan
--  next week"                                      George Patton
-- "Any damn fool can write a plan.  It's the execution that gets you
--  all screwed up"                              James Hollingsworth
-------------------------------------------------------------------------



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

* Re: Using DCE RPC with Ada
  1994-10-26 16:57 Using DCE RPC with Ada crist
  1994-10-27  1:40 ` R. William Beckwith
  1994-10-31  9:25 ` David Emery
@ 1994-11-02 21:37 ` Stef Van Vlierberghe
  2 siblings, 0 replies; 4+ messages in thread
From: Stef Van Vlierberghe @ 1994-11-02 21:37 UTC (permalink / raw)


In article <38m1po$gvm@news.manassas.ibm.com> crist@tbirdo.endicott.ibm.com () writes:
   ... both
   systems are multi-threaded.  Anyone out there have any experience, or at least
   some thoughts, on using DCE RPC with Ada that they would like to share?
   Thanks!

I remember looking at DCE-Ada integration on HP400 a few years ago. We found
that both DCE and the Ada runtime (this was for Alsys but goes probably for
Verdix too), were installing signal handlers (for SIGALRM) during their
initialization, and both were assuming nobody else would be tampering with
this setup. As both systems are to a large extent doing similar things, I
guess they would also both assume they "own" the (one-and-only) timer, signal
mask, and thinking of TEXT_IO, probably also SIGIO handler, tty settings...

This aside, getting a SIGTRAP is pretty wild. I would expect such problem only
when the PC gets lost (stack corruptions of some sort, rare event), or if you
have been running a debugger on a program that somehow got detached from the
debugger and hit a breakpoint without having the trace flag set, such that the
associated TRAP got delivered to the program.

If you really need this heterogenous environment, then you better don't use
tasking, such that you don't get these interactions (Alsys, and I think Verdix,
will link in a special non-tasking runtime system if possible).
--
Stef VAN VLIERBERGHE            Eurocontrol - Central Flow Management Unit
stef@cfmu.eurocontrol.be        Avenue des Arts 19H
Tel: +32 2 729 33 42            B-1040 BRUSSELS
Fax: +32 2 729 32 16            Belgium



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

end of thread, other threads:[~1994-11-02 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-26 16:57 Using DCE RPC with Ada crist
1994-10-27  1:40 ` R. William Beckwith
1994-10-31  9:25 ` David Emery
1994-11-02 21:37 ` Stef Van Vlierberghe

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