RP/MessageQ 4.0A - stack dump on AXPs - CR031769 (Doc ID 766398.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle MessageQ / MessageQ /
Information in this document applies to any platform

Goal

DESCRIPTION:

The following code dumps when run.  There are 2 files necessary in order to recreate this.  The first is a COM file to
build the executable:

This does not happen on VAXes, and appears to be an "Alpha'sim".  Putting printfs appears to change
register addresses, and circumvents  the stack dumps.
 
******* DMT.COM starts here *************
$cxx main.cxx
$ cxxlink [.axp]main,sys$input:/opt
dmq$entryrtl/share
$ dmtr :== $s:[rdurr.anew]main.exe
$ dmtr
******* DMT.COM ends here

******* MAIN.CXX starts here ********
#include <stdio.h>
#include <dmq$include:p_entry.h>
#include <dmq$include:p_symbol.h>

int main(int argc, char **argv) {

  //  UNCOMMENT THE FOLLOWING LINE TO PREVENT THIS PROGRAM FROM CRASHING
  //  printf("");

  q_address    my_primary_queue;
  q_address    my_secondary_queue;
  int32        attach_mode = PSYM_ATTACH_TEMPORARY;
  int32        q_type = PSYM_ATTACH_PQ;
  int32        dmq_status;
  int32        messages_flushed;

  dmq_status  = pams_attach_q(&attach_mode,
                              &my_primary_queue,
                              &q_type,
                              (char *) 0,    /*  No name necessary      */
                              (int32 *) 0,   /*  No name length         */
                              (int32 *) 0,   /*  Use default name space */
                              (int32 *) 0,   /*  No name space list len */
                              NULL,
                              NULL,
                              NULL);

  attach_mode = PSYM_ATTACH_TEMPORARY;
  q_type = PSYM_ATTACH_SQ;

  dmq_status  = pams_attach_q(&attach_mode,
                              &my_secondary_queue,
                              &q_type,
                              (char *) 0,    /*  No name necessary      */
                              (int32 *) 0,   /*  No name length         */
                              (int32 *) 0,   /*  Use default name space */
                              (int32 *) 0,   /*  No name space list len */
                              NULL,
                              NULL,
                              NULL);

  dmq_status = pams_detach_q(&my_secondary_queue,
                             (int32 *) 0,    /*  Use default detach opt */
                             (int32 *) 0,    /*  No detach opt list len */
                             &messages_flushed);
  printf("test1\n");
  pams_exit();
  printf("test2\n");
}		    

********* MAIN.CXX ends here*****

un the com file and it will build, link and run the exe.  You will get the following error:

test1
test2

%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=000000007ABE8000,
 PC=FFFFFFFF808BF85C, PS=0000001B

  Improperly handled condition, image 
exit forced.
    Signal arguments:   Number = 0000000000000005
                        Name   = 000000000000000C
                                 0000000000000004
                                 000000007ABE8000
                                 FFFFFFFF808BF85C
                                 000000000000001B

    Register dump:
    R0  = 000000000000014E  R1  = 0000000000000001  R2  = 000000007BD90F70
    R3  = 0000000000756EA8  R4  = 0000000000000001  R5  = 0000000000758490
    R6  = 000000000002014E  R7  = 000000007ABE78E8  R8  = 0000000000000000
    R9  = 0000000000000000  R10 = 0000000000001EFF  R11 = 0000000000000006
    R12 = 0000000000000005  R13 = 0000000000000001  R14 = 0000000000000001
    R15 = 0000000000000001  R16 = 0000000000000000  R17 = 0000000000000000
    R18 = 000000000212473F  R19 = 000000007ABE80F8  R20 = 0000000000759319
    R21 = 0000000000000000  R22 = 000000007ABE7738  R23 = 0000000000000001
    R24 = 0000000000000000  R25 = 0000000000000001  R26 = FFFFFFFF80972AA8
    R27 = 0000000000000000  R28 = 0000000000000000  R29 = 000000007ABE7720
    SP  = 000000007ABE7720  PC  = FFFFFFFF808BF85C  PS  = 20000000000

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms