[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxaxp::vmsnotes

Title:VAX and Alpha VMS
Notice:This is a new VMSnotes, please read note 2.1
Moderator:VAXAXP::BERNARDO
Created:Wed Jan 22 1997
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:703
Total number of notes:3722

520.0. "Repeated calls to LIB$SIGNAL will cause INSFMEM with OpenVMS Alpha V7.1" by UTRTSC::BOOR () Thu Apr 24 1997 08:26

Hello,

customer recently upgraded to OpenVMS Alpha V7.1. His application uses
a LIB$SIGNAL call to generate TRACEBACK information.
This application was ported from VAX to Alpha some time ago.

Application is written in Pascal, but the problem can also be reproduced
with a small Fortran program, so it's not Pascal related.

Problem:
	repeated calls to LIB$SIGNAL doesn't release allocated memory.
	With a show process/cont/ident=nnnn the virtual page count
	will increase continuously. (with 6 pages)
	After some time the program will give a 'insufficient memory'
	error. Increasing PGFLQUO will delay the problem.
	The same program compiled/run with OpenVMS Alpha V6.2 will show
	no problems.

If the program is changed to use LIB$SIGNAL with SS$_DEBUG, the problem
doesn't occur.
Included below the original (failing) reproducer and the modified program.


Any ideas/suggestions ?

regards,
	Rob Boor, Off-Site Services, Utrecht - The Netherlands.
============================================================
Failing reproducer:
[INHERIT ('sys$library:starlet.pen')]         
PROGRAM t(input,output);
[ASYNCHRONOUS] PROCEDURE LIB$SIGNAL
     (%IMMED COND_VALUE : INTEGER); EXTERN;
procedure e ;
VAR
lib_stat: INTEGER;
begin
	lib_stat := sts$m_inhib_msg+sts$k_error;
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
    lib$signal (lib_stat);    {Do the traceback, please}
    readln;
end;
procedure c ;
begin
    e;
end;
procedure b ;
begin
    c;
end;
procedure a ;
begin
    b;
end;
begin
    a
end.
========================================
[INHERIT(	'sys$library:starlet.pen',
		'SYS$LIBRARY:PASCAL$LIB_ROUTINES.PEN')]         
PROGRAM t(input,output);
procedure e ;
CONST
  DebugForceTraceString = 'SHOW CALLS;GO;EXIT';
TYPE
  (* ASCIC is ASCII Counted; in de eerste byte wordt de lengte aangegeven *)
  TR_ASCIC = RECORD
    Lengte      : [VOLATILE, BYTE]      0..255;
    DebugString : PACKED ARRAY [ 1..256 ] OF CHAR;
  END;
VAR
  DebugCommando : TR_ASCIC;
begin
	DebugCommando.Lengte      := SIZE( DebugForceTraceString );
	DebugCommando.DebugString := DebugForceTraceString;
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
	readln;
	LIB$SIGNAL( SS$_DEBUG, 1, IADDRESS( DebugCommando ) );
    readln;
end;
procedure c ;
begin
    e;
end;
procedure b ;
begin
    c;
end;
procedure a ;
begin
    b;
end;
begin
    a
end.
T.RTitleUserPersonal
Name
DateLines
520.1QAR time...XDELTA::HOFFMANSteve, OpenVMS EngineeringThu Apr 24 1997 10:284
   Looks like there might be a bug (a leak) in the debugger bootstrap,
   or in the debugger.  Please log a QAR or IPMT.

520.2QUARK::LIONELFree advice is worth every centThu Apr 24 1997 10:314
Note that LIB$SIGNAL itself allocates no memory.  As Steve H indicates, it's
more likely a problem in the traceback handler.

				Steve