Killing Defunct Operating System Process (Doc ID 298048.1)

Killing Defunct Operating System Process (Doc ID 298048.1) To Bottom
Modified:26-Jun-2013Type:HOWTO

In this Document

  Goal
  Solution
  References

APPLIES TO:

Oracle Database - Enterprise Edition - Version 8.1.7.4 to 11.1.0.6 [Release 8.1.7 to 11.1]
Information in this document applies to any platform.
***Checked for relevance on 30-Nov-2011***


GOAL

When executing an Operating System (OS) command called from a Java Stored  Procedure (JSP), upon completion of the Operating System command (successfully),  there is a defunct Operating System process left out at the Operating System level. How to get rid of those processes?

SOLUTION

There are different ways to get rid of defunct processes.

  1. The simplest way out of this situation is to do a shutdown on scheduled basis.
    The obvious workaround is to periodically shut down the server instance that's holding onto the defunct processes.

  2. You can also try adding destroy() after the exitValue() call.
    destroy() and exitValue() are Java methods. Only some OS will accept and work as documented when using destroy() after the exitValue() methods. 

  3. Since parameter job_queue_processes is dynamic, try to cycle the job queue processes :
    alter system set job_queue_processes = 0;
    alter system set job_queue_processes = 10;

  4. In some cases, where the defunct processes appeared every time the SWAP was full.  But that appeared to have cleared when more Memory/Swap are added.  Although it was not successfully for all the operating systems. 
It is a common practice to defunct process by using kill.  That does not work because the process is already gone.  But there are Platform specific ways to reap the process.  For example, in Solaris OS, use "preap".

 

 

REFERENCES

BUG:1370977  - EXECUTING JAVA PROCEDURES GIVES  PROCESSES EVERY TIME IT IS EXECUTED
BUG:2520149  - RUNNING JAVA STORED PROCEDURE WITH OS COMMAND LEAVES DEFUNCT PROCESSES

你可能感兴趣的:(Killing Defunct Operating System Process (Doc ID 298048.1))