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

  1. Organization: Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!news.tek.com!psgrain!charnel!rat!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!<UNAUTHENTICATED>+
  3. Newsgroups: comp.sys.isis
  4. Message-ID: <Af05oZO00hNSI1DYZ2@cs.cmu.edu>
  5. Date: Tue, 10 Nov 1992 20:08:53 -0500 
  6. From: Sean Levy <snl+@cs.cmu.edu>
  7. Subject: join never returns
  8. Lines: 353
  9.  
  10. This is with ISIS V3.0.5 on a sun4. I have the following, admitedly
  11. ugly, code which intends to join a process group called /ndim/ws and
  12. generally set things up.
  13. ---
  14. void
  15. join()
  16. {
  17.   void recieve(), change();
  18.  
  19. #ifdef TALKY
  20.   fprintf(stderr, "ISIS setup -- joining ndim process group\n");
  21. #endif
  22.   isis_remote_init(0, 0, 0, ISIS_NOCOPYRIGHTNOTICE | ISIS_PANIC);
  23.   isis_task(join, "join");
  24.   isis_entry(NDIM_RECV, recieve, "recieve");
  25.   gaddr = pg_join("/ndim/ws",
  26.           PG_MONITOR, change, 0,
  27.           0);
  28.   if (addr_isnull(gaddr)) {
  29.     fprintf(stderr, "Error initializing ISIS on port %d - aborting.\n",
  30.         port_no);
  31.     exit(200);
  32.   }
  33. #ifndef  OWN_MAINLOOP
  34. #ifdef TALKY
  35.   fprintf(stderr, "initializing ISIS/Tk interaction\n");
  36. #endif
  37.   init_ISIS_Tk();
  38. #endif 
  39.   isis_start_done();
  40. #ifdef TALKY
  41.   fprintf(stderr, "ISIS startup completed\n");
  42. #endif
  43. }
  44. ---
  45. This application uses the Tcl/Tk language/UI toolkit, so I can't use
  46. isis_mainloop() because Tk has its own main loop. The code to set up the
  47. Tk/ISIS linkage (called from join(), above) is:
  48. ---
  49. void
  50. init_ISIS_Tk()
  51. {
  52.   extern int isis_socket;
  53.   extern int intercl_socket;
  54.   void handle_ISIS_input();
  55.   void add_next_ISIS_timeout();
  56.  
  57. #ifdef TALKY
  58.   fprintf(stderr, "ISIS/Tk: isis_socket=%d intercl_socket=%d\n",
  59.       isis_socket,intercl_socket);
  60. #endif
  61.   add_next_ISIS_timeout();
  62.   Tk_CreateFileHandler(isis_socket, TK_READABLE|TK_EXCEPTION,
  63.                handle_ISIS_input, 0);
  64.   Tk_CreateFileHandler(intercl_socket, TK_READABLE|TK_EXCEPTION,
  65.                handle_ISIS_input, 0);
  66. #ifdef TALKY
  67.   fprintf(stderr, "ISIS/Tk connection complete\n");
  68. #endif
  69. }
  70.  
  71. void
  72. add_next_ISIS_timeout()
  73. {
  74.   void handle_ISIS_timeout();
  75.   unsigned long next_timeout, timeout;
  76.  
  77.   next_timeout = isis_next_timeout();
  78.   if (_ISIS_Tk_timeout != (Tk_TimerToken)0)
  79.     Tk_DeleteTimerHandler(_ISIS_Tk_timeout);
  80.   timeout = (unsigned long)(next_timeout + 1000);
  81.   if (timeout > 1000)
  82.     timeout = 1000;
  83. #ifdef TALKY2MUCH
  84.   fprintf(stderr, "ISIS: next timeout at %d (%d)\n", next_timeout,timeout);
  85. #endif
  86.   _ISIS_Tk_timeout = Tk_CreateTimerHandler(timeout,handle_ISIS_timeout,0);
  87. }
  88.  
  89. void
  90. handle_ISIS_timeout(clientData)
  91.   ClientData clientData;
  92. {
  93.   void add_next_ISIS_timeout();
  94.  
  95.   _ISIS_Tk_timeout = (Tk_TimerToken)0;
  96.   if (!_calling_ISIS) {
  97. #ifdef USE_ISIS_TIMEOUT
  98.     static struct timeval timeout={1,0};
  99. #endif
  100. #ifdef TALKY2MUCH
  101.     fprintf(stderr, "ISIS timeout - handling events\n");
  102. #endif
  103.     _calling_ISIS = 1;
  104. #ifdef USE_ISIS_TIMEOUT
  105.     isis_accept_events(ISIS_TIMEOUT, &timeout);
  106. #else
  107.     isis_accept_events(ISIS_ASYNC);
  108. #endif
  109.     _calling_ISIS = 0;
  110. #ifdef TALKY2MUCH
  111.     fprintf(stderr, "ISIS events drained - scheduling next timeout\n");
  112. #endif
  113.   }
  114.   add_next_ISIS_timeout();
  115. }
  116.  
  117. void
  118. handle_ISIS_input(clientData, mask)
  119.   ClientData clientData;
  120.   int mask;
  121. {
  122.   void add_next_ISIS_timeout();
  123.  
  124. #ifdef TALKY2MUCH
  125.   fprintf(stderr, "ISIS input available\n");
  126. #endif
  127.   if (!_calling_ISIS) {
  128. #ifdef USE_ISIS_TIMEOUT
  129.     static struct timeval timeout={1,0};
  130. #endif
  131.     _calling_ISIS = 1;
  132. #ifdef USE_ISIS_TIMEOUT
  133.     isis_accept_events(ISIS_TIMEOUT, &timeout);
  134. #else
  135.     isis_accept_events(ISIS_ASYNC);
  136. #endif
  137.     _calling_ISIS = 0;
  138.   }
  139.   add_next_ISIS_timeout();
  140. }
  141. ---
  142. Finally, from my main(), I do the equivalent of:
  143. ---
  144. ...
  145. join();
  146. THREAD_ENTER_ISIS()
  147. ...
  148. Tk_MainLoop();
  149. ---
  150. "the equivalent of", because join() is called from something else that
  151. does uninteresting (for my purposes here) Tcl stuff. When I run this
  152. program, I sometimes but not always see the
  153.     ISIS setup -- joining ndim process group
  154. message and then nothing. Nada. Zip. We are stuck in the join() routine.
  155. Running under gdb and ^C'ing afer a while yields the following
  156. (predictable) stack:
  157. ---
  158. Starting program:
  159. /afs/cs.cmu.edu/user/snl/project/ndim/@sys/bin/ndim+ix+isis+DBG+MD
  160. -noinit -loads "bos/base"
  161. ISIS setup -- joining ndim process group
  162.  
  163. Program received signal 2, Interrupt
  164. 0xf7663910 in select ()
  165. (gdb) where
  166. #0  0xf7663910 in select ()
  167. #1  0xe044 in run_isis ()
  168. #2  0x2c8f4 in isis_accept_events_loop ()
  169. #3  0x2d3fc in invoke ()
  170. (gdb)
  171. ---
  172. "cmd group /ndim/ws" gives the following lossage:
  173. ---
  174. 216 % cmd group /ndim/ws
  175. ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
  176.  ***  gid =     [site 7 / incarn 0 : gid 9]
  177.       view =    ["/ndim/ws"  incarn 0  viewid 18.0  nmemb 2]
  178.       members = (7/0:457.0)(14/1:rtcp_1.0)
  179. Network locations of members:
  180.       (7/0:457.0) is at host loos.edrc.cmu.edu, pid 457
  181.       (14/1:rtcp_1.0) ** timeout -- process in an infinite loop? **
  182.  ... just a moment while I check with protos on site 14
  183. (barbera.nectar.cs.cmu.e
  184. du)
  185.  --> Sorry! unimplemented feature.  use "cmd dump" at site 14 instead
  186. ---
  187. A dump of the ISIS system yields:
  188. ---
  189. << ISIS SYSTEM DUMP >>
  190. ... Time is now Tue Nov 10 20:03:12 1992
  191.  
  192. PROTOCOLS PROCESS 14/1 INTERNAL DUMP REQUESTED: ISIS protocols process
  193. status du
  194. mp
  195. Memory mgt: 9593 allocs, 9246 frees 385020 bytes in use
  196. Message counts: 9232 allocs 9202 frees (30 in use)
  197.  
  198. tasks: scheduler 3ac40 ctp f55b4
  199.   TASK[b96fc]: cl_abcast(7122c), wants 1 of 2 replies, got 0+0 null, msgid=2315
  200.         Dests: (14/1:rtcp_1.join_req)(7/0:457.join_req); stat <WW>
  201.   TASK[bd704]: cl_abcast(71d84), wants 1 of 2 replies, got 0+0 null, msgid=2341
  202.         Dests: (14/1:rtcp_1.join_req)(7/0:457.join_req); stat <WW>
  203.   TASK[b56f4]: cl_abcast(70d88), wants 1 of 2 replies, got 0+0 null, msgid=2369
  204.         Dests: (14/1:rtcp_1.join_req)(7/0:457.join_req); stat <WW>
  205.   TASK[a96dc]: cl_cbcast(710a0), wants 1 of 1 replies, got 0+0 null, msgid=2381
  206.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  207.   TASK[b16ec]: cl_cbcast(71124), wants 1 of 1 replies, got 0+0 null, msgid=2383
  208.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  209.   TASK[c170c]: cl_cbcast(70a70), wants 1 of 1 replies, got 0+0 null, msgid=2397
  210.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  211.   TASK[ad6e4]: cl_cbcast(7101c), wants 1 of 1 replies, got 0+0 null, msgid=2399
  212.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  213.   TASK[c5714]: cl_cbcast(71e08), wants 1 of 1 replies, got 0+0 null, msgid=2407
  214.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  215.   TASK[d957c]: cl_cbcast(70f98), wants 1 of 1 replies, got 0+0 null, msgid=2409
  216.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  217.   TASK[e158c]: cl_cbcast(71c7c), wants 1 of 1 replies, got 0+0 null, msgid=2417
  218.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  219.   TASK[dd584]: cl_cbcast(725c4), wants 1 of 1 replies, got 0+0 null, msgid=2419
  220.         Dests: (14/1:rtcp_1.gethostname); stat <W>
  221.   TASK[e959c]: cl_abcast(723b4), wants 1 of 2 replies, got 0+0 null, msgid=2423
  222.         Dests: (14/1:rtcp_1.join_req)(7/0:457.join_req); stat <WW>
  223.   TASK[e5594]: cl_abcast(70f14), wants 1 of 2 replies, got 0+0 null, msgid=2431
  224.         Dests: (14/1:rtcp_1.join_req)(7/0:457.join_req); stat <WW>
  225.   TASK[f55b4]: cl_wantdump(721a4), ** running **
  226. runqueue:
  227. Site view 7/4: 7 14/1
  228. Scope <edrc> = `000339fe000000000000000000000000'
  229. Scope <pmax_mach> = `0001220e000000000000000000000000'
  230. Scope <sun3_mach> = `00000030000000000000000000000000'
  231. Scope <sun4c_411> = `00000440000000000000000000000000'
  232. Scope <pmax_ul4> = `00000180000000000000000000000000'
  233. Scope <ri> = `00008600000000000000000000000000'
  234. Scope <hp800_ux3> = `00000800000000000000000000000000'
  235. Scope <rs_aix31> = `00001000000000000000000000000000'
  236. Scope <cs> = `00004000000000000000000000000000'
  237. Scope <sun4_41> = `0000c000000000000000000000000000'
  238. Scope <unknown> = `00020000000000000000000000000000'
  239.  
  240. Process group views: root 6826c
  241. Client(14/1:isis.0)
  242.   [ca01c] (gid 14/0.1[0])</sys/counters> =
  243.     VID 4 = (7/0:isis.0)(14/1:isis.0)
  244. Client(14/1:-7.0)
  245.   [ca58c] (gid 14/1.1[0])</XMGR-service> =
  246.     VID 1 = (14/1:-7.0)
  247. Client(14/1:1827.0)
  248.   [ca844] (gid 14/1.2[0])</ndim/db> =
  249.     VID 1 = (14/1:1827.0)
  250.   [ca2d4] (gid 14/1.3[0])(* cached *) </ndim/db/backend> =
  251.     VID 1 = (14/1:1828.0)
  252. Client(14/1:1828.0)
  253.   [caafc] (gid 14/1.3[0])</ndim/db/backend> =
  254.     VID 1 = (14/1:1828.0)
  255. Client(14/1:rtcp_1.0)
  256.   [cadb4] (gid 14/0.1[0])(* cached *) </sys/counters> =
  257.     VID 4 = (7/0:isis.0)(14/1:isis.0)
  258.   [cb06c] (gid 7/0.9[0])</ndim/ws> =
  259.     VID 18 = (7/0:457.0)(14/1:rtcp_1.0)
  260.   [cb324] (gid 14/1.3[0])(* cached *) </ndim/db/backend> =
  261.     VID 1 = (14/1:1828.0)
  262. Client(14/1:2725.0)
  263.   [cb894] (gid 14/1.10[0])</ndim/ws/published> =
  264.     VID 1 = (14/1:2725.0)
  265. Client(14/1:2733.0)
  266.   [cbe04] (gid 7/0.9[0])(* cached 1 iterating failed *) </ndim/ws> =
  267.     VID 18 = (7/0:457.0)(14/1:rtcp_1.0)
  268. Client(14/1:2784.0)
  269.   [cb5dc] (gid 7/0.9[0])(* cached 1 iterating failed *) </ndim/ws> =
  270.     VID 18 = (7/0:457.0)(14/1:rtcp_1.0)
  271. Client(14/1:2793.0)
  272.   [cbb4c] (gid 7/0.9[0])(* cached 1 iterating failed *) </ndim/ws> =
  273.     VID 18 = (7/0:457.0)(14/1:rtcp_1.0)
  274. Client(14/1:2796.0)
  275.   [cc0bc] (gid 7/0.9[0])(* cached 1 iterating *) </ndim/ws> =
  276.     VID 18 = (7/0:457.0)(14/1:rtcp_1.0)
  277.  
  278. Associative store: as_ndelete 0, as_nlocdelete 1
  279.   id= 92c0039(ab-deletable)[ =[<qu_message: 0x72648><as_scope: bitvec
  280. `000040800
  281. 00000000000000000000000'><phase: 2><priority: 0x5b0e><as_freed: bitvec
  282. `00004000
  283. 000000000000000000000000'>]]
  284.  
  285. abq:
  286.   max_priority = 5b0e
  287. cbcast data structures:
  288.   pbufs:
  289.   pb_itemlist:
  290.   idlists:
  291.   piggylists:
  292. gbcast data structures:
  293.   wait1:
  294.   wait queues:
  295.   glocks:
  296.  
  297. Failure detector: current view 7/4:
  298.   slist: 700 e01
  299.   incarn: 7/0 14/1
  300.   failed: `00000000000000000000000000000000'
  301.   recovered: `00004080000000000000000000000000'
  302.   not coord, no fork, no fail, no prop, no oprop, not sent_oprop
  303.   Pending failures:
  304.   Pending recoveries:
  305.   Replies wanted:
  306.   View r_locks: `00000000000000000000000000000000'
  307.   View w_locks: `00000000000000000000000000000000'
  308.   View want_w_locks: `00000000000000000000000000000000'
  309.  
  310. clients:
  311. [06] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1450) pid 1800]
  312.       <bin/isis>, idle,  monitoring < (14/1:rtcp_1.0) > watched by sites < 7 >
  313. [07] [host barbera.nectar.cs.cmu.edu (128.2.214.54:2325) pid 1805]
  314.       <xmgr>, idle
  315. [08] [host barbera.nectar.cs.cmu.edu (128.2.214.54:2341) pid 1802]
  316.       <rexec>, idle
  317. [09] [host barbera.nectar.cs.cmu.edu (128.2.214.54:2646) pid 1804]
  318.       <rmgr>, idle
  319. [10] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1509) pid 1827]
  320.       client pid=1827, idle,  monitoring < (14/1:1828.0) >
  321. [11] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1065) pid 1828]
  322.       client pid=1828, idle watched by sites < 7 >
  323. [12] [host urals.edrc.cmu.edu (128.2.214.68:3001) pid 13454]
  324.       rtcp_1, idle,  monitoring < (7/0:isis.0) (14/1:1828.0) > watched by sites
  325. < 7 >
  326. [13] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1660) pid 2725]
  327.       client pid=2725, idle
  328. [14] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1054) pid 2796]
  329.       client pid=2796, idle
  330. [15] [host barbera.nectar.cs.cmu.edu (128.2.214.54:1920) pid 2800]
  331.       client pid=2800, idle
  332. Active remote UDP clients:
  333.  
  334. Intersite:
  335.   7/0   [loos.edrc.cmu.edu]:
  336.         estab;alive; got: 624/627+0 dups, sent: 725+1 ret, 205 acks,  backlog 0
  337.   Message tank: 0 messages, 0 bytes
  338. ---
  339. An interesting fact is that all of those /ndim/ws clients are deceased
  340. -- I ^C'ed out of them ages ago trying to get around this problem. ISIS
  341. does not notice that they have died. Is this the problem?
  342.  
  343. This doesn't always happen. I cannot figure exactly why it happens or
  344. when, but totally restarting ISIS seems to clear the problem up,
  345. temporarily. I then have a DIFFERENT problem: when I try to restart
  346. ISIS, it complains that ISISPORT (whatever I said as the second port
  347. number in sites) cannot be assigned and panics during firing up protos
  348. (this is different than the "port in use, please try again in a minute"
  349. message). No amount of fiddling fixes the problem -- I have to edit all
  350. my sites files to fool ISIS into starting again.
  351.  
  352. Have I done something drastically wrong in my ISIS code? It was working
  353. perfectly until I added a few more process groups to the system (e.g.
  354. everything under "/ndim" except "ws").
  355.  
  356. Sorry for the length of this message. Any help urgently needed.
  357.  
  358. Cheers,
  359.             -- Sean
  360. --
  361. Sean Levy, n-dim Group, EDRC, CMU, 5000 Forbes Ave, PGH, PA 15213
  362. Email: snl+@cmu.edu, Phone: +1 412 268 5221, Fax: +1 412 268 5229
  363.