[comp.os.mach] How to start the NetMsgServer under osf/1?

jglienha@immd4.informatik.uni-erlangen.de (Joerg Lienhardt) (06/07/91)

We are working on a DEC-Station 3100 running under osf/1. We are interested in
starting the NetMsgServer, which is not started during boot time.

We found an osf/rose object file named /usr/sbin/netmsgserver and started it
with no arguments.
It produced the following output and did terminate:

No default configuration file
Started netmsgserver at Wed Jun  5 07:23:11 1991
netmsgserver:   print_level = 5.
Broadcast address: 0xff2cbc83
pthread_cthread: error num 2
netname_init.netname_check_in fails, kr = -102.
Panic: netname_init fails.
log dumped

Does somebody know what's wrong ?

Send mail to: jglienha@immd4.informatik.uni-erlangen.de

Thanks!!!!!!

dfr@cs.brown.edu (David Ross) (06/10/91)

In article <1991Jun7.093135.6163@informatik.uni-erlangen.de>, jglienha@immd4.informatik.uni-erlangen.de (Joerg Lienhardt) writes:
|> We are working on a DEC-Station 3100 running under osf/1. We are interested in
|> starting the NetMsgServer, which is not started during boot time.
|> 
|> We found an osf/rose object file named /usr/sbin/netmsgserver and started it
|> with no arguments.
|> It produced the following output and did terminate:
|> 
|> No default configuration file
|> Started netmsgserver at Wed Jun  5 07:23:11 1991
|> netmsgserver:   print_level = 5.
|> Broadcast address: 0xff2cbc83
|> pthread_cthread: error num 2
|> netname_init.netname_check_in fails, kr = -102.
|> Panic: netname_init fails.
|> log dumped
|> 
|> Does somebody know what's wrong ?
|> 
|> Send mail to: jglienha@immd4.informatik.uni-erlangen.de

Would you mind posting replies to the net?  I'm sure there 
are many of us who are struggling with this problem.

		Thanks!
		David

-------------------------------------------------------------------------------
David Ross  	 			Brown University Computer Science
Box 1910				dfr@cs.brown.edu
Brown University			dfr@browncs.bitnet
Providence, RI  02912			uunet!brunix!dfr
-------------------------------------------------------------------------------

cy01@gte.com (Che-Liang Yang) (06/11/91)

In article <78010@brunix.UUCP> dfr@cs.brown.edu (David Ross) writes:
>In article <1991Jun7.093135.6163@informatik.uni-erlangen.de>, jglienha@immd4.informatik.uni-erlangen.de (Joerg Lienhardt) writes:
>|> We are working on a DEC-Station 3100 running under osf/1. We are interested in
>|> starting the NetMsgServer, which is not started during boot time.
>|> 
>|> We found an osf/rose object file named /usr/sbin/netmsgserver and started it
>|> with no arguments.
>|> It produced the following output and did terminate:
>|> 
>|> No default configuration file
>|> Started netmsgserver at Wed Jun  5 07:23:11 1991
>|> netmsgserver:   print_level = 5.
>|> Broadcast address: 0xff2cbc83
>|> pthread_cthread: error num 2
>|> netname_init.netname_check_in fails, kr = -102.
>|> Panic: netname_init fails.
>|> log dumped
>|> 
>|> Does somebody know what's wrong ?
>|> 
>|> Send mail to: jglienha@immd4.informatik.uni-erlangen.de
>
>Would you mind posting replies to the net?  I'm sure there 
>are many of us who are struggling with this problem.
>
>		Thanks!
>		David
>
>-------------------------------------------------------------------------------
>David Ross  	 			Brown University Computer Science
>Box 1910				dfr@cs.brown.edu
>Brown University			dfr@browncs.bitnet
>Providence, RI  02912			uunet!brunix!dfr
>-------------------------------------------------------------------------------



We have ported Mach NetMsgServer to OSF/1 running on DEC-Station 3100.
Applications running on OSF/1 can use Mach IPC to communicate
with others running on OSF/1 and MSD 2.6 (SUN/3).

To use Mach Network IPC on OSF/1, two things have to be done:
1. a process similar to mach_init in MSD 2.6 must be running;
2. NetMsgServers are running.

In OSF/1, if you call mach_ports_lookup(), you will find out that
NAME_SERVER_SLOT, ENVIORNMENT_SLOT, and SERVICE_SLOT are all empty.
This means that the init process (pid 1) in OSF/1 does not
support Mach name bootstrapping.

In MSD 2.6, the init process first creates a child process, mach_init.
Before the parent proceeds, mach_init creates ports for
name_server_port, environment_port, and service_port, and then
uses mach_ports_register() to initialize the slots in parent process.
After this is done, the parent process execs Unix init program
while mach_init is running as a server to provide 
the receive rights of the service ports
to those real Mach servers (such as NetMsgServer and EnvMgr).

We don't have source codes for the init program in OSF/1.
The only thing we could do was to write a "new" init program.
We changed the name of the original init program to "OSF_init".
(This will trick the kernel to run our init program first.)
The new init program will do the similar job as in MSD 2.6.
Finally, the init process execs "OSF_init".

The binary for NetmsgServer from OSF/1 has problems too.
We ported Netmsgserver from MSD 2.6:
1. For some reasons, I could not port c-threads to OSF/1.
   I then was forced to change the NetMsgServer to use p-thread instead.
   The problem with p-thread is that the default stack spaces
   allocated to threads other than the main thread are too small.
   We had to use p-thread primitives to change that explicitly.
2. In MSD 2.6, NetMsgServers (the datagram and srr modules)
   use a new UDP interface (through netipc_listen, netipc_send,
   and netipc_receive) for exchanging control messages. 
   Users have more control on UDP packets through the new interface
   than the "old" one (socket UDP interface).
   Unfortunately, the new interface is not working on OSF/1.
   (Specifically, NetMsgServer cannot receive UDP packets through
   the new interface.)
   I had to change the NetMsgServer to use the old interface
   to receive UDP packets.

The solution is not perfect, but it allows my Mach applications
to continue to run on OSF/1.

C-L Yang