Dbx core dumping

dbx core dumping when I debug my application with RTC enable (I'm truying to dectect some memory leaks in my code). and I'm getting the following
RTC: Enabling Error Checking...
RTC: Running program...
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) suppress rui
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) cont
t@10 (l@10) signal SEGV (no mapping at the fault address) in __rtc_trap_handler at 0xff2e1148
0xff2e1148: __rtc_trap_handler+0x0058: ld [%l5], %l0
dbx: warning: undefined type number (0,158) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #207 sqlca:(0,158),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,211) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #530 host:(0,211),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,212) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #531 pwd:(0,212),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,213) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #532 usrid:(0,213),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,214) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #533 address:(0,214),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,228) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #577 module:(0,228),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,237) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #638 data:(0,237),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,238) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #639 dest:(0,238),
assuming type `int {assumed}'
dbx: warning: undefined type number (0,846) at /export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #1136 username:G(0,846),
assuming type `int {assumed}'
Current function is queue_message
751 EXEC SQL CALL p_message.queue(:seq,:dest, :data, :notempty, :ret);
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: t@10
[1] sqlscht(0x48708, 0x47914, 0xa, 0x1, 0x3, 0xa), at 0xfe8cd0f8
[2] sqldbid(0x48708, 0xfacf8aa8, 0x4dbf8, 0xff0d180c, 0x4, 0x390), at 0xfe8b0fec
[3] sqlexp(0x48708, 0x1, 0x7a, 0x7a, 0xfacf8aa8, 0xfedecb18), at 0xfe8b4208
[4] sqlcmex(0x0, 0x4dbf8, 0xfacf8aa8, 0xff0d18a6, 0xfedecafc, 0xfee1689c), at 0xfe8ab770
[5] sqlcxt(0xfacf9cac, 0xff0e3d84, 0xfacf8aa8, 0xff0d18a6, 0xfacf9d48, 0xa), at 0xfe8abdbc
Segmentation Fault (core dumped)
Some iformation you might need:
Compiler : code compiled with cc version 6.2
Debugger : 6.2 patch 111683-03
OS : Solaris 8 patch 108528-12
Machine : E250
Thanks

/export/home/husam/release/lib/libstorage_s.so.1:backend.c stab #530 host:(0,211),The key to your problem is probably the stabs reading error.
How was backend.c compiled?
Normally dbx will load stabs information on demand as needed.
You can start dbx and use the "module" command to load
the stabs information right away without running the program or using RTC.
Try this:
(dbx) module backend.o
Does that cause the stabs warnings?
If you can "repair" or "normalize" the stabs information in that module,
the crash will probably go away.

