Home » RDBMS Server » Server Administration » Oracle Server Processes are Vanishing on hitting CTRL+C in Client Application
Oracle Server Processes are Vanishing on hitting CTRL+C in Client Application [message #49909] Sun, 17 February 2002 20:07 Go to next message
Venkata Ramana B
Messages: 3
Registered: January 2002
Junior Member
Hi,
We have a strange problem of all the Oracle server processes disappearing.
Our application uses Pro*C for communicating with oracle 7.3.4 on Solaris.
We are handling the signal SIGINT) whenever the client hits "CTRL+C".
There are 3 conditions that are possible in our user application when it received the CTRL+C signal.
1) The user application has not send the query to Oracle yet.
2) The user application send the query to Oracle and it is being executed there still.
3) The user application received already processed Oracle data.
In the cases (1) and (3) we are aborting our user process transaction.
In the case (2) we are sending the SIGINT to Oracle to stop the presently running query.

In this scenario, when we tested our application by passing a very huge query to Oracle (which takes 5-7 mins and handles millions of records), all the Oracle Processes (ora_reco_, ora_smon_, ora_lgwr_, ora_dbwr_, ora_pmon_) are vanishing.
We tried enabling SQL_TRACE and setting all DUMP_DESTs. Also used the "tkprof" for any clue. Only that we got is, in our application log we are having an error "ORA-3113" from the Oracle Client Handler.
The irony is even no core is generated.

First of all I want to get conformation from you experts, whether what ever signal handling I am doing, is proper or not. I am giving the details below.
----------------------------
/* My SIGINT handler */
static void my_handler( int sig_number ) {
.....
signal_ignore(SIGINT);
if ( (Tran_status == NOTPASSED) || (Tran_status == ORACLE_COMPLETED))
{
signal(SIGINT,my_handler) ;
return ;
}

if ( Tran_status == ORACLE_RUNNING )
{
if (oracle_handler != NULL)
(*oracle_handler)(SIGINT); /* IS THIS CORRECT to abort Oracle query?? */
return ;
}
} /* End of the function my_handler */

main () {

struct sigaction act, oact;
........
set_signal_default(SIGINT);
/* This is because ORACLE installs its own SIGINT handler which
* will abort the running query. ORACLE does not install its handler
* unless the current handler for the SIGINT signal is set to
* SIG_DEFAULT. IS THIS CORRECT, ANYWAY ?? */

open_the_db(dbid) ; /* Oracle will load its handlers, here */
act.sa_handler = my_handler ;
sigaction(SIGINT, &act, &oact)
oracle_handler = oact.sa_handler ;
...........
} /* End Of Main */
-----------------------------------

My question here is is it OK to call like
(*oracle_handler)(SIGINT);
IS THIS CORRECT way to abort a Oracle query??
Or, is this causing the vanishing of the Oracle server processes?

Thanks for your heli in advance.

Best Regards,
Venkata Ramana B.
bvramana@ctd.hcltech.com
Re: Oracle Server Processes are Vanishing on hitting CTRL+C in Client Application [message #49910 is a reply to message #49909] Sun, 17 February 2002 20:16 Go to previous message
Venkata Ramana B
Messages: 3
Registered: January 2002
Junior Member
Hi,

This is to provide extra info on what I did.
I enables SQL_TRACE in the init parameter file.
But, I do not see any thing noticable from the alert.log file in $ORACLE_HOME/rdbms/log.

Here is it for your kind reference.

-----------------------------------------------------------
Wed Feb 13 10:54:59 2002
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
LICENSE_MAX_USERS = 0
Starting up ORACLE RDBMS Version: 7.3.4.0.1.
System parameters with non-default values:
processes = 50
nls_language = american
nls_territory = america
nls_date_language = american
nls_date_format = dd-mon-yyyy hh24:mi:ss
control_files = /mydisk/oracle734/dbs/cntrlSDBQWERUB1.ora, /mydisk/or
acle734/dbs/cntrlSDBQWERUB2.ora, /mydisk/oracle734/dbs/cntrlSDBQWERUB3.ora
compatible = 7.3.2.0.0
log_buffer = 8192
log_checkpoint_interval = 100000
db_files = 20
rollback_segments = r01, r02, r03, r04
remote_login_passwordfile= NONE
mts_service = MYDB
mts_servers = 0
mts_max_servers = 0
mts_max_dispatchers = 0
audit_trail = NONE
sort_area_retained_size = 65536
sort_direct_writes = AUTO
db_name = MYDB
ifile = /mydisk/oracle734/dbs/cnfgSDBQWERUB.ora
PMON started
DBWR started
LGWR started
RECO started
Wed Feb 13 10:55:00 2002
alter database mount exclusive
Wed Feb 13 10:55:00 2002
Successful mount of redo thread 1.
Wed Feb 13 10:55:00 2002
Completed: alter database mount exclusive
Wed Feb 13 10:55:00 2002
alter database open
Beginning crash recovery of 1 threadsRecovery of Online Redo Log: Thread 1 Group 1 Seq 82 Reading mem 0
Mem# 0 errs 0: /mydisk/oracle734/dbs/redoSDBQWERUB1.log
Crash recovery completed successfully
Wed Feb 13 10:55:02 2002
Thread 1 advanced to log sequence 83
Current log# 2 seq# 83 mem# 0: /mydisk/oracle734/dbs/redoSDBQWERUB2.log
Thread 1 opened at log sequence 83
Current log# 2 seq# 83 mem# 0: /mydisk/oracle734/dbs/redoSDBQWERUB2.log
Successful open of redo thread 1.
Wed Feb 13 10:55:03 2002
SMON: enabling cache recovery
SMON: enabling tx recovery
Wed Feb 13 10:55:04 2002
Completed: alter database open
-------------------------------------------------

Best Regards,
Venkata Ramana B.
Previous Topic: Re: free ocp papers
Next Topic: Re: Free OCP Papers
Goto Forum:
  


Current Time: Tue Aug 06 13:50:09 CDT 2024