[nos-bbs] Re: GW-List - very tech question - NOS stkutil() spikes !

Jay Nugent jjn at nuge.com
Tue Apr 4 17:19:05 EDT 2006


Greetings,

On Tue, 4 Apr 2006, Barry Siegfried wrote:

> There is nothing wrong with the tprintf() code (or I would expect
> there not to be anything wrong with it in JNOS).  It isn't tprintf()
> itself that is creating problems for you but rather it is the data
> which tprintf() is trying to print.
> 
> Look for the parts of the code which use qsort() instead.  You
> will find it to be utilized in ARP, IP route and Net/Rom nodes
> printing routines where the printed output is normally sorted.
> 
> The idea behind using qsort() was to allocate a large enough block
> of memory that would hold the printed output for the entire list
> that needed to be sorted and then after all the data was dumped
> into this allocated area of memory, qsort() would sort it before
> it is actually printed to the user.
> 
> You will also notice in these subfunctions that if there is not
> enough memory available for calloc() to succeed allocating enough
> memory to hold the printed output for the entire list then the
> pointer would return NULL which would then signal the subfunction
> NOT to sort the data but rather to print it out to the user one
> line at a time in the order that it is encountered in the list.
> 
> Obviously, the more elements in the list to be printed, the larger
> the amount of memory which must be allocated, the harder qsort()
> has to work to sort it all and the more stack will be utilized
> as qsort() is working.
> 
> This is most likely what is grabbing your stack during Net/Rom nodes
> printing.

   Perhaps this is the same 'bug' that sometimes crashes the DOS version 
when users log onto or off of the CONVerse bridge, or when one or more 
CONVerse links are flapping up and down.  

   The CONVerse bridge can sometimes run flawlessly for hours then if too 
many logoffs or link flaps occur, the box dumps a message like this to the 
log and the node dies.

----------------------------------------------------------------
2006-01-19
   Test box was online with a CONV link connected, but not in use.

   Mearly shut down the test box and the Ypsi hamgate crashed with the
following message in the logs:

16:50:27  216.144.208.90:19066 - close Finger
16:50:38  216.144.208.90:19067 - open Finger: mstat
16:50:40  216.144.208.90:19067 - close Finger
16:53:09  - free: WARNING! invalid pointer (7DA9:0008) pc = 3924:02c2 proc 
network
16:53:11  - free: WARNING! invalid pointer (7DA1:0000) pc = 3924:02c2 proc 
network
-----------------------------------------------------------------


      Thanks for all the fine work Maiko & Barry!

      --- Jay Nugent  WB8TKL
          o AEC Washtenaw - NTS Liasion & Packet Operations
          o District-2 DRG Representative
          o Chair, ARRL Michigan Section "Digital Radio Group" (DRG)
            [www.MI-DRG.org]
          o Michigan AMPRnet IP Address Coordinator
            [www.mi-drg.org/ip-addr-form.html]

"Getting rid of terrorism is like getting rid of dandruff.  It cannot
 be done completely no matter how hard you try." -- Gore Vidal
+------------------------------------------------------------------------+
| Jay Nugent   jjn at nuge.com    (734)484-5105    (734)544-4326/Fax        |
| Nugent Telecommunications  [www.nuge.com]     (734)649-0850/Cell       |
|   Internet Consulting/Linux SysAdmin/Engineering & Design/ISP Reseller |
| ISP Monitoring [www.ispmonitor.net] ISP & Modem Performance Monitoring |
| Web-Pegasus    [www.webpegasus.com] Web Hosting/DNS Hosting/Shell Accts|
| LinuxNIC, Inc. [www.linuxnic.net]   Registrar of the .linux TLD        |
+------------------------------------------------------------------------+
  5:01pm  up 80 days, 16:59,  7 users,  load average: 0.00, 0.05, 0.08







More information about the nos-bbs mailing list