home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / isis / 305 < prev    next >
Encoding:
Text File  |  1992-11-13  |  4.5 KB  |  147 lines

  1. Newsgroups: comp.sys.isis
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!ken
  3. From: ken@cs.cornell.edu (Ken Birman)
  4. Subject: Re: well, so much for pmaxen...
  5. Message-ID: <1992Nov13.140529.2514@cs.cornell.edu>
  6. Organization: Cornell Univ. CS Dept, Ithaca NY 14853
  7. References: <8f0kRje00h5KEND0Ro@cs.cmu.edu>
  8. Date: Fri, 13 Nov 1992 14:05:29 GMT
  9. Lines: 136
  10.  
  11. In article <8f0kRje00h5KEND0Ro@cs.cmu.edu> Sean.Levy@cs.cmu.edu writes:
  12. >After moving my RDBMS to a pmax and firing up ISIS, I attempted to fire
  13. >up my RDBMS backend process:
  14. >---
  15. >loos/p1:/usr/isis/spool [Thursday 12 Nov 8:21pm]
  16. >116 % backend+ix+EXP+DEBUG
  17. >NOTICE: dbbe_monitor called -- group view...
  18. >*** Group /ndim/db/backend has 1 members on these machines:
  19. >pid 4618 (backend+ix+EXP+DEBUG) was killed on an unaligned access, at pc
  20. >0x41365
  21. >0
  22. >Bus error (core dumped)
  23. >loos/p1:/usr/isis/spool [Thursday 12 Nov 8:21pm]
  24. >117 % dbx `which backend+ix+EXP+DEBUG` core
  25. >dbx version 2.10.1
  26. >Type 'help' for help.
  27. >Corefile produced from file "backend+ix+EXP+DEBUG"
  28. >Child died at pc 0x413650 of signal : Bus error
  29. >reading symbolic information ...
  30. >[using memory image in core]
  31. >(dbx) where
  32. >>  0 isis_getstats(0xbe2, 0x100784ec, 0x100784cc, 0x0, 0x4005e0)
  33. >["../../clib/cl
  34. >_isis.c":3477, 0x41364c]
  35. >   1 isis_gethostname(0xbe2, 0x100808b0, 0x1, 0x0, 0x4003c4)
  36. >["../../clib/cl_isi
  37. >s.c":3516, 0x4138a4]
  38. >   2 .block1 ["../../../../../src/ndim/db/backend.c":388, 0x4005dc]
  39. >   3 dump_gv(gv = 0x10080898)
  40. >["../../../../../src/ndim/db/backend.c":388, 0x400
  41. >5dc]
  42. >   4 dbbe_monitor(gview_p = 0x10080898, arg = 0)
  43. >["../../../../../src/ndim/db/ba
  44. >ckend.c":257, 0x4003c0]
  45. >   5 pg_pwatch_invoke(0x0, 0x0, 0x0, 0x0, 0x0)
  46. >["../../clib/cl_pgroup.c":423, 0x
  47. >41967c]
  48. >   6 invoke(0x0, 0x0, 0x0, 0x0, 0x0) ["../../clib/cl_task.c":686, 0x417914]
  49. >   7 task_swtch(0x0, 0x0, 0x0, 0x0, 0x0) ["../../clib/cl_task.c":562, 0x4173d0]
  50. >-----
  51. >Wonderful. This is Ultrix 4.2, decstation 5000/200, ISIS 3.0.5. Any idears?
  52.  
  53. I don't have ISIS V3.0.5 online from where I am looking at this, but
  54. in V3.0.7 this makes no sense.  The arguments to isis_getstats are:
  55. static
  56. isis_getstats(ap, where, len, hispid)
  57.   address *ap;
  58.   char *where;
  59.   int *hispid;
  60.  
  61. ... so we can see that hispid (which the code dereferences) is being
  62. passed as a null pointer.  But, the caller looks like:
  63.  
  64. void
  65. isis_gethostname(ap, where, len)
  66.   address *ap;
  67.   char *where;
  68.   {
  69.         int hispid;
  70.         isis_getstats(ap, where, len, &hispid);
  71.   }
  72.  
  73. ... which obviously shouldn't pass a null 4th argument.  Looks like
  74. either V3.0.5 has a problem in isis_gethostname (if so, I don't recall
  75. it) or that the compiler is totally wacko.
  76.  
  77. My guess is that there was some problem in V3.0.5 -- that release is from
  78. a while ago and lots of little things have been fixed.  
  79.  
  80. As a work-around on this particular thing, here's how the code for these
  81. routines looks in V3.0.7:
  82.  
  83.  
  84. static
  85. isis_getstats(ap, where, len, hispid)
  86.   address *ap;
  87.   char *where;
  88.   int *hispid;
  89.   {
  90.         static char name[128];
  91.         static pid;
  92.         static address who;
  93.         static inside;
  94.         static condition want_in;
  95.         if(inside)
  96.             t_wait_l(&want_in, "isis_getstats:wantin");
  97.         inside = 1;
  98.         if(addr_isequal(&who, ap))
  99.             *hispid = pid;
  100.         else
  101.         {
  102.             if(!addr_isrclient(ap) && !addr_isdclient(ap))
  103.             {
  104.                 /* In this case, it's easy */
  105.                 if(site_names_len == 0)
  106.                     t_wait_l(&isis_want_snames, "waiting for site-names info");
  107.                 strcpy(name, site_names[ap->addr_site]);
  108.                 *hispid = ap->addr_process;
  109.             }
  110.             else
  111.             {
  112.                 *hispid = -1;
  113.                 strcpy(name, "**timeout**");
  114.                 if(cbcast_l("T5", ap, GENERIC_GETHOSTNAME, "", 1, "%s,%d", name,
  115.  hispid) != 1)
  116.                     goto done;
  117.             }
  118.             who = *ap;
  119.         }
  120.         if(strlen(name)+1 < len)
  121.             len = strlen(name)+1;
  122.         if(where)
  123.             bcopy(name, where, len);
  124.   done:
  125.         if(t_waiting(&want_in))
  126.             t_sig(&want_in, 0);
  127.         else
  128.             inside = 0;
  129.   }
  130.  
  131. void
  132. isis_gethostname(ap, where, len)
  133.   address *ap;
  134.   char *where;
  135.   {
  136.         int hispid;
  137.         isis_getstats(ap, where, len, &hispid);
  138.   }
  139.  
  140. ... so, you can include this right into your program, in the limit, 
  141. by changing names.
  142.  
  143. -- 
  144. Kenneth P. Birman                              E-mail:  ken@cs.cornell.edu
  145. 4105 Upson Hall, Dept. of Computer Science     TEL:     607 255-9199 (office)
  146. Cornell University Ithaca, NY 14853 (USA)      FAX:     607 255-4428
  147.