This is a menu module being run with legacy PROC code since early 2000's. The utility of this particulat menu option is that an admin/Manager at the retail store can add the new users or update the existing user details. So that what ever the user record he adds thrown this menu program writen in (PROC),will be refelcted in DB. And the existing users list will be fetched from DB and displayed to the Manager on accessing this menu. The User record is something like below:
Name Null? Type
-------------- -------- -----------------
USER_ID NOT NULL VARCHAR2(10 CHAR)
USER_NAME VARCHAR2(30 CHAR)
GROUP_ID VARCHAR2(10 CHAR)
UPDATE_USER_ID VARCHAR2(10 CHAR)
USER_PASSWORD VARCHAR2(10 CHAR)
Everything is running fine all these years. Recently Figured out Magaers facing problem adding new users through menu. Figured out that the users count reached 146. And while trying to add the new user(i.e, 147's record), running into 'Memory fault'.
Trace files
/home/<Manager_Id>/oradiag_<Manager_Id>/diag/clients/user_<Manager_Id>/host_2779636078_110/trace/ora_26828_140568928807424.trc
DDE: Flood control is not active
2022-12-04T06:02:17.410531-05:00
`Incident 1 created, dump file:` `/home/<Manager_Id>/oradiag_<Manager_Id>/diag/clients/user_<Manager_Id>/host_2779636078_110/incident/incdir_1/ora_26828_140568928807424_i1.trc`
oci-24550 [11] [[si_signo=11] [si_errno=0] [si_code=1] [si_int=0] [si_ptr=0x7fd800000000] [si_addr=0x1a55026]] [] [] [] [] [] [] [] [] [] []
And here is incident trace file showing the stack trace.
cat ora_26828_140568928807424_i1.trc
Dump file /home/<Manager_Id>/oradiag_<Manager_Id>/diag/clients/user_<Manager_Id>/host_2779636078_110/incident/incdir_1/ora_26828_140568928807424_i1.trc
[TOC00000]
Jump to table of contents
Dump continued from file: /home/<Manager_Id>/oradiag_<Manager_Id>/diag/clients/user_<Manager_Id>/host_2779636078_110/trace/ora_26828_140568928807424.trc
[TOC00001]
oci-24550 [11] [[si_signo=11] [si_errno=0] [si_code=1] [si_int=0] [si_ptr=0x7fd800000000] [si_addr=0x1a55026]] [] [] [] [] [] [] [] [] [] []
[TOC00001-END]
[TOC00002]
========= Dump for incident 1 (oci 24550 [11]) ========
Tracing is in restricted mode!
<error barrier> at 0x7ffeaf8edd98 placed dbge.c@1317
[TOC00003]
----- Short Call Stack Trace -----
dbgexPhaseII()+1869<-dbgexProcessError()+1871<-dbgePostErrorDirectVaList_int()+1672<-dbgePostErrorDirect()+408<-kpeDbgSignalHandler()+299<-skgesig_sigactionHandler()+258<-__sighandler()<-__strncpy_sse2_unaligned()+2598<-process_user_security()+2649<-display_user_security()+1479<-menu1()+4839<-main()+203<-__libc_start_main()+245[TOC00003-END]
[TOC00004]
As shown in the stack trace
2598<-process_user_security()+2649<-display_user_security()
inspected these function calls from the PRO*C code and unable to figure out why 'Memory fault' happening exactly after 146 users. in the DB we are able to add more users manually without any issues.
I have read the previous answer related to 'Memory fault' where there can be possibility of void pointer reference, index out of bound etc. But not overwhelmed as this is 18K LOC. need guidance from any one who can help in tracing the culprit from this gigantic one.