Similar Messages

  • Help: dbx core dump, solaris 10, amd64

    Hi,
    Recently I run into the following when I debug a core dump,
    (dbx) where
    dbx: internal error: signal SIGSEGV (no mapping at the fault address)
    dbx's coredump will appear in /tmp
    Abort (core dumped)
    -bash-3.00$ dbx -V
    Sun Ceres DBX Debugger 7.7 SunOS_i386 2008/10/22
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.7' in your .dbxrc
    (dbx)
    I wonder if anyone has some idea of this bug, is it known? Is it fixed in sunstudio 12 u1?
    If needed, I can supply /tmp/core dumped by dbx.
    Thanks,

    -bash-3.00$ cat /etc/release
    Solaris 10 5/08 s10x_u5wos_10 X86
    Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 24 March 2008
    -bash-3.00$ pstack /tmp/core
    core '/tmp/core' of 11962: /z/tools/SUNWspro/bin/../prod/bin/amd64/dbx ./gp3310/bin/postgres core
    fffffd7fff1bc99a lwpkill () + a
    fffffd7fff161c89 raise () + 19
    fffffd7fff141210 abort () + 90
    0000000000565bb4 ???????? ()
    fffffd7fff1b7176 __sighndlr () + 6
    fffffd7fff1aba72 call_user_handler () + 252
    fffffd7fff1abc8e sigacthandler (b, fffffd7fffdfeef0, fffffd7fffdfeb90) + de
    --- called from signal handler with signal 11 (SIGSEGV) ---
    00000000007854a8 SUNWXUnw_Decode_FDE () + 324
    000000000078393b ???????? ()
    0000000000783a74 ???????? ()
    000000000060345d __1cLUnwindStackIdown_one6M_i_ () + 1d
    00000000005e7185 __1cFFramePunwind_down_one6MpnGPstack__b_ () + e1
    00000000005e77c8 __1cFFrameLcreate_next6FpnGPstack_i_p0_ () + 2e0
    0000000000677471 __1cGPstackRcreate_next_frame6M_pnFFrame__ () + 59
    0000000000677d00 __1cGPstackJwalkstack6MipnFFrame_bpF2pv_b3_2_ () + 78
    0000000000678bc1 __1cGPstackIwherecmd6Miibpv_v_ () + 221
    000000000060c9a5 __1cVDbxWhereCmdProcessingHprocess6Mippc_i_ () + 151
    000000000060ca5a __1cJksh_where6FpnGInterp_ippcpv_i_ () + 32
    000000000072f3ea ???????? ()
    000000000072ecfe __1cNpdksh_execute6FpnGInterp_pnCop_i_i_ () + 946
    000000000071d3ac __1cLpdksh_shell6FpnGInterp_pnGSource__i_ () + 468
    0000000000569254 __1cNmain_cmd_loop6FpnGInterp__v_ () + 9c
    0000000000569ba5 main () + 705
    000000000055defc ???????? ()
    Thanks,

  • Why dbx core dumps on input core file?

    Hi,
    We have a Solaris 10 machine, on which dbx always core dumps when input any core files to it. What would possibly wrong with this machine? Or where should we look to find some clues?
    Thanks a lot,
    pam

    Please create a perl script using the text below:
    #!/usr/bin/perl
    use File::Find;
    sub wanted {
      return unless -x && -f;
      return unless /.*\.so\.[0-9]$/;
      return unless `/bin/file $_ | grep 64-bit`;
      $out = `elfdump -e $_ | grep e_shoff`;
      $out =~ m/e_shoff:\s+(0x[0-9a-f]+)\s/;
      if ($1 =~ m/[4c]$/) {
         print "bad alignment in file: $File::Find::name\n";
    print "Looking for bad ELF section header table alignment in 64-bit files\n";
    find(\&wanted, ( "/lib", "/usr/lib" ));Then, make it executable and run it (does not need root permissions):
    any_user$  chmod +x check_library_alignment.pl
    any_user$  ./check_library_alignment.pl
    If the perl script reports mis-aligned libraries (elfsign modifies the alignment), this looks to be bug 6283299. If you are current on patches for Solaris as well as your SunStudio installation, you'll need to raise an SR requesting the fix. If you are not current on patches, you could start with SunStudio patches which was subsequently patched to address elfsign alignments.
    Source: http://technopark02.blogspot.com/2006/01/64-bit-dbx-internal-error-signal.html

  • Core dump: dbx - analysing C++ object

    Hi,
    Is there a way to analyse the content of a C++ object from a core dump? I'm looking at crash that occurred in a member method and I need to see the values of some member attributes of this object. First of where is the "this" pointer stored? Is there a documentation that describes what the object layout is in memory?
    Thanks in advance.

    I am facing a somewhat similar symptom. dbx6.0 (SunOS5.6/purify4.5.1) will core dump when I say "run <arg1> <arg2>" at the prompt while tracing a purified-executable; dbx will NOT dump core if that executable is not purify'd. The message I get is:
    dbx: internal error: signal SIGSEGV (no mapping at fault address)
    dbx's core dump will appear in </vol03/kiran/tmp>
    Abort(coredump)

  • Segment fault (Core dump)

    Hi
    when i run the following Pro*c file in Unix Environment im getting the SEGMENTATION FAULT(CORE DUMP) error. I used DBX to debug the code. I couldnt find out the proper reason for this error form the dbx output.
    This is the output i got from DBX.
    *signal SEGV (no mapping at the fault address) in _doprnt at 0xfb98736c*
    *0xfb98736c: _doprnt+0x2798:     stb     %o0, [%o1]*
    I did the showmemuse and show leaks, the output for this commands :
    (dbx) showmemuse
    Checking for memory use...
    Blocks in use report (blocks in use: 575 total size: 328086 bytes)
    Total % of Num of Avg Allocation call stack
    Size All Blocks Size
    ======= ==== ====== ====== =======================================
    134876 41% 30 4495 kpummapg < kghgex
    18098 5% 1 18098 lxldlbb < lxlinit < kpummpin < kpupin < sqgctx < sqgrct < sqlcmex < sqlcxt
    16552 5% 4 4138 kogmapg < kghgex
    16516 5% 4 4129 kogmapg < kogmasg
    12288 3% 6 2048 nlhtnsl < nlhthnew
    10350 3% 5 2070 calloc < nsbGetBFS
    9688 2% 1 9688 kouogini < kouoini < kpuinit0 < kpuinit < sqgctx < sqgrct < sqlcmex < sqlcxt
    8200 2% 1 8200 findbuf < doprnt < _fprintf < main
    8120 2% 4 2030 sqlrlc < sqlcopydfn
    8080 2% 1 8080 kpuinit0 < kpuinit < sqgctx < sqgrct < sqlcmex < sqlcxt < main
    7168 2% 1 7168 calloc < nsgbliuc < nsgblini < niotns < nigcall < osncon < kpuadef < upiini
    7168 2% 3 2389 lxldlod < lxdlobj
    5976 1% 4 1494 sqlrlc < sqlcopydfn
    4640 1% 1 4640 sqlrlc < sqldrl < sqlexp < sqlcmex < sqlcxt < get_pub_dates < main
    4640 1% 1 4640 sqlrlc < sqlbrl < sqlexp < sqlcmex < sqlcxt < get_pub_dates < main
    4128 1% 1 4128 calloc < nsgbliuc < nsgblini < niotns < nigcall < osncon < kpuadef < upiini
    4024 1% 1 4024 sqlrlc < sqlbrl < sqlexp < sqlcmex < sqlcxt < get_pub_dates < main
    3408 1% 1 3408 sqlrlc < sqldrl < sqlexp < sqlcmex < sqlcxt < get_pub_dates < main
    2452 <1% 8 306 calloc < nsmal
    2156 <1% 7 308 calloc < nlemfins
    (dbx) showleaks
    Checking for memory leaks...
    Actual leaks report (actual leaks: 1 total size: 30 bytes)
    Total Num of Leaked Allocation call stack
    Size Blocks Block
    Address
    ====== ====== ========== =======================================
    30 1 0x9c9c8 getOutFileName < main
    Possible leaks report (possible leaks: 0 total size: 0 bytes)
    i know its because of Pad pointer and something related to Pointer or array overflow. But i couldnt find out where exactly happening....
    Following is my Code, please help me to find out the error and what i need to change in my code:
    #ifndef ORA_PROC
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <time.h>
    #include <ctype.h>
    #include <math.h>
    #else
    typedef struct FILE FILE;
    #endif
    /*** Added by TCS Begins ***/
    char getOutFileName(char );
    char getEnvVar(char );
    void prepare_declare_oracle_cursors();
    void get_calendar_dates();
    void get_issues();
    void get_master_cusip_no();
    void get_run_date_finish();
    void get_payments();
    int get_pub_dates();
    void get_rights();
    void get_s_h_meetings();
    void get_special_codes();
    void get_agents();
    void get_currency();
    void get_payment_codes();
    void get_issue_codes();
    void get_standard_footnotes();
    void get_index_codes();
    void get_exchanges();
    void get_tax_codes();
    void get_tenders();
    int check_if_holiday(int );
    void sql_error(int , int , char *);
    void login_error();
    void no_pub_dates();
    void no_cal_dates();
    void no_finish_date();
    void save_payment_footnote(char , char [3],int , char );
    void save_issue_footnote(char );
    int print_footnotes();
    int print_foreign_tax();
    int get_partial_run_time();
    void save_rght_footnotes();
    int print_supplimental();
    int convert_tender_price(char *);
    void pad_s_h_meetings();
    int strip_out_codes(char *);
    char *getSqlLogonString();
    /**** TCS ADD Ends ****/
    EXEC SQL INCLUDE sqlca;
    EXEC SQL INCLUDE ddr_create_all_tapes.h;
    #define TRUE 1
    #define ORA_NOT_FOUND     ( sqlca.sqlcode == 1403 )
    /* The Definitions of SUCCESS and FAILURE were switched to test the
    idea that SUCCESS should be Zero and FAILURE should be Non-Zero
    #define SUCCESS 1
    #define FAILURE 0
    #define SUCCESS 0
    #define FAILURE -1
    #define SYSOK          0
    #define SYSERR          1
    #define DEBUGGING     0
    #define DEBUG_LEVEL     0
    /*     #define DEBUGGING     1
         #define DEBUG_LEVEL     2
    int          first_cal_date;
    int          footnote_count;
    int          foreign_count;
    int          last_cal_date;
    int          total_records;
    int          which_tape = 0;
    char          cusip_table_name[30];
    char          field_type_code;
    char          final_cusip_number[10];
    /**** char          footnote_text[300][300];
    char          foreign_text[60][100]; **** Commented by TCS as per the change request ****/
    /*** Added by TCS as per the change request ***/
    char          footnote_text[200][300];
    char          foreign_text[200][300];
    /*** TCS Add Ends ***/
    char          freq_type_code;
    char          init_cusip_number[10];
    char          rec_type_code;
    char          payment_where_clause[600];
    char          rights_where_clause[600];
    char          tenders_where_clause[600];
    char          s_h_meet_where_clause[600];
    char          last_run_time[18];
    char          supp_info_buffer[321];
    int          call_flag;
    int          tenders_flag;
    int          rights_flag;
    int          s_h_meet_flag;
    int          rght_foot_pos;
    double          hold_double;
    int          hold_int;
    char          hold_char[100];
    int i=0;
    FILE      *fp;
    FILE     pfp;          / this is used for a report file to correspond to
    the partial tape file */
    int main(int argc, char argv[]) / Modified by TCS */
         char          ddr_tape_name[100];
         char          ddr_partial_rpt[100];
         char          copyright_notice[100];
         long           file_position;
         char           *logname;
         /* READ IN PARAMETERS AND SET UP VARIABLES */
         memset (oracle_uid.arr, 0, sizeof(oracle_uid.arr));
    memset (oracle_pwd.arr, 0, sizeof(oracle_pwd.arr));
    strcpy (oracle_uid.arr, argv[1]);
    oracle_uid.len = strlen(oracle_uid.arr);
    strcpy (oracle_pwd.arr, argv[2]);
    oracle_pwd.len = strlen(oracle_pwd.arr);
    printf("Calling getSqlLogonString");
    logname = getSqlLogonString();
         which_tape = atoi(argv[1]);
         memset (last_run_time, 0, sizeof(last_run_time));
         if ( ( DEBUGGING ) && ( DEBUG_LEVEL > 1 ) )
         printf ("Oracle username: %s\n", oracle_uid.arr);
         printf ("Oracle password: %s\n", oracle_pwd.arr);
         printf ("Oracle username/password@database: %s\n", logname); /** Added by TCS **/
         printf ("Which Tape: %d\n", which_tape);
         hold_double = 0.0;
         hold_int = 0;
         memset (hold_char, ' ', sizeof(hold_char));
         EXEC SQL WHENEVER SQLERROR DO login_error();
    /*      EXEC SQL CONNECT :oracle_uid IDENTIFIED BY :oracle_pwd; */
         EXEC SQL CONNECT :logname ;
         printf ("Connected to ORACLE... \n");
         EXEC SQL WHENEVER SQLERROR continue;
         get_pub_dates();
         memset (ddr_tape_name, 0, sizeof(ddr_tape_name));
         memset (ddr_partial_rpt, 0, sizeof(ddr_partial_rpt));
         memset (cusip_table_name, 0, sizeof(cusip_table_name));
         memset (payment_where_clause, 0, sizeof(payment_where_clause));
         memset (rights_where_clause, 0, sizeof(rights_where_clause));
         memset (tenders_where_clause, 0, sizeof(tenders_where_clause));
         memset (s_h_meet_where_clause, 0, sizeof(s_h_meet_where_clause));
         /* SET UP VARIABLES BASED ON THE DIFFERENT FREQUENCY OF TAPE */
         switch (which_tape)
              case 0:
                   get_partial_run_time();
                   /*sprintf (ddr_tape_name,
                        "idb_tape$out:ddr_partial%1d.asc", p_count); ** Comented by TCS **/
                   sprintf (ddr_tape_name,"%s%1d.%s",getOutFileName("DDR_PARTIAL"),p_count,getEnvVar("DDR_PARTIAL_EXT_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_PARTIAL_TAPE_TABLE");
                   /*sprintf (ddr_partial_rpt,
                        "idb_tape$out:ddr_partial%1d.rpt", p_count); ** Commented by TCS **/
                   sprintf (ddr_partial_rpt,"%s%1d.%s",getOutFileName("DDR_PARTIAL"),p_count,getEnvVar("DDR_PARTIAL_EXT_RPT")); /* Added by TCS */
                   get_calendar_dates();
                   freq_type_code = '0';
                   sprintf (payment_where_clause,
    "AND PYMT_PUB_DATE IS NULL \
    AND ((PYMT_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND PYMT_ADD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (PYMT_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND PYMT_UPD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_from.arr, p_to.arr, p_from.arr, p_to.arr);
                   sprintf (rights_where_clause,
    "AND RGHT_PUB_DATE IS NULL \
    AND ((RGHT_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND RGHT_ADD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (RGHT_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND RGHT_UPD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_from.arr, p_to.arr, p_from.arr, p_to.arr);
                   sprintf (tenders_where_clause,
    "AND TNDR_PUB_DATE IS NULL \
    AND ((TNDR_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND TNDR_ADD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (TNDR_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND TNDR_UPD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_from.arr, p_to.arr, p_from.arr, p_to.arr);
                   sprintf (s_h_meet_where_clause,
    "AND SMTG_PUB_DATE IS NULL \
    AND ((SMTG_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND SMTG_ADD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (SMTG_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI') \
    AND SMTG_UPD_DATE_TIME < TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_from.arr, p_to.arr, p_from.arr, p_to.arr);
                   break;
              case 3:
    /*     PARTIAL 5     */
                   get_partial_run_time();
                   p_count = 5;
                   /**sprintf (ddr_tape_name,
                        "idb_tape$out:ddr_partial%1d.asc", p_count); ** Comented by TCS **/
                   sprintf (ddr_tape_name,"%s%1d.%s",getOutFileName("DDR_PARTIAL"),p_count,getEnvVar("DDR_PARTIAL_EXT_ASC")); /* Added by TCS */
    /* for testing only I am using seperate TABLE     */
                   /**strcpy (cusip_table_name,
                        "IDB.DDR_PARTIAL5_TAPE_TABLE"); ** Commented by TCS **/
                   strcpy (cusip_table_name,
                        "IDB.DDR_PARTIAL_TAPE_TABLE");
                   /*sprintf (ddr_partial_rpt,
                        "idb_tape$out:ddr_partial%1d.rpt", p_count); ** Commented by TCS **/
                   sprintf (ddr_tape_name,"%s%1d.%s",getOutFileName("DDR_PARTIAL"),p_count,getEnvVar("DDR_PARTIAL_EXT_RPT")); /* Added by TCS */
                   get_calendar_dates();
                   freq_type_code = '3';
                   sprintf (payment_where_clause,
    "AND ( (PYMT_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (PYMT_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_to.arr, p_to.arr);
                   sprintf (rights_where_clause,
    "AND ((RGHT_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (RGHT_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_to.arr, p_to.arr);
                   sprintf (tenders_where_clause,
    "AND ((TNDR_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (TNDR_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_to.arr, p_to.arr);
                   sprintf (s_h_meet_where_clause,
    "AND ((SMTG_ADD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')) \
    OR (SMTG_UPD_DATE_TIME >= TO_DATE('%15.15s', 'DD-MON-RR HH24:MI')))",
    p_to.arr, p_to.arr);
                   break;
              case 1:
                   /**strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_daily_tape.asc"); ** Commented by TCS **/
                   sprintf (ddr_tape_name,"%s",getOutFileName("DDR_DAILY_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_DAILY_TAPE_TABLE");
                   get_calendar_dates();
                   freq_type_code = '1';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    = TO_DATE('%s','DD-MON-RR') OR PYMT_PUB_DATE IS NULL)", pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    = TO_DATE('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)", pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (TNDR_PUB_DATE \
    = TO_DATE('%s','DD-MON-RR') OR TNDR_PUB_DATE IS NULL)", pub_to_date.arr);
                   sprintf (s_h_meet_where_clause, "AND (SMTG_PUB_DATE \
    = TO_DATE('%s','DD-MON-RR') OR SMTG_PUB_DATE IS NULL)", pub_to_date.arr);
                   break;
              case 5:
                   /*strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_weekly_tape.asc"); ** Commented by TCS **/
                   sprintf (ddr_tape_name, "%s",getOutFileName("DDR_WEEKLY_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_WEEKLY_TAPE_TABLE");
                   get_calendar_dates();
                   freq_type_code = '2';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR PYMT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (TNDR_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR TNDR_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   /* ram - 6/28/95 - reverted back to original criteria: */
                   /* include on weekly tape based on pub-date, regardless of */
                   /* whether in calendar or not */
                   sprintf (s_h_meet_where_clause, "AND (SMTG_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR SMTG_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   break;
              case 12:
                   /* ram - 7/13/95          */
                   /* changed monthly "6" to "12" */
                   /*strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_monthly_tape.asc"); ** Commented by TCS **/
                   sprintf (ddr_tape_name, "%s", getOutFileName("DDR_MONTHLY_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_MONTHLY_TAPE_TABLE");
                   freq_type_code = '3';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR PYMT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (TNDR_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR TNDR_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   break;
              case 8:
                   /*strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_quarterly_tape.asc");** Commented by TCS **/
                   sprintf (ddr_tape_name,"%s",getOutFileName("DDR_QUARTERLY_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_QUARTERLY_TAPE_TABLE");
                   freq_type_code = '3';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR PYMT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (A.TNDR_TENDER_DATE \
    = TO_DATE('%s','DD-MON-RR'))", pub_to_date.arr);               break;
              case 9:
                   /*strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_annual_tape.asc"); ** Comented by TCS **/
                   sprintf (ddr_tape_name,"%s", getOutFileName("DDR_ANNUAL_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_ANNUAL_TAPE_TABLE");
                   freq_type_code = '4';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') \
    OR PYMT_PUB_DATE = TO_DATE('29-OCT-1929','DD-MON-YYYY'))",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (A.TNDR_TENDER_DATE \
    = TO_DATE('%s','DD-MON-RR'))", pub_to_date.arr);               break;
              case 15:
                   /*strcpy (ddr_tape_name,
                        "idb_tape$out:ddr_general_tape.asc"); ** Commented by TCS **/
                   sprintf (ddr_tape_name,"%s", getOutFileName("DDR_GENERAL_TAPE_ASC")); /* Added by TCS */
                   strcpy (cusip_table_name,
                        "IDB.DDR_GENERAL_TAPE_TABLE");
                   freq_type_code = '3';
                   sprintf (payment_where_clause, "AND (PYMT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR PYMT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (rights_where_clause, "AND (RGHT_PUB_DATE \
    BETWEEN to_date('%s','DD-MON-RR') AND to_date('%s','DD-MON-RR') OR RGHT_PUB_DATE IS NULL)",
    pub_from_date.arr, pub_to_date.arr);
                   sprintf (tenders_where_clause, "AND (A.TNDR_TENDER_DATE \
    = TO_DATE('%s','DD-MON-RR'))", pub_to_date.arr);               break;
              default:
                   exit (printf ("Invalid tape option: %d\n", which_tape)); /*** %s changed by TCS to %d ***/
                   break;
         if ((fp = fopen(ddr_tape_name, "w+")) == NULL)
              exit (printf ("Unable to open asc <%s> file for write access\n",
                   ddr_tape_name));
    /*     GR. Partial 5
         if (which_tape == 0 || which_tape == 3 )
              if ((pfp = fopen(ddr_partial_rpt, "w+")) == NULL)
                   exit (printf ("Unable to open asc <%s> file \
    for write access\n", ddr_partial_rpt));
         /* WRITE THE HEADER RECORD ON THE TAPE */
         memset (copyright_notice, 0, sizeof(copyright_notice));
         sprintf (copyright_notice, "COPYRIGHT (c) %.4s STANDARD & POOR'S \
    CORPORATION. ALL RIGHTS RESERVED", year.arr);
         fprintf (fp, "%-80.80sDIVIDEND%8d%17.17s ",
    copyright_notice, control_date, run_date_start.arr);
         file_position = ftell(fp);
         fprintf (fp, "\n");
         total_records = 0;
         /* GET THE SPECIAL CATEGORY RECORDS */
         get_special_codes();
         /* SELECT FROM THE DRIVER TABLE TO GET ALL THE OTHER RECORDS */
         get_master_cusip_no();
         printf("After get_master_cusip_no()");
         get_run_date_finish();
         printf("After get_run_date_finish()");
         if ( DEBUGGING )
              printf ("initial cusip = %s\n", init_cusip_number);
              printf ("final cusip = %s\n", final_cusip_number);
              printf ("record type is %c\n", rec_type_code);
         /* WRITE THE TRAILER RECORD */
         fprintf (fp, "%8d%-17.17s%07d%-9.9s1%-9.9s%c\n", control_date,
    run_date_finish.arr, total_records, init_cusip_number , final_cusip_number,
    rec_type_code);
         /* re-wind and add to the header record ... */
         rewind(fp);
         fseek(fp, file_position - 33, 0);
         fprintf (fp, "%07d%-9.9s1%-9.9s%c", total_records, init_cusip_number,
    final_cusip_number, rec_type_code);
         fclose(fp);
    /*     GR Partial 5
         if (which_tape == 0 || which_tape == 3 )
              fclose(pfp);
         printf ("\nDONE: %07d%-9.9s1%-9.9s%c\n", total_records, init_cusip_number,
    final_cusip_number, rec_type_code);
    return (0); /*** Added by TCS ***/
    void prepare_declare_oracle_cursors() /* Modified by TCS */
         /* We'll us dynamic sql to get the appropriate where clause but use */
         /* a bind variable for the master cusip number. So we prepare and */
         /* declare get_issues, get_payments, get_tenders, get rights, and */
         /* get_s_h_meetings cursors only once, outside the driving loop. */
         EXEC SQL BEGIN DECLARE SECTION;
              /**** TCS Comment begins as per the change request ****
              VARCHAR          sql_stmt1[1500];*/     /* issues */
              /*VARCHAR          sql_stmt2[3000];     *//* payments */
              /*VARCHAR          sql_stmt3[500];          *//* tenders */
              /*VARCHAR          sql_stmt4[500];          *//* rights */
              /*VARCHAR          sql_stmt5[500];          *//* s_h_meetings */
              /**** TCS Add begins as per the change request ****/
              VARCHAR          sql_stmt1[2000];     /* issues */
              VARCHAR          sql_stmt2[4000];     /* payments */
              VARCHAR          sql_stmt3[1000];     /* tenders */
              VARCHAR          sql_stmt4[1000];     /* rights */
              VARCHAR          sql_stmt5[1000];     /* s_h_meetings */
              /**** TCS Add ends ****/
         EXEC SQL END DECLARE SECTION;
         /* prepare and declare the get_issues cursor */
         memset (sql_stmt1.arr, 0, sizeof(sql_stmt1.arr));
         sprintf (sql_stmt1.arr, "SELECT \
    A.ISSU_PAR_VALUE, \
    DECODE (A.ISSU_MARKET_SYMBOL||A.ISSU_NASDAQ,'OTCY','NASD', A.ISSU_MARKET_SYMBOL), \
    A.ISSU_C_RATE, A.ISSU_C_FREQ, A.ISSU_C_NEW_AMOUNT, A.ISSU_C_NEW_Q1, \
    A.ISSU_C_NEW_Q2, A.ISSU_C_NEW_Q3, A.ISSU_C_OLD_AMOUNT, A.ISSU_C_OLD_Q1, \
    A.ISSU_C_OLD_Q2, A.ISSU_C_OLD_Q3, A.ISSU_CURRENCY, \
    A.ISSU_UPD_HIS, A.ISSU_COMMENT, A.TAX_EXEMPT_FLAG,\
    B.SEC_TYPE_CODE, B.ACQ_BY_IND, B.ACQ_ISSUER_NO, \
    rtrim(substr(B.ACQ_ISSUER_DESCR,1,30)), \
    B.INDEX_CODE, B.TRFR_AGT_CODE, B.NY_AGT_CODE, B.TICKER_SYMBOL, \
    B.TICKER_SYMBOL2, \
    rtrim(substr(C.ISSR_DDR_ISSUER_DESCR,1,60)), \
    rtrim(substr(E.ISSUE_DESCR,1,30)), \
    rtrim(substr(D.ISSUER_DESCR1,1,30)), \
    F.TRFR_DAYS \
    FROM IDB.DDR_ISSUES A, IDB.DDR_ISSUES_2 B, IDB.DDR_ISSUERS C, \
    BLIS.CUSIP_ISSUERS D, BLIS.CUSIP_ISSUES E, IDB.DDR_TRANSFER F \
    WHERE A.ISSU_CUSIP_NO = :master_cusip_no \
    AND A.ISSU_CUSIP_NO = B.ISSU_CUSIP_NO(+) \
    AND SUBSTR(A.ISSU_CUSIP_NO, 1, 6) = C.ISSR_ISSUER_NO(+) \
    AND SUBSTR(A.ISSU_CUSIP_NO, 1, 6) = D.ISSUER_NO \
    AND A.ISSU_CUSIP_NO = E.CUSIP_NO \
    AND A.ISSU_TRANSFER_CODE = F.TRFR_TR_CD(+) ");
         sql_stmt1.len = strlen(sql_stmt1.arr);
         EXEC SQL PREPARE ISSUES FROM :sql_stmt1;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in preparing ISSUES");
         EXEC SQL DECLARE ISSUES_C CURSOR FOR ISSUES;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring ISSUES");
         /* now the get_payments cursor */
         memset (sql_stmt2.arr, 0, sizeof(sql_stmt2.arr));
         sprintf (sql_stmt2.arr, "SELECT \
    a.PYMT_RP_DIV, \
    a.PYMT_RP_DEC, \
    a.PYMT_RP_EXD, \
    a.PYMT_RP_REC, \
    a.PYMT_RP_PAY, \
    a.PYMT_RP_DUE, \
    a.PYMT_RP_TAX, \
    a.PYMT_RP_ANN, \
    a.PYMT_PRP_DIV, \
    a.PYMT_PRP_DEC, \
    a.PYMT_PRP_EXD, \
    a.PYMT_PRP_REC, \
    a.PYMT_PRP_PAY, \
    a.PYMT_PRP_DUE, \
    a.PYMT_PRP_TAX, \
    a.PYMT_PRP_ANN, \
    NVL(a.PYMT_SEQ_NO,0), \
    TO_CHAR(a.PYMT_DECLARED, 'YYMMDD'), \
    TO_CHAR(a.PYMT_EX_DATE, 'YYMMDD'), \
    TO_CHAR(a.PYMT_STK_REC, 'YYMMDD'), \
    TO_CHAR(a.PYMT_TRANSFER_DATE, 'YYMMDD'), \
    TO_CHAR(a.PYMT_PAYABLE, 'YYMMDD'), \
    a.PYMT_CODES, \
    NVL(a.PYMT_CASH_DIVD,0.0), \
    NVL(b.ORDINARY_INCOME,0.0), \
    NVL(b.CAP_GAINS,0.0), \
    NVL(b.SHORT_TM_CAP_GAINS,0.0), \
    NVL(b.LONG_TM_CAP_GAINS,0.0), \
    NVL(b.RETURN_OF_CAPITAL,0.0), \
    b.STK_DIVD_IND, \
    NVL(a.PYMT_STK_DIVD,0), \
    b.FRAC_IN_CASH_STK_IND, \
    NVL(b.FRAC_IN_CASH_PRICE,0.0), \
    NVL(a.PYMT_SPLIT_NEW,0), \
    NVL(a.PYMT_SPLIT_OLD,0), \
    TO_CHAR(a.PYMT_DB_DATE, 'YYMMDD'), \
    NVL(b.ARREARS_PAID,0.0), \
    NVL(b.ARREARS_DUE,0.0), \
    b.SPINOFF_IND, \
    b.SPINOFF_ISSUE_NO, \
    b.SPINOFF_ISSUER_DESCR, \
    b.SPINOFF_ISSUE_DESCR, \
    NVL(b.TAX_CODE,0), \
    NVL(b.TAX_CODE_2,0), \
    NVL(b.OLD_SEQ_NO,0), \
    b.ORDINARY_INCOME_CODE, \
    b.CAP_GAINS_CODE, \
    b.SHORT_TM_CAP_GAINS_CODE, \
    b.LONG_TM_CAP_GAINS_CODE, \
    b.RETURN_OF_CAPITAL_CODE, \
    TO_CHAR(b.CALL_DATE, 'YYMMDD'), \
    NVL(b.CALL_PRICE,0.0), \
    b.CALL_PRICE_CURRENCY, \
    b.CALL_AGT_NO, \
    b.ACCRUED_DIVD_IND, \
    TO_CHAR(a.PYMT_DB_DATE, 'YYMMDD'), \
    a.PYMT_DB_TEXT, \
    a.PYMT_DVD_TEXT, \
    a.PYMT_YEAR, \
    TO_CHAR(a.PYMT_STK_REC, 'fmMon dd'), \
    TO_CHAR(a.PYMT_DB_DATE, 'fmMon dd'), \
    b.NY_CALL_AGT_NO, \
    NVL(b.FOREIGN_TAX_RATE, 0.0), \
    NVL(b.NET_RATE, 0.0), \
    NVL(b.FEE, 0.0), \
    NVL(b.COMMISSION, 0.0), \
    a.PYMT_CASH_DIVD_FNS, \
    a.PYMT_STK_DIVD_FNS, \
    a.PYMT_DECLARED_FNS, \
    a.PYMT_EX_DATE_FNS, \
    a.PYMT_STK_REC_FNS, \
    a.PYMT_PAYABLE_FNS, \
    a.PYMT_SPLIT_FNS, \
    NVL (TO_NUMBER (TO_CHAR(a.PYMT_PUB_DATE, 'YYYYMMDD')), 0), \
    NVL (TO_NUMBER (TO_CHAR(a.PYMT_TRANSFER_DATE, 'YYYYMMDD')), 0), \
    NVL (TO_NUMBER (TO_CHAR(a.PYMT_STK_REC, 'YYYYMMDD')), 0), \
    NVL (TO_NUMBER (TO_CHAR(a.PYMT_DB_DATE, 'YYYYMMDD')), 0) \
    FROM IDB.DDR_PAYMENTS A, IDB.DDR_PAYMENTS_2 B \
    WHERE A.PYMT_CUSIP_NO = :master_cusip_no \
    AND A.PYMT_CUSIP_NO = B.PYMT_CUSIP_NO (+) \
    AND A.PYMT_SEQ_NO = B.PYMT_SEQ_NO (+) \
    AND NVL(INSTR(A.PYMT_CODES,'CO'),0) NOT IN (1,3,5,7,9,11) ");
         strcat (sql_stmt2.arr, payment_where_clause);
         sql_stmt2.len = strlen(sql_stmt2.arr);
         EXEC SQL PREPARE PAYMENTS FROM :sql_stmt2;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in preparing PAYMENTS");
         EXEC SQL DECLARE PAYMENTS_C CURSOR FOR PAYMENTS;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring PAYMENTS");
         /* now the get_tenders cursor */
         memset (sql_stmt3.arr, 0, sizeof(sql_stmt3.arr));
    /* FXL ADD SUBSTR to tndr_price_qual: substr(A.TNDR_PRICE_QUAL,1,14), 3/23/99,
    to to_number 3/29/99 */
         sprintf (sql_stmt3.arr, "SELECT \
    B.TNDR_AGT_NO, \
    B.NY_AGT_NO, \
    TO_CHAR(A.TNDR_TENDER_DATE, 'YYMMDD'), \
    A.TNDR_PRICE, \
    to_number(A.TNDR_PRICE_QUAL), \
    A.TNDR_TE_SIZE, \
    TNDR_TE_TEXT_1 \
    FROM IDB.DDR_TENDERS A, IDB.DDR_TENDERS_2 B \
    WHERE TNDR_CUSIP_NO = :master_cusip_no \
    AND TNDR_CUSIP_NO = TNDR_ISSUE_NO(+) \
    AND A.TNDR_TENDER_DATE = B.TNDR_TENDER_DATE(+) ");
         strcat (sql_stmt3.arr, tenders_where_clause);
         sql_stmt3.len = strlen(sql_stmt3.arr);
         EXEC SQL PREPARE TENDERS FROM :sql_stmt3;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in preparing TENDERS");
         EXEC SQL DECLARE TENDERS_C CURSOR FOR TENDERS;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring TENDERS");
         /* now the get_rights cursor */
         memset (sql_stmt4.arr, 0, sizeof(sql_stmt4.arr));
    /* ADD TO_CHAR(A.RGHT_DB_DATE, 'YYMMDD') */
         sprintf (sql_stmt4.arr, "SELECT \
    B.NO_RIGHTS_ISSUED, \
    B.SHS_REQ_FOR_PURCH, \
    B.RGHTS_REQUIRED, \
    B.QTY_SHS_PURCHASED, \
    B.TYPE_SHS_ELIGIBLE, \
    B.NEW_SHS_CUSIP_NO, \
    B.NEW_CO_ISSUER_DESCR, \
    TO_CHAR(A.RGHT_RECORD, 'YYMMDD'), \
    TO_CHAR(A.RGHT_EX_DATE, 'YYMMDD'), \
    TO_CHAR(B.NYC_RECORD_DATE, 'YYMMDD'), \
    TO_CHAR(A.RGHT_EXPIRE, 'YYMMDD'), \
    TO_CHAR(A.RGHT_DB_DATE, 'YYMMDD'), \
    A.RGHT_PRICE, \
    NVL(A.RGHT_RECORD_FNS,' '), \
    NVL(A.RGHT_EXPIRE_FNS,' '), \
    NVL(A.RGHT_EX_DATE_FNS,' '), \
    NVL(A.RGHT_PRICE_FNS,' '), \
    NVL(A.RGHT_BASIS_FNS,' '), \
    A.RGHT_FOOTNOTE, \
    B.US_INELIGIBILITY_IND, \
    B.RGHT_TRFR_IND \
    FROM IDB.DDR_RIGHTS A, IDB.DDR_RIGHTS_2 B \
    WHERE RGHT_CUSIP_NO = :master_cusip_no \
    AND RGHT_CUSIP_NO = RGHT_ISSUE_NO(+) \
    AND A.RGHT_RECORD = B.RGHT_RECORD_DATE(+) ");
         strcat (sql_stmt4.arr, rights_where_clause);
         sql_stmt4.len = strlen(sql_stmt4.arr);
         EXEC SQL PREPARE RIGHTS FROM :sql_stmt4;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in preparing RIGHTS");
         EXEC SQL DECLARE RIGHTS_C CURSOR FOR RIGHTS;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring RIGHTS");
         /* ram - added logic on 7/18/95 */
         /* for the standard footnotes cursor */
         EXEC SQL DECLARE STANDARD_FOOTNOTES_C CURSOR
         FOR
         SELECT SFTN_S_F_TEXT, SFTN_S_F_TYPE
         FROM IDB.DDR_STANDARD_FOOTNOTES
         WHERE SFTN_S_F_TYPE = :standard_footnote_type;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring STANDARD_FOOTNOTES");
         /* now the issue footnotes cursor */
         EXEC SQL DECLARE ISSUE_FOOTNOTES_C CURSOR
         FOR
         SELECT FTNT_F_TEXT, FTNT_F_TYPE
         FROM IDB.DDR_FOOTNOTES
         WHERE FTNT_CUSIP_NO = :master_cusip_no
         AND FTNT_SYMBOL = :footnote_symbol
         AND FTNT_YEAR IS NULL;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring ISSUE_FOOTNOTES");
         /* now the payment footnotes cursor */
         EXEC SQL DECLARE PAYMENT_FOOTNOTES_C CURSOR
         FOR
         SELECT FTNT_F_TEXT, FTNT_F_TYPE
         FROM IDB.DDR_FOOTNOTES
         WHERE FTNT_CUSIP_NO = :master_cusip_no
         AND FTNT_SYMBOL = :footnote_symbol
         AND FTNT_YEAR = :footnote_year;
         if (sqlca.sqlcode)
              sql_error (SYSERR, sqlca.sqlcode,
                   "Error in declaring PAYMENT_FOOTNOTES");
         /* now the get_s_h_meetings cursor */
         /* ONLY for certain tape types. */
    /*     GR PARTial 5
         if (which_tape == 0 || which_tape == 3 || which_tape == 1 || which_tape == 5)
              memset (sql_stmt5.arr, 0, sizeof(sql_stmt5.arr));
              /* ram - 6/15/95 - changed ORigunal to smtg */
              /* TO_CHAR(ORIGINAL_REC_DATE, 'YYMMDD'), \ */
              sprintf (sql_stmt5.arr, "SELECT \
    TO_CHAR(SMTG_MTG_DATE, 'YYMMDD'), \
    TO_CHAR(SMTG_REC_DATE, 'YYMMDD'), \
    SMTG_FOOTNOTE \
    FROM IDB.DDR_S_H_MEETINGS \
    WHERE SMTG_CUSIP_NO = :master_cusip_no ");
              strcat (sql_stmt5.arr, s_h_meet_where_clause);
              sql_stmt5.len = strlen(sql_stmt5.arr);
              EXEC SQL PREPARE S_H_MEET FROM :sql_stmt5;
              if (sqlca.sqlcode)
                   sql_error (SYSERR, sqlca.sqlcode,
                        "Error in preparing S_H_MEET");
              EXEC SQL DECLARE S_H_MEET_C CURSOR FOR S_H_MEET;
              if (sqlca.sqlcode)
                   sql_error (SYSERR, sqlca.sqlcode,
                        "Error in declaring S_H_MEET");
         } /* end of if (which_tape == 0 || which_tape == 1 || which_tape == 5) */
    /* replaced get_calendar_dates function with use of PLSQL - ram - 5/24/95 */
    void get_calendar_dates() /* Modified by TCS */
         /* put first and last calendar dates into global ints */
         /* first_cal_date and last_cal_date (YYYYMMDD) using */
         /* ddr package function get_business_days. */
         /* The package object ddr is owned by idb, so I'll */
         /* specify this, just in case accounts other than idb */
         /* run this code. (EXECUTE priviledge is granted to */
         /* "idb_user" role.) */
    EXEC SQL BEGIN DECLARE SECTION;
              int          cal_start;
              int          cal_end;
              int          return_val;
    EXEC SQL END DECLARE SECTION;
         /* initialize destination globals */

    You actually need to run it with "check -access"; memuse and leaks won't help with the crash, which happens because of illegal memory access. Hopefully, "check -access" will help you to locate the bad guy, but that's not panacea either.
    To be precise:
    - start dbx
    $ dbx <your app>
    - issue
    (dbx) check -access
    (dbx) run
    and wait for dbx to stop and report suspicious memory access.

  • Getting core dump when using EXEC SQL CLOSE

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

  • Reg Core Dump

    We are getting bad address core dump while using Coherence lib .
    Please find the dbx stack trace below in .
    @null (l@9) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    (dbx) where
    [1] 0xfa666f08(0xf71f8940, 0x28ec9c8, 0xf71f8930, 0x18, 0x8, 0xf71f8880), at 0xfa666f08
    [2] 0xfa662da8(0xf71f8ab0, 0x28ec9c8, 0xf71f89b0, 0xf71f8940, 0x154396e8, 0xfdf88a80), at 0xfa662da8
    [3] 0xfa414a6c(0xf71f8ab0, 0x28ec9d0, 0xf71f8aa0, 0xf71f91e0, 0x0, 0xf71f89b0), at 0xfa414a6c
    [4] 0xfaba8c78(0x28ec9c8, 0xf71f8c20, 0x0, 0xf71f8b80, 0xf71f8ab0, 0x1), at 0xfaba8c78
    [5] 0xfb1f6b8c(0xf71f9190, 0xf71f91e0, 0xf71f8c20, 0xf71f91a0, 0xf71f8c30, 0x28af100), at 0xfb1f6b8c
    [6] 0xfb1f2af0(0x28aaeb0, 0xf71f91a0, 0x0, 0x1, 0xf71f9190, 0xfb1df870), at 0xfb1f2af0
    [7] 0xfb1f5c48(0x28aaeb0, 0x569fb10, 0xf71f9270, 0xf71f9280, 0xf71f9280, 0xf71f9360), at 0xfb1f5c48
    [8] 0xfad25bd0(0x289f3b8, 0xf71f9360, 0xf71f9360, 0xf71f92f0, 0x1, 0xf71f9360), at 0xfad25bd0
    [9] 0xfabf44c0(0x569fb10, 0xfb1fefd4, 0xfeb88ae0, 0xf71f9360, 0xfabf309c, 0xfeaae700), at 0xfabf44c0
    [10] 0xfa8a3d70(0x289f228, 0xf71f9460, 0xf71f9420, 0xf71f9430, 0xfdf88a80, 0xf71f9460), at 0xfa8a3d70
    [11] 0xfa8a338c(0x289f228, 0xf71f9540, 0xf71f9540, 0xf71f94d0, 0x1, 0xf71f95c0), at 0xfa8a338c
    [12] 0xfa7c1dd8(0x25b6ef8, 0x7f13700, 0xf71f9540, 0xf71f95c0, 0xf71f9550, 0x289f2a0), at 0xfa7c1dd8
    [13] 0xfabf44c0(0x7f13700, 0xfa7c3a60, 0xfe37b854, 0xf71f95c0, 0xfabf309c, 0xfe37ac90), at 0xfabf44c0
    [14] 0xfb2c9184(0xf71f9be0, 0xfdd965d4, 0x0, 0xffffffff, 0x1, 0x0), at 0xfb2c9184
    [15] 0xfa8866b4(0x28df150, 0xf71f9d14, 0xf71fa390, 0xfdf88a80, 0x0, 0xf71fa134), at 0xfa8866b4
    [16] 0xfa90c320(0x41f30d0, 0xfe476544, 0x28aae50, 0xf71fa380, 0x3, 0xf71fa458), at 0xfa90c320
    [17] 0xfad8f044(0x867800, 0x41f3198, 0xf71fb500, 0xf71fa670, 0xf71fb500, 0xf71fa5b0), at 0xfad8f044
    [18] 0xfad838dc(0x28aad08, 0xf71fb234, 0xfe7f165c, 0xfdf88a80, 0xf71fad6c, 0xf71fae44), at 0xfad838dc
    [19] 0xfb293ed0(0x28dba98, 0x28aad08, 0xc54400, 0xf71fb500, 0xf71fb4d0, 0xfdf88a80), at 0xfb293ed0
    [20] 0xfa758038(0x28dbab0, 0xfe6ea03c, 0xfe6ea03c, 0xf71fb5a0, 0x1, 0xf71fb5c0), at 0xfa758038
    [21] 0xfa9d9918(0xf71fbed0, 0x28dbdc0, 0xfdf88a80, 0x28e05b8, 0xf71fbf28, 0xfe4eab9c), at 0xfa9d9918
    [22] 0xfa614f74(0x17be110, 0xf71fc000, 0x0, 0x0, 0xfa629ee8, 0xfe275df0), at 0xfa614f74
    Without Coherence lib we don't see these kind of bad address core dumps

    Some time we do see below stack trace caused by coherence ,
    Current function is coherence::native::NativeAtomic64::peek
    79 return m_lAtomic;
    (dbx) where
    =>[1] coherence::native::NativeAtomic64::peek(this = 0x3844119f), line 79 in "NativeAtomic64.hpp"
    [2] coherence::lang::Object::_detach(this = 0x38441197, fEscaped = false), line 761 in "Object.hpp"
    [3] 0xfa2a7fc0(0x3192d5b0, 0x0, 0xc0000000, 0xfdf88a80, 0x0, 0x4f5ca40), at 0xfa2a7fc0
    [4] 0xfa7c5570(0x3192d528, 0x1, 0x1000, 0x3f1728, 0x3f1400, 0xfdf88a80), at 0xfa7c5570
    [5] 0xfab9537c(0x3192d5c8, 0x1ffffe0, 0xfdf88a80, 0x80000000, 0xc0, 0x80), at 0xfab9537c
    [6] coherence::lang::Object::_detach(this = 0x3192d5c8, fEscaped = false), line 774 in "Object.hpp"
    [7] 0xfa7ccd34(0xf71fa288, 0x2, 0x18, 0xfdf88a80, 0x1, 0x1), at 0xfa7ccd34
    [8] 0xfa886744(0x2c0d4e0, 0xf71f9d14, 0xf71f9d14, 0xfdf88a80, 0x0, 0xf71fa134), at 0xfa886744
    [9] 0xfa90c320(0x655adb0, 0xfe476544, 0x2bc2a40, 0xf71fa380, 0x2, 0xf71fa458), at 0xfa90c320
    [10] 0xfad8f044(0x867800, 0x655ae78, 0xf71fb500, 0xf71fa670, 0xf71fb500, 0xf71fa5b0), at 0xfad8f044
    [11] 0xfad838dc(0x2bc28f8, 0xf71fb234, 0xfe7f165c, 0xfdf88a80, 0xf71fad6c, 0xf71fae44), at 0xfad838dc
    [12] 0xfb293ed0(0x2c09620, 0x2bc28f8, 0xc54400, 0xf71fb500, 0xf71fb4d0, 0xfdf88a80), at 0xfb293ed0
    [13] 0xfa758038(0x2c09638, 0xfe6ea03c, 0xfe6ea03c, 0xf71fb5a0, 0x1, 0xf71fb5c0), at 0xfa758038
    [14] 0xfa9d9918(0xf71fbed0, 0x2c09948, 0xfdf88a80, 0x2c0e9c8, 0xf71fbf28, 0xfe4eab9c), at 0xfa9d9918
    [15] 0xfa614f74(0x256e910, 0xf71fc000, 0x0, 0x0, 0xfa629ee8, 0xfe275df0), at 0xfa614f74
    (dbx)
    Please advice.

  • Core dump in malloc

    I get a core dump while making a call to malloc.
    Owing to waht reasons can malloc give a coredump?

    Your application has corrupted the malloc heap data structures.
    Use dbx' access checking feature, or use watchmalloc(3MALLOC), or libumem, or "Electric Fence", or ... to
    find out where your application corrupts malloc's data structures.

  • Value type exception causes core dump

    Hi,
    Here is the situation: Session EJB (SynchronousAdapterBean) running on WebLogic
    7.0 is being called by C++ client using Tuxedo 8.1 Solaris 8. The SynchronousAdapterBean
    has a find method which throws a user defined exception (SynchronousAdapterException)
    resulting in a core dump.
    I have read through much documentation on the newsgroups, edocs.bea.com, and
    the examples coming with WebLogic.
    Here some of the things I did:
    1.
    When using the 'idl' command to generate the C++ code, I did not forget to use
    a '-i' to generate the implementation files: SynchronousAdapterException_i.cpp
    and SynchronousAdapterException_i.h.
    In my "play with it to make it work" phase, I also did this for: SynchronousAdapterEx_i.cpp
    and SynchronousAdapterEx_i.h.
    2.
    In my C++ client, I did not forget to register the factory as such:
    orb->register_value_factory
    ((char* const)com::trs::cv::comm::cnja::synchadapter::_tc_SynchronousAdapterException->id(),
    (CORBA::ValueFactory)
    new com_trs_cv_comm_cnja_synchadapter_SynchronousAdapterException_factory());
    This seemed to work because I actually put debug cout statements in the 'com_trs_cv_comm_cnja_synchadapter_SynchronousAdapterException_factory'
    in the file SynchronousAdapterEx_i.cpp and it confirmed that it was constructed
    and the reference count was incremented.
    3.
    I know for sure that it is a 'SynchronousAdapterException' being thrown on the
    server side because all the find method does it this point is:
    throw new SynchronousAdapterException("test1");
    Questions:
    1. I read at a few places that one only has to register the "most derived" class
    being thrown (in my case 'SynchronousAdapterException'). What does one do with
    all the other exceptions generated:
    EJBException_c.h
    EJBException_c.cpp
    EJBEx_c.h
    EJBEx_c.cpp
    CreateEx_c.h
    CreateEx_c.cpp
    CreateException_c.h
    CreateException_c.cpp
    RemoveEx_c.h
    RemoveEx_c.cpp
    RemoveException_c.h
    RemoveException_c.cpp
    RuntimeEx_c.h
    RuntimeEx_c.cpp
    RuntimeException_c.cpp
    RuntimeException_c.h
    SynchronousAdapterEx_c.cpp
    SynchronousAdapterEx_c.h
    SynchronousAdapterEx_i.cpp
    SynchronousAdapterEx_i.h
    Exc.cpp
    Exc.h
    Exceptionc.cpp
    Exceptionc.h
    2. What step could I have missed?
    Alex

    Hi Andy,
    1.
    Well no new member classes in SynchronousAdapterException it just looks like this:
    public class SynchronousAdapterException extends Exception {
    public SynchronousAdapterException() {
    super();
    Not available in 1.3.1, but is available in 1.4
    public SynchronousAdapterException(String message, Throwable ex) {
    super(message, ex);
    public SynchronousAdapterException(String message) {
    super(message);
    Not available in 1.3.1, but is available in 1.4
    public SynchronousAdapterException(Throwable ex) {
    super(ex);
    2.
    We are using:
    java version "1.3.1_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_03-b03)
    Java HotSpot(TM) Client VM (build 1.3.1_03-b03, mixed mode)
    3.
    dbx produces the following, anything ring a bell?
    Reading libdl.so.1
    Reading libaio.so.1
    Reading libmp.so.2
    Reading libc_psr.so.1
    Reading liborbiiop.so.71
    Reading liborbtcp.so.71
    detected a multithreaded program
    t@2 (l@2) terminated by signal ABRT (Abort)
    0xfec9bbd4: lwpkill+0x0008: bgeu,a lwpkill+0x1c
    Current function is operator>>
    218 mb.UnMarshalValue(::com::trs::cv::comm::cnja::synchadapter::_tc_SynchronousAdapterException,
    obj);
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
    current thread: t@2
    [1] lwpkill(0x0, 0x2, 0x0, 0x6, 0x197f0, 0x4c6e0), at 0xfec9bbd4
    [2] raise(0x6, 0x0, 0xffffffff, 0xc00cc, 0x8, 0xfee355c0), at 0x4c6e8
    [3] abort(0xd2040, 0xbeaf8, 0xff3b2aac, 0xfee34684, 0x15398, 0xfee34874), at
    0x4c6a8
    [4] __Cimpl::ex_terminate(0x0, 0x0, 0xfee4a500, 0xff1edf90, 0xff09ecd0, 0x1),
    at 0xfee34684
    ---- hidden frames, use 'where -h' to see them all ----
    [6] OBB::MarshalBuf::UnMarshalValue(0xfeaf9a28, 0xc9dd8, 0xfeaf99b0, 0xff1edf90,
    0xff1edfd0, 0xfed2ebb8), at 0xff0a3980
    =>[7] operator>>(mb = CLASS, obj = CLASS), line 218 in "SynchronousAdapterExc.cpp"
    [8] _tcr_com_trs_cv_comm_cnja_synchadapter_SynchronousAdapterEx_unmarsh(mh =
    0xce520, obj = 0xfeaf9b7c, flags = 130U), line 259 in "SynchronousAdapterEx_c.cpp"
    [9] TCInterpreter::DecodeByTypeCode(0x16, 0xff1d674c, 0xfeaf9b7c, 0xce520, 0x82,
    0xfeaf9b07), at 0xff0f3aec
    [10] TCInterpreter::DecodeById(0xcbaa0, 0xcf230, 0xfeaf9b7c, 0xce520, 0x82,
    0xfeaf9f98), at 0xff0f3c94
    [11] ReplyMessage::DecodeMessageBody(0x18000, 0xcd820, 0xfeaf9f98, 0xbf358,
    0xfebcffb0, 0xfed2ebb8), at 0xff0e1938
    [12] GIOPMessage::DecodeBody(0xce240, 0xfeaf9f98, 0xff0dd494, 0xff0dd494, 0xffffffd0,
    0xfeb93e24), at 0xff0c23a0
    [13] IiopProtocol::Reply(0xd0958, 0xce240, 0xce148, 0xfeaf9f98, 0x100, 0xfebd0010),
    at 0xfeb94064
    [14] IiopMsgReceiver::MsgReceived(0xca5a0, 0xce240, 0xce148, 0xfeaf9f98, 0x0,
    0xfeaf9f98), at 0xfeb9bc74
    [15] GiopMessageProtocol::MsgReceived(0xcb358, 0xfeaf9dd8, 0xd1160, 0xfeaf9f98,
    0x0, 0xfeaf9f98), at 0xfebac6fc
    [16] MessageManager::RecvMsgFirstTime(0xcf8c0, 0xce240, 0xd1160, 0xcb358, 0xd11d0,
    0xfeaf9f98), at 0xfebab1b0
    [17] MessageManager::AvailableForRecvMsg(0xcf8c0, 0xd1160, 0xcb358, 0xfeaf9f98,
    0x3e8, 0xd1170), at 0xfebaa030
    [18] ChannelManager::DoReadWork(0xff1d674c, 0xfebd0038, 0xd1160, 0x0, 0x0, 0xcfd58),
    at 0xfeba54dc
    [19] ChannelManager::DoIt(0xcb3b0, 0xfeaf9f98, 0x0, 0xfebcffd0, 0xcfda0, 0xfebcffd0),
    at 0xfeba0750
    [20] WorkerManager::DoWorkerThread(0x0, 0xca648, 0xfeaf9f98, 0xcfda0, 0xfeba9924,
    0x0), at 0xfeba7894
    [21] WorkerThread(0xcfd98, 0xfeafa000, 0x0, 0x0, 0x0, 0x0), at 0xfeba9974
    (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx)
    Thanks,
    Alex
    Andy Piper <[email protected]> wrote:
    "Alex" <[email protected]> writes:
    It sounds like you have done all the right steps. More comments in-line:
    1.
    When using the 'idl' command to generate the C++ code, I did not forgetto use
    a '-i' to generate the implementation files: SynchronousAdapterException_i.cpp
    and SynchronousAdapterException_i.h. Ok.
    In my "play with it to make it work" phase, I also did this for: SynchronousAdapterEx_i.cpp
    and SynchronousAdapterEx_i.h.This should not be necessary - XXXEx is an IDL exception.
    2.
    In my C++ client, I did not forget to register the factory as such:
    orb->register_value_factory
    ((char* const)com::trs::cv::comm::cnja::synchadapter::_tc_SynchronousAdapterException->id(),
    (CORBA::ValueFactory)
    new com_trs_cv_comm_cnja_synchadapter_SynchronousAdapterException_factory());Ok. What does the Exception actually look like in Java? (Incidentally
    the _i file creates a useful helper function called _register() which
    will do this step for you). Did you register all member classes? You
    are correct about most derived types being the important ones, but you
    need to also register member classes if they are not standard.
    This seemed to work because I actually put debug cout statements inthe 'com_trs_cv_comm_cnja_synchadapter_SynchronousAdapterException_factory'
    in the file SynchronousAdapterEx_i.cpp and it confirmed that it wasconstructed
    and the reference count was incremented.
    3.
    I know for sure that it is a 'SynchronousAdapterException' being thrownon the
    server side because all the find method does it this point is:
    throw new SynchronousAdapterException("test1");Ok (incidentally you are not running the server on JDK 1.4 are
    you. This would cause problems).
    Questions:
    1. I read at a few places that one only has to register the "most derived"class
    being thrown (in my case 'SynchronousAdapterException'). What doesone do with
    Yes.
    all the other exceptions generated:These are just needed at compile time so that you don't get undefined
    symbols.
    2. What step could I have missed?Its not clear. You should try running in a debugger and seeing where
    its falling over.
    andy

  • Pro*c program causing core dump in 11g

    hello every one,
    I am trying to debug a pro*c program which is resulting in a core dump. It used to work fine in with Oracle 10g precompiler but is causing a core dump with 11g. When I run dbx here is what I get.
    dbx wreg309
    Type 'help' for help.
    [using memory image in core]
    reading symbolic information ...
    Segmentation fault in u_fsetcodepage_3_8 at 0x9000000014f4f70 ($t1)
    0x9000000014f4f70 (u_fsetcodepage_3_8+0x68) f87f0010 std r3,0x10(r31)
    Any ideas what this means ? Thanks.

    Hi,
    I came across your problem on the Oracle Discussions Forum from back on June of 2009.
    I am working with a pro*c program, in Banner 8. I getting the same message from a core dump,, that you got. I was hoping
    you might have written down what you did to resolve it.
    My pro*c program is key to running all the SQR code we have. So it's very important. The version of sqr that gets
    linked into it is 32-bit and our environment is 64-bit. Our contract with Oracle for SQR has lapsed (it's a long
    and expensive story and this is probably not the place). My whole migration to Oracle 11 is being held up by this.
    I realize it's been a while since you worked on it but if you could tell me how you resolved your problem, I might be
    able to do the same.
    Thanks,
    Tom Mayne
    North Shore Community College
    Danvers MA
    [email protected]
    cell 978 423 6867

  • Intresting segv:studio12update1 core dump in stlport 4 startup:mixing C&C++

    Hi
    I am getting core dump below is the stack trace:
    (dbx) where
    current thread: t@1
    =>[1] std::basic_filebuf<wchar_t,std::char_traits<wchar_t> >::imbue(0xffffffff4b3d0bf0, 0xffffffff7fffe790, 0x4c8, 0xffffffff6971f128, 0x400, 0xffffffff69711e68), at 0xffffffff69592200
    [2] std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >::pubimbue(0xffffffff695921a0, 0xffffffff4b3d0bf0, 0xffffffff7fffe790, 0xffffffff6971a938, 0x0, 0xffffffff7fffe6d0), at 0xffffffff6956d4e8
    [3] std::basic_ios<wchar_t,std::char_traits<wchar_t> >::imbue(0xffffffff7fffe798, 0xffffffff6971fbd0, 0xffffffff7fffe790, 0xffffffff69711e68, 0x13da94, 0x400), at 0xffffffff6957284c
    [4] std::basic_ios<wchar_t,std::char_traits<wchar_t> >::init(0xffffffff6971fbd0, 0xffffffff4b3d0bf0, 0x448, 0xffffffff69711e68, 0x19f4c4, 0x400), at 0xffffffff69572a0c
    [5] std::basic_ostream<wchar_t,std::char_traits<wchar_t> >::basic_ostream(0xffffffff6971fbc8, 0xffffffff4b3d0bf0, 0xc0, 0x185fec, 0x0, 0xffffffff69711e68), at 0xffffffff6958becc
    [6] std::__Wide_Init::__Wide_Init(0xffffffff4b3ceec0, 0xffffffff4b3d0bf0, 0xffffffff4b3d0c90, 0xffffffff4b3c27d0, 0xffffffff6971fd38, 0xe000), at 0xffffffff4b21444c
    ---- hidden frames, use 'where -h' to see them all ----
    [8] __Cimpl::cplus_init(0x1, 0xffffffff4de0dd60, 0xffffffff4de0dd68, 0x0, 0x1044a4, 0xffffffff4b3cf460), at 0xffffffff4dd08660
    [9] 0xffffffff4b235ae8(0x0, 0x0, 0xffffffff7f72cb18, 0xffffffff7f611ee8, 0x11e6a0, 0xffffffff7f402400), at 0xffffffff4b235ae8
    [10] call_init(0x1, 0x1, 0xffffffff4b235a10, 0xffffffff68a007b8, 0xffdfffff, 0xffffffff7f72cb18), at 0xffffffff7f611ef0
    [11] setup(0xc7, 0x28, 0xc10000, 0xa000000, 0xffffffff61a01b08, 0x100000), at 0xffffffff7f6113b4
    [12] _setup(0x6ffffff9, 0xb00, 0xffffffff7f62ae5c, 0x100000040, 0x0, 0xffffffff7ffff158), at 0xffffffff7f620554
    [13] rtboot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f60511c
    Some important notes I am mixing C & C++
    wrap is the C interface so when I link application I am explicitly linking libC & libstlport.so
    -L/opt/sunstudio12.1/lib/stlport4/v9 -lstlport
    -L/usr/lib/64
    -lstlport
    -lCrun
    I am compiling my application like this :
    CC -g0 -mt -compat=5 -I/opt/sunstudio12.1/prod/include/CC/stlport4 -D_POSIX_PTHREAD_SEMANTICS -DACE_HAS_KSTAT -DACE_HAS_SCTP -DACE_HAS_LKSCTP -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -DSUN_CC_HAS_PVFC_BUG -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -m64 -DXALTEDSUN64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -D_THREAD_SAFE -D_LARGE_FILES=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/export/home/frtbld/3rdparty/include/bdb -I/export/home/frtbld/3rdparty/include -I/export/home/oracle/OraHome/precomp/public -I/export/home/oracle/OraHome/network/public -I/export/home/oracle/OraHome/rdbms/public -I/export/home/oracle/OraHome/plsql/public -I/export/home/oracle/OraHome/rdbms/demo -I/export/home/frtbld/libcinc -I/usr/local/include -c DBAbs.cpp -o /export/home/frtbld/TMPOBJ/DBAbs.o
    Generating MyDb.o file from MyDb.cpp file ...
    CC -g0 -mt -compat=5 -I/opt/sunstudio12.1/prod/include/CC/stlport4 -D_POSIX_PTHREAD_SEMANTICS -DACE_HAS_KSTAT -DACE_HAS_SCTP -DACE_HAS_LKSCTP -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -DSUN_CC_HAS_PVFC_BUG -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -m64 -DXALTEDSUN64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -D_THREAD_SAFE -D_LARGE_FILES=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/export/home/frtbld/3rdparty/include/bdb -I/export/home/frtbld/3rdparty/include -I/export/home/oracle/OraHome/precomp/public -I/export/home/oracle/OraHome/network/public -I/export/home/oracle/OraHome/rdbms/public -I/export/home/oracle/OraHome/plsql/public -I/export/home/oracle/OraHome/rdbms/demo -I/export/home/frtbld/libcinc -I/usr/local/include -c MyDb.cpp -o /export/home/frtbld/TMPOBJ/MyDb.o
    Generating wrap.o file from wrap.cpp file ...
    CC -g0 -mt -compat=5 -I/opt/sunstudio12.1/prod/include/CC/stlport4 -D_POSIX_PTHREAD_SEMANTICS -DACE_HAS_KSTAT -DACE_HAS_SCTP -DACE_HAS_LKSCTP -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -DSUN_CC_HAS_PVFC_BUG -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -m64 -DXALTEDSUN64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -D_THREAD_SAFE -D_LARGE_FILES=1 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I/export/home/frtbld/3rdparty/include/bdb -I/export/home/frtbld/3rdparty/include -I/export/home/oracle/OraHome/precomp/public -I/export/home/oracle/OraHome/network/public -I/export/home/oracle/OraHome/rdbms/public -I/export/home/oracle/OraHome/plsql/public -I/export/home/oracle/OraHome/rdbms/demo -I/export/home/frtbld/libcinc -I/usr/local/include -c wrap.cpp -o /export/home/frtbld/TMPOBJ/wrap.o
    ar *.o -o /export/home/frtbld/libcbin/LIB_BDBManager.a
    /export/home/tuxedo/bea/tuxedo10gR3/bin/buildclient -o /export/home/frtbld/TMPBIN/CompilerPP -f-L/export/home/oracle/OraHome/lib -f-lclntsh \
    -f /export/home/frtbld/TMPOBJ/CompilerMainPP.o \
    -f /export/home/frtbld/TMPOBJ/CompilerDataBasePP1.o \
    -f /export/home/frtbld/TMPOBJ/CompilerDataBasePP2.o \
    -f /export/home/frtbld/TMPOBJ/utilityPP.o \
    -f "-L/opt/sunstudio12.1/lib/stlport4/v9 -lstlport -L/export/home/frtbld/3rdparty/lib/bdblib -L/export/home/frtbld/3rdparty/lib/acelib -ldb_cxx-4.7 -lACE /export/home/frtbld/libcbin/LIB_DataBase.a /export/home/frtbld/libcbin/LIB_FileManager.a /export/home/frtbld/libcbin/LIB_Log.a /export/home/frtbld/libcbin/LIB_SHMManager.a /export/home/frtbld/libcbin/LIB_Expression.a /export/home/frtbld/libcbin/LIB_Timing.a /export/home/frtbld/libcbin/LIB_MMFManager.a /export/home/frtbld/libcbin/LIB_LicManager.a /export/home/frtbld/libcbin/LIB_InterProcComm.a /export/home/frtbld/libcbin/LIB_BDBManager.a /export/home/frtbld/libcbin/LIB_RatingPPMMFManager.a -L/usr/lib/hpux32/ -L/usr/local/lib/hpux32 -L/lib/hpux32 -L/export/home/frtbld/3rdparty/lib/ssllib -lcrypto -lz -lm -L/usr/lib/64 -L/opt/sunstudio12.1/lib/stlport4/v9 -lCrun "
    Regards
    Anand Rathi

    Hi Thanks for your help
    I changed the linking process to use CC
    but still its same .....
    and i can also see that its invoking __Cimpl::cplus_init
    also i have an doubt about 64bit and std::__Wide_Init::__Wide_Init
    weather issue is with wide character 64 bit ?
    Now the command is
    CC -g0 -mt -compat=5 -I/opt/sunstudio12.1/prod/include/CC/stlport4 -D_POSIX_PTHREAD_SEMANTICS -DACE_HAS_KSTAT -DACE_HAS_SCTP -DACE_HAS_LKSCTP -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -DSUN_CC_HAS_PVFC_BUG -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -m64 -DXALTEDSUN64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -m64 -mt -I/export/home/tuxedo/bea/tuxedo10gR3/include -o /export/home/frtbld/TMPBIN/CompilerPP -L/export/home/tuxedo/bea/tuxedo10gR3/lib -xarch=v9 -L/export/home/oracle/OraHome/lib -lclntsh /export/home/frtbld/TMPOBJ/CompilerMainPP.o /export/home/frtbld/TMPOBJ/CompilerDataBasePP1.o /export/home/frtbld/TMPOBJ/CompilerDataBasePP2.o /export/home/frtbld/TMPOBJ/utilityPP.o -L/opt/sunstudio12.1/lib/stlport4/v9 -lstlport -L/export/home/frtbld/3rdparty/lib/bdblib -L/export/home/frtbld/3rdparty/lib/acelib -ldb_cxx-4.7 -lACE /export/home/frtbld/libcbin/LIB_DataBase.a /export/home/frtbld/libcbin/LIB_FileManager.a /export/home/frtbld/libcbin/LIB_Log.a /export/home/frtbld/libcbin/LIB_SHMManager.a /export/home/frtbld/libcbin/LIB_Expression.a /export/home/frtbld/libcbin/LIB_Timing.a /export/home/frtbld/libcbin/LIB_MMFManager.a /export/home/frtbld/libcbin/LIB_LicManager.a /export/home/frtbld/libcbin/LIB_InterProcComm.a /export/home/frtbld/libcbin/LIB_BDBManager.a /export/home/frtbld/libcbin/LIB_RatingPPMMFManager.a -L/usr/lib/hpux32/ -L/usr/local/lib/hpux32 -L/lib/hpux32 -L/export/home/frtbld/3rdparty/lib/ssllib -lcrypto -lz -lm -L/usr/lib/64 -L/opt/sunstudio12.1/lib/stlport4/v9 -lCrun -ltux -lbuft -lfml -lfml32 -lengine -R/usr/lib/lwp -lpthread -lposix4 -lsocket -lnsl -lm -lnsl -lsocket
    t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
    0xffffffff7e192200: imbue+0x0060: ldx [%o0], %o1
    (dbx) where
    current thread: t@1
    =>[1] std::basic_filebuf<wchar_t,std::char_traits<wchar_t> >::imbue(0xffffffff7acd0bf0, 0xffffffff7fffe4d0, 0x4c8, 0xffffffff7e31f128, 0x400, 0xffffffff7e311e68), at 0xffffffff7e192200
    [2] std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >::pubimbue(0xffffffff7e1921a0, 0xffffffff7acd0bf0, 0xffffffff7fffe4d0, 0xffffffff7e31a938, 0x13da94, 0xffffffff7fffe410), at 0xffffffff7e16d4e8
    [3] std::basic_ios<wchar_t,std::char_traits<wchar_t> >::imbue(0xffffffff7fffe4d8, 0xffffffff7e31fbd0, 0xffffffff7fffe4d0, 0xffffffff7e311e68, 0x13da94, 0x400), at 0xffffffff7e17284c
    [4] std::basic_ios<wchar_t,std::char_traits<wchar_t> >::init(0xffffffff7e31fbd0, 0xffffffff7acd0bf0, 0x448, 0xffffffff7e311e68, 0x19f4c4, 0x400), at 0xffffffff7e172a0c
    [5] std::basic_ostream<wchar_t,std::char_traits<wchar_t> >::basic_ostream(0xffffffff7e31fbc8, 0xffffffff7acd0bf0, 0xc0, 0x185fec, 0x0, 0xffffffff7e311e68), at 0xffffffff7e18becc
    [6] std::__Wide_Init::__Wide_Init(0xffffffff7acceec0, 0xffffffff7acd0bf0, 0xffffffff7acd0c90, 0xffffffff7acc27d0, 0xffffffff7e31fd38, 0xe000), at 0xffffffff7ab1444c
    ---- hidden frames, use 'where -h' to see them all ----
    [8] __Cimpl::cplus_init(0x1, 0xffffffff7d00dd60, 0xffffffff7d00dd68, 0x0, 0x1044a4, 0xffffffff7accf460), at 0xffffffff7cf08660
    [9] 0xffffffff7cf0a500(0x0, 0x0, 0xffffffff7f72cb18, 0xffffffff7f611ee8, 0x11e6a0, 0xffffffff79702000), at 0xffffffff7cf0a500
    [10] call_init(0x1, 0x3, 0xffffffff7cf0a428, 0xffffffff7f201530, 0xffdfffff, 0xffffffff7f72cb18), at 0xffffffff7f611ef0
    [11] elf_bndr(0xffffffff7f500718, 0xffffffff7cf016e0, 0xffffffff7ab35ab4, 0xffffffff7cf06610, 0xffffffff78d009e8, 0xffffffff7f72f6d8), at 0xffffffff7f61f060
    [12] elf_rtbndr(0x590000, 0x1001d3538, 0x0, 0xffffffff7ab35ab4, 0x0, 0x0), at 0xffffffff7f60514c
    [13] 0x0(0xffffffff7acc7e28, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x0
    [14] 0xffffffff7ab35ab4(0x0, 0x0, 0xffffffff7f72cb18, 0xffffffff7f611ee8, 0x11e6a0, 0xffffffff79702000), at 0xffffffff7ab35ab4
    [15] call_init(0x1, 0x1, 0xffffffff7ab35a10, 0xffffffff7a900030, 0xffdfffff, 0xffffffff7f72cb18), at 0xffffffff7f611ef0
    [16] setup(0x0, 0x27, 0xc10000, 0xa000000, 0xffffffff78d01780, 0x100000), at 0xffffffff7f6113b4
    [17] _setup(0x6ffffff9, 0xb00, 0xffffffff7f62ae5c, 0x100000040, 0x0, 0xffffffff7ffff288), at 0xffffffff7f620554
    [18] rtboot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f60511c
    Edited by: anandprathi on Aug 12, 2009 9:48 AM
    Edited by: anandprathi on Aug 12, 2009 9:52 AM

  • Python crashes.  Core dump inside xcurses2/tgetent(): cur_term is nil

    I tried to build latest Python sources with Sun C compiler on Solaris snv_145 (sparc or x86)
    There is no issue to build the binary, but then Python's
    harness runs it as: 'python -E ./setup.py build' it core dumps.
    Actually, Python's version and Sun compiler versions are not essential.
    I tried viariety of them, and all produce the same core dump.
    I ran dbx with this and pinpointed the place:
    At some moment python binary calls rlinit_terminal_io() from
    open source readline.so library, which in turn invokes kernel's tgetent()
    function from libcurses.so.2. That tgetent() function crashes on the
    following line where cur_term is nil:
    if (strcmp(cur_term->_term, name) == 0)
    The top of crashed stack looks like this:
    ========================
    t@1 (l@1) signal SEGV (no mapping at the fault address) in tgetent at line 65 in file "tgetent.c"
    65      if (strcmp(cur_term->_term, name) == 0)
    (dbx) print name
    name = 0x8047a4d "sun-cmd"
    (dbx) print cur_term
    cur_term = (nil)
    (dbx) where
    current thread: t@1
    =>[1] tgetent(buffer = 0x8786dd0 "", name = 0x8047a4d "sun-cmd"), line 65 in "tgetent.c"
    [2] rlinit_terminal_io(terminal_name = 0x8047a4d "sun-cmd"), line 460 in "terminal.c"
    [3] readline_initialize_everything(), line 1066 in "readline.c"
    [4] rl_initialize(), line 968 in "readline.c"
    [5] setup_readline(), line 884 in "readline.c"
    [6] PyInit_readline(), line 1133 in "readline.c"
    [7] PyImportLoadDynamicModule(name = 0x8747698 "readline", pathname = 0x8656e38 "build/lib.solaris-2.11-i86pc-3.2-pydebug/readline.so", fp = (nil)), line 57 in "importdl.c"
    ===================
    May be to prevent this crash I need to define some
    environment variable which ultimately will initialize 'cur_term' global?
    Please advise.

    Please edit your post and use code tags when posting logs and error messages to the boards:
    https://wiki.archlinux.org/index.php/Fo … s_and_Code
    As to your errors, this is documented in the wiki:
    https://wiki.archlinux.org/index.php/Pa … stem.22.21

  • JVM core dump - JNI code

    I am using JNI in my Java application , 12 hours after running my test case get a JVM crash -
    1) These are the parameters with which i invoke my Java program
    java -d64 -Xcheck:jni -Xmx2560M -Xms2560M -Xss256k RunQueries
    2) The Heap output at the time of the core shows "from space" as 100% used , does this signify anything?
    Heap at VM Abort:
    Heap
    def new generation total 848128K, used 672342K [0xfffffffe93c00000, 0xfffffffec9150000, 0xfffffffec9150000)
    eden space 822464K, 78% used [0xfffffffe93c00000, 0xfffffffebb385b90, 0xfffffffec5f30000)
    from space 25664K, 100% used [0xfffffffec7840000, 0xfffffffec9150000, 0xfffffffec9150000)
    to space 25664K, 0% used [0xfffffffec5f30000, 0xfffffffec5f30000, 0xfffffffec7840000)
    tenured generation total 1747648K, used 1350866K [0xfffffffec9150000, 0xffffffff33c00000, 0xffffffff33c00000)
    the space 1747648K, 77% used [0xfffffffec9150000, 0xffffffff1b884830, 0xffffffff1b884a00, 0xffffffff33c00000)
    compacting perm gen total 16384K, used 13550K [0xffffffff33c00000, 0xffffffff34c00000, 0xffffffff37c00000)
    the space 16384K, 82% used [0xffffffff33c00000, 0xffffffff3493b860, 0xffffffff3493ba00, 0xffffffff34c00000)
    Local Time = Mon Feb 12 21:49:40 2007
    Elapsed Time = 61687
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.4.2_07-b05 mixed mode)
    3) A dbx on the Java core shows the location in the JNI code where the core dump occured.
    dbx `which java` core
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.3' in your .dbxrc
    Reading java
    dbx: internal warning: writable memory segment 0x7cb00000[16384] of size 0 in core
    core file header read successfully
    Reading ld.so.1
    Reading libthread.so.1
    Reading libdl.so.1
    Reading libc.so.1
    Reading libc_psr.so.1
    Reading libjvm.so
    Reading libCrun.so.1
    Reading libsocket.so.1
    Reading libnsl.so.1
    Reading libm.so.1
    WARNING!!
    A loadobject was found with an unexpected checksum value.
    See `help core mismatch' for details, and run `proc -map'
    to see what checksum values were expected and found.
    dbx: warning: Some symbolic information might be incorrect.
    t@1 (l@1) terminated by signal ABRT (Abort)
    0xffffffff7eea822c: lwpkill+0x0008: bcc,a,pt %icc,_lwp_kill+0x18 ! 0xffffffff7eea823c
    Current function is Java_getLoid (optimized)
    7239 e = cod_to_long (*(o_object*) data, &loid_as_long);
    (dbx) where
    current thread: t@1
    [1] lwpkill(0x0, 0x6, 0xffffffffffffffe6, 0x0, 0x0, 0x0), at 0xffffffff7eea822c
    [2] raise(0x6, 0x0, 0xffffffff7fffad30, 0x7fbffeff00003ff6, 0x0, 0x2), at 0xffffffff7ee58a8c
    [3] abort(0x0, 0xffffffff7fffae10, 0x0, 0xfffffffffffffff8, 0x0, 0xffffffff7fffae39), at 0xffffffff7ee3e3b8
    [4] os::abort(0x1, 0xffffffff7e9d295c, 0xffffffff7fffaf10, 0xffffffff7e9d24a9, 0x4b007c, 0xffffffff7eb78878), at 0xffffffff7e90951c
    [5] os::handle_unexpected_exception(0x10011e600, 0xa, 0xfffffffe90345704, 0xffffffff7fffbeb0, 0xffffffff7e69c6f8, 0x0), at 0xffffffff7e907e08
    [6] JVM_handle_solaris_signal(0xffffffff7fffbeb0, 0xffffffff7e9d443e, 0xffffffff7fffbbd0, 0x1, 0x0, 0x1), at 0xffffffff7e69c800
    [7] __sighndlr(0xa, 0xffffffff7fffbeb0, 0xffffffff7fffbbd0, 0xffffffff7e69cb9c, 0x0, 0x0), at 0xffffffff7f2188d8
    ---- called from signal handler with signal 10 (SIGBUS) ------
    =>[8] Java_getLoid(vjEnv = ???, cls = ???, handle = ???, attr = ???) (optimized), at 0xfffffffe90345704 (line ~7239) in "j.c"
    I have added checks for this function call to ensure that no invalid pointer is being sent to it which could cause a segmentation violation.
    Please could someone give me some pointers on how to solve this problem, the error occurs at this point only 12 hours after running the test case..

    First step is to add the option -Xcheck:jni to your java command line. It will flag common JNI errors.
    If that doesn't identify the problem, then compile your jni code with debugging symbols (-g) and add the following option to the java command line when you run your test: -XX:+ShowMessageBoxOnError. When you hit the problem again, the VM will keep the process alive instead of calling abort(). Then you can use dbx to attach to the live process and should be able to get a better idea of what went wrong.

  • Core dump/hang problem solaris 8

    Hello ,
    I am using the following configuration, to build my application
    SunOS 5.8 Generic_108528-12 sun4u sparc
    SUNW,Ultra-5_10
    64 bit machine with CC 5.0
    While excuting the program i get core dump/hang in cout , following is the stack looking from dbx
    [1] mutexadaptive_lock(0xffffffff7c322000, 0xffffffff7c331670, 0x4c00, 0x1000, 0xfffeffff, 0x1), at 0xffffffff7c20daac
    [2] cmutexlock(0x10017eca0, 0x20, 0x20, 0x10002f66c, 0x0, 0x0), at 0xffffffff7c20d870
    [3] std::locale::__install(0x10, 0x10017ec90, 0x0, 0xffffffff7fffe7e0, 0x0, 0x0), at 0x10002f66c
    [4] std::locale::__make_explicit(0x100047a90, 0x0, 0x0, 0x10017ec90, 0x100176570, 0x100170068), at 0x10002f514
    [5] std::basic_filebuf<char,std::char_traits<char> >::overflow(0x10016f620, 0x73, 0x10016f620, 0x0, 0x0, 0x0), at 0x10004759c
    [6] std::basic_filebuf<char,std::char_traits<char> >::sync(0x10016f620, 0x10016f620, 0x0, 0x0, 0x0, 0x0), at 0x1000497c8
    [7] std::basic_ostream<char,std::char_traits<char> >::sentry::~sentry(0xffffffff7fffeb30, 0xffffffff7fffec50, 0x73, 0x73, 0x73, 0x0), at 0x10002c0bc
    [8] std::operator<<(0x10016f7f0, 0x10016f800, 0x10016f7f0, 0x73, 0x0, 0x100063cf0), at 0x10002b70c
    [9] usage(0x10016f900, 0x1001706d8, 0x1001706c0, 0x10016f930, 0x10016f910, 0x10016f888), at 0x10001d1cc
    [10] main(0x1, 0xffffffff7ffff5d8, 0xffffffff7ffff5e8, 0x0, 0x0, 0x100000000), at 0x10001ad34
    Any ideas regarding this,
    Thanks and Regards
    Amol

    Hi,
    I didnt compile with -g option, but i got to the root of problem. In the program I was just doing cout , so it was very simple, but I was linking libpthread library with the program , also was giving -mt flag during compilation. When I removed this both, the program disn't dump core and nither did it hang.
    But the same thing worked with solaris 2.8 64 bit CC 5.0 with patch 108528-10 .
    So I just can make out the difference as to why this this is happening
    Regards
    Amol

  • Indecipherable core dump on Solaris x86_64

    On a 64-bit Solaris x86 machine (SunOS tempest-solaris 5.10 Generic_141445-09 i86pc i386 i86pc Solaris), I have been running gcc 4.3.4 (configured for i686-pc-solaris2.10) without a hitch. Both dbx 7.8 and gdb 7.1 are able to read core dumps created from a simple "goodbye, cruel world" program (kind of like "hello world", but it dereferences NULL at the end) built with gcc -m64 -g. However, with a more complex program, neither gdb nor dbx are able to figure it out core dumps (though they can debug it just fine if I set a breakpoint in main and start the program in the debugger).
    gdb's failure looks like this:
    GNU gdb (GDB) 7.1
    Copyright (C) 2010 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-pc-solaris2.10".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from
    /net/chronic2nas/emake-slothman-main-201006211520/out/i686_SunOS_64.5.10/ecloud/agent/ecagent...done.
    [New LWP 1]
    [New LWP 2]
    [New LWP 3]
    [New LWP 4]
    [New LWP 5]
    Reading symbols from /usr/lib/amd64/ld.so.1...(no debugging symbols
    found)...done.
    Loaded symbols for /usr/lib/amd64/ld.so.1
    Core was generated by `/opt/ecloud/i686_SunOS.5.10/bin/ecagent
    /opt/ecloud/i686_SunOS.5.10/bin/runagen'.
    Program terminated with signal 11, Segmentation fault.
    #0  0xfffffd7ffeac431c in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeac431c in ?? ()
    Cannot access memory at address 0xfffffd7fffdfed30
    (gdb) thread 2
    [Switching to thread 2 (LWP 2)]#0  0xfffffd7ffeb2c8fa in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb2c8fa in ?? ()
    Cannot access memory at address 0xfffffd7ffe1f8dd8
    (gdb) thread 3
    [Switching to thread 3 (LWP 3)]#0  0xfffffd7ffeb27527 in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb27527 in ?? ()
    Cannot access memory at address 0xfffffd7ffdfffd68
    (gdb) thread 4
    [Switching to thread 4 (LWP 4)]#0  0xfffffd7ffeb27527 in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb27527 in ?? ()
    Cannot access memory at address 0xfffffd7ffde00e78
    (gdb) thread 5
    [Switching to thread 5 (LWP 5)]#0  0xfffffd7ffeb2c8fa in ?? ()
    (gdb) bt
    #0  0xfffffd7ffeb2c8fa in ?? ()
    Cannot access memory at address 0xfffffd7ffdbffc58
    (gdb) info sharedlibrary
    From                To                  Syms Read   Shared Object Library
    0xfffffd7fff3c1010  0xfffffd7fff3e614e  Yes (*)     /usr/lib/amd64/ld.so.1
    (*): Shared library is missing debugging information.and dbx's looks like this:
    Reading ecagent
    dbx: internal warning: writable memory segment 0x597000[28672] of size 0 in core
    dbx: internal warning: writable memory segment 0x59e000[3600384] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7ffd405000[4096] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7fff3fd000[8192] of size 0 in core
    dbx: internal warning: writable memory segment 0xfffffd7fffdfa000[24576] of size 0 in core
    core file header read successfully
    Reading ld.so.1
    dbx: core file read error: address 0xfffffd7fff3fb000 not available
    dbx: core file read error: address 0xfffffd7fff3fbae0 not available
    dbx: core file read error: address 0x598ff0 not available
    dbx: warning: Dbx could not initialize rtld_db
    Make sure this is the same version of Solaris where the core dump originated.
    Use `help core mismatch' for more info.
    (l@1) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff:     <bad address 0xffffffffffffffff>
    (dbx) where
      [1] 0xfffffd7ffeac431c(0x0, 0x0, 0x784120, 0x170, 0x7, 0xffffffff), at 0xfffffd7ffeac431c
    (dbx) threads
    dbx: thread related commands not availableI get these errors even when debugging on the exact same machine where the core dump was generated. pstack is similarly confused:
    tempest-solaris% pstack /net/chronic2nas/emake-slothman-main-201006211520/logs-201006211902-solx2-ea2/core
    core '/net/chronic2nas/emake-slothman-main-201006211520/logs-201006211902-solx2-ea2/core' of 14854:     /opt/ecloud/i686_SunOS.5.10/bin/ecagent /opt/ecloud/i686_SunOS.5.10/bi
    -----------------  lwp# 1  --------------------------------
    fffffd7ffeac431c ???????? ()
    -----------------  lwp# 2  --------------------------------
    fffffd7ffeb2c8fa ???????? ()
    -----------------  lwp# 3  --------------------------------
    fffffd7ffeb27527 ???????? ()
    -----------------  lwp# 4  --------------------------------
    fffffd7ffeb27527 ???????? ()
    -----------------  lwp# 5  --------------------------------
    fffffd7ffeb2c8fa ???????? ()
    pstack: warning: librtld_db failed to initialize; symbols from shared libraries will not be availableAre there any arcane configuration parameters in Solaris that affect the generation of core dumps?

    Bother. Spoke too soon. One of my tests generated a readable core file, but the rest are having the same issues as detailed above. I am examining the core dump on the machine that generated it. The sizes of the failed tests are 21,522,239 and 21,485,375 and 21,526,447, so I doubt it’s running into a limit. (The successful one was 27,942,207.)
    On this machine, coreadm reports:
         global core file pattern:
         global core file content: all
           init core file pattern: core
           init core file content: all
                global core dumps: disabled
           per-process core dumps: enabled
          global setid core dumps: disabled
    per-process setid core dumps: disabled
         global core dump logging: disabledThe machine that got the successful core dump was physical while the ones where it failed were running under VMware LabManager, but I would be very surprised if that makes a difference to this matter. The successful core dump was generated by signal 9 (kill), while the bad ones have all been by signal 11 (segmentation fault).

Maybe you are looking for

  • Web Query (.iqy) not working in Excel after upgrade to 11.1.1.6

    After upgrade 11.1.1.5 to 11.1.1.6, the Web Query (.iqy) does not work. After open the .iqy file in Excel, entered the user and password, it only pulls in "PK" in one cell, instead of the expected analysis report. This was working in 11.1.1.5 before

  • Services in Ozark MO?

    I'm wondering if there will be services in Ozark MO. We had it when we lived in Springfield but now live in Ozark and would really love to have UVerse in Ozark.

  • Will this code to alter the find bar still work in FF29?

    This support thread contains code to change the way the find bar looks in firefox 27: https://support.mozilla.org/en-US/questions/976166?esab=a&s=&r=3&as=s Will this code, this method, still work in FF29? I don't really want to 'give it a try' withou

  • Downloading mountain lion and sharing between 2 macs

    When mountain lion is released how do I go about sharing the download between a I Mac and my daughters mac book pro wihich I bought and she uses. I believe Apple allows one paid download to be shared between 5 macs you own . I have a I tunes account

  • Some observations in raid0 (successful boot in raid0 linux3 kernel)

    Have prepared a two -drive raid0 bootable Compact Flash system. When first assembled it was in Kernel26v39 and booted into operating system and performed well.  I have upgraded a pair of CF cards to linux 3.1.5-1 and they no longer can boot into an o