Skip to main content

Intereseting --- 249 days bug for Oracle on Linux servers

--contributed by Manjunath Ulthi, Senior DBA at Infosys Technologies limited

1 Introduction


Problem: OCI client spins when machine uptime >= 249 days in Linux machines. Once the uptime crosses 249 days the database client hangs and leads to high CPU utilization and server hung state. The user will not be able to connect to the databases This is oracle known bug 4612267.


Solution: This can be handled by applying the patch 4612267.


The patch has been applied in the servers server126, server041 & server120 and tested. After the patch has been applied the client connections were normal after 249 days and all the operations of databases/applications were normal and didn’t encounter any problems.

For further information refer the Metalink Notes

Note: 338461.1: SQL*Plus With Instant Client 10.2.0.1 Hangs, When System Uptime Is More Than 248 Days

Note:4612267.8 : Bug 4612267 - OCI client spins when machine uptime >= 249 days

2 General Instructions

Procedure to apply the patch

1. Download the patch from oracle metalink.

The downloaded patch (p4612267_10201_LINUX.zip) is available at server120 at location /app/oracle

2. Copy the Zip file at $ORACLE_HOME
3. Unzip the file .It will create a directory with patch number 4612267
4. Test the opatch utility and check the patches which have been applied to the database server.

bash-2.05b$ $ORACLE_HOME/OPatch/opatch lsinventory

bash-2.05b$ $ORACLE_HOME/OPatch/opatch lsinventory

Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0

Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /app/oracle/product/10.2.0

Central Inventory : /app/oracle/oraInventory

from : /app/oracle/product/10.2.0/oraInst.loc

OPatch version : 10.2.0.1.0

OUI version : 10.2.0.1.0

OUI location : /app/oracle/product/10.2.0/oui

Log file location : /app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-2007_Oct_13_10-11-13-EDT_Sat.log

Lsinventory Output file location : /app/oracle/product/10.2.0/cfgtoollogs/opatch/lsinv/lsinventory-2007_Oct_13_10-11-13-EDT_Sat.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1):

Oracle Database 10g 10.2.0.1.0

There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch 5865568 : applied on Thu Mar 01 21:50:15 EST 2007

Created on 15 Feb 2007, 20:01:44 hrs PST8PDT

Bugs fixed:

5865568

Patch 4516865 : applied on Wed Sep 20 04:47:39 EDT 2006

Created on 14 Feb 2006, 00:22:00 hrs US/Pacific

Bugs fixed:

5039292, 4747264, 4908101, 4516865

--------------------------------------------------------------------------------

OPatch succeeded.

5. Take the backup of lib directory in $ORACLE_HOME

bash-2.05b$ pwd

/app/oracle/product/10.2.0/lib

bash-2.05b$ cp -R * ../bkp_lib/

6. Go to $ORACLE_HOME/4612267
7. Bring down the databases, listeners and DB consoles. Ensure that you have good backup pieces before proceeding
8. Apply the patch

$ORACLE_HOME/4612267>>>$ $ORACLE_HOME/OPatch/opatch apply

Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0

Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /app/oracle/product/10.2.0

Central Inventory : /app/oracle/oraInventory

from : /app/oracle/product/10.2.0/oraInst.loc

OPatch version : 10.2.0.1.0

OUI version : 10.2.0.1.0

OUI location : /app/oracle/product/10.2.0/oui

Log file location : /app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-2007_Oct_13_10-22-20-EDT_Sat.log

ApplySession applying interim patch '4612267' to OH '/app/oracle/product/10.2.0'

Invoking fuser to check for active processes.

Invoking fuser on "/app/oracle/product/10.2.0/bin/oracle"

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/app/oracle/product/10.2.0')

Is the local system ready for patching?

Do you want to proceed? [y|n]

y

User Responded with: Y

Backing up files and inventory (not for auto-rollback) for the Oracle Home

Backing up files affected by the patch '4612267' for restore. This might take a while...

Backing up files affected by the patch '4612267' for rollback. This might take a while...

Patching component oracle.oracore.rsf, 10.2.0.1.0...

Updating archive file "/app/oracle/product/10.2.0/lib/libcore10.a" with "lib/libcore10.a/sltrg.o"

Patching component oracle.rdbms, 10.2.0.1.0...

Updating archive file "/app/oracle/product/10.2.0/lib/libcore10.a" with "lib/libcore10.a/sltrg.o"

Running make for target client_sharedlib

Running make for target client_sharedlib

Running make for target ioracle

ApplySession adding interim patch '4612267' to inventory

The local system has been patched and can be restarted.

OPatch succeeded.

9. Verify the patch in inventory……. Check the patch number 4612267 in the results

bash-2.05b$ $ORACLE_HOME/OPatch/opatch lsinventory

Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0

Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /app/oracle/product/10.2.0

Central Inventory : /app/oracle/oraInventory

from : /app/oracle/product/10.2.0/oraInst.loc

OPatch version : 10.2.0.1.0

OUI version : 10.2.0.1.0

OUI location : /app/oracle/product/10.2.0/oui

Log file location : /app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-2007_Oct_13_10-24-32-EDT_Sat.log

Interim patches (3) :

Patch 4612267 : applied on Sat Oct 13 10:23:06 EDT 2007

Created on 5 Oct 2005, 13:48:00 hrs US/Pacific

Bugs fixed:

4612267

Patch 5865568 : applied on Thu Mar 01 21:50:15 EST 2007

Created on 15 Feb 2007, 20:01:44 hrs PST8PDT

Bugs fixed:

5865568

Patch 4516865 : applied on Wed Sep 20 04:47:39 EDT 2006

Created on 14 Feb 2006, 00:22:00 hrs US/Pacific

Bugs fixed:

5039292, 4747264, 4908101, 4516865

--------------------------------------------------------------------------------

OPatch succeeded.

10. Start the databases, listeners & DB Consoles and verify the databases & applications ::::

Comments

  1. I am very new to oracle patch but I have to apply this patch for company.So I have a question, can I apply this patch without configure ORACLE_HOME ? I mean is that I can apply /opt/oracle/OPatch/opatch apply. Is that command can apply?
    Thanks alot

    ReplyDelete
  2. Hi,
    "opatch" utility won't work without setting ORACLE_HOME & PATH variables to appropriate values. So, please set ORACLE_HOME & PATH before you use it. See example below :
    -------------------------------
    $ opatch lsinventory | tail
    Patch 7155248 : applied on Mon Dec 08 17:07:43 GMT+00:00 2008
    Created on 3 Jul 2008, 02:10:38 hrs PST8PDT
    Bugs fixed:
    7155248

    $ unset ORACLE_HOME
    $ opatch lsinventory | tail
    Oracle Home is not set. OPatch cannot proceed!
    OPatch returns with error code = 1
    $
    -------------------------------
    "opatch" also expects jar, java, ar, cp, and make commands (platform specific) to be available in the current PATH. So, once you're ready to run opatch, try "which java", "which ar", etc. for each of the above & confirm that it shows a path to the respective executable.

    ReplyDelete
  3. Hi,
    thanks for your reply.
    I already set oracle home and can use opatch lsinventory but I still have question.
    Because I use the command for opatch lsinventory is not same as you. My RedHat Linux OS can't use bash-2.05b$ $ORACLE_HOME/OPatch/opatch lsinventory. So I used this command. First I typed cd $ORACLE_HOME/OPatch/ so I reach into the oracle home ,opatch folder and I used opatch lsinventory command.
    So for applying this opatch , what exact command I should type?
    First "cd $ORACLE_HOME/OPatch/4612267/" enter
    so reach in OPatch folder
    Second ">>$ $ORACLE_HOME/OPatch/opatch apply" according to your blogsite or
    which command do I need to use?
    Please kindly answer me.
    Thanks alot because I am in critical condition.

    ReplyDelete
  4. Hi Anonymous,
    I'm sorry ... the blog didn't allow me to post a reply for quite some time. Here you go :
    For applying your patch, go to your patch directory (where you've unzipped the patch contents), which looks like "$ORACLE_HOME/OPatch/4612267" in your case. Then, just type "opatch apply" (if it's in your PATH variable), otherwise type "$ORACLE_HOME/OPatch/opatch apply" as you said above. It should work then.

    ReplyDelete
  5. Learned a lot of new things from your post!Good creation ,thanks for good info Oracle SOA OnlineCourse

    ReplyDelete
  6. The 249-day bug in Oracle is a fascinating find! Your detailed explanation sheds light on this unique phenomenon. The Complete Guide Understanding and addressing such intricacies is crucial for robust observation.

    ReplyDelete

Post a Comment

Please add your comment here

Popular posts from this blog

Permitting a user on UNIX / Linux to use sqlplus

We encountered an interesting scenario worth mentioning. Scenario: Oracle is installed on a Linux server newly & another ftp user wants to just use sqlplus also. Just setting the ORACLE_HOME, LD_LIBRARY_PATH, ORACLE_SID, PATH in the user's profile did not let him run the "sqlplus" command at all. The error shown was : $ sqlplus ld.so.1: sqlplus: fatal: /app/oracle/product/10.2/lib/libsqlplus.so: Permission denied Killed The files under "lib" directory under home didn't have permission for anybody other than "oracle" user. -rwxr-x--- 1 oracle oinstall 1320016 Jun 28 2005 /app/oracle/product/10.2/lib/libsqlplus.so When we permit the other users (other than oracle) to read/exe

HWM (high watermark) of a tablespace ?

How many times have you thought of calculating HWM (high watermark) of a tablespace as a DBA ? Have you ever found out that a tablespace is overallocated in a database, as compared to the data being used in it ? In such a case, you'd want to reduce the wasted space & resize the tablespace to a smaller size, although greater than the current usage. HWM is at the maximum blocks ever occupied by a SEGMENT (unless we perform a truncate on it). Segments span over datafiles however remain within a tablespace. All segments are physically allocated by way of extents, which are contiguous blocks of data. Now, when we talk about contiguous blocks, 2 datafiles (even from same tablespace) are highly unlikely to have contiguguos data blocks. Hence, theoretically, it's possible to calculate high watermark within a datafile, not a tablespace directly, as the latter is only a logical unit. Although, we can resize a tablespace, however the resize value needs to be based on exact calculati

How to upgrade Oracle 9.2.0.1 to 9.2.0.5 or 9.2.0.6 (9i versions)

Applying Oracle upgrade to version 9.2.0.5 (patchset 3501955) or 9.2.0.6 (patchset 3948480) Applying Oracle 9i Patch (This can be used for the Oracle client and server both) 1. Log in to the database server machine as the oracle user (administrator role in case of windows) on Unix. 2. Make sure that your environment contains the correct values for the ORACLE_HOME and ORACLE_SID variables. 3. Stop the listener process (in case of Oracle server upgrade). As the oracle user: lsnrctl stop 4. Download the patchset Extract the 9.2.0.5 patchset (3501955) or 9.2.0.6 patch set (3948480) archive into a temporary directory. 5. Change to the directory that contains the 9.2.0.5 or 9.2.0.6 patch archive and execute the following: Unzip the patch archive, viz. p3948480_9206_***.zip (this example is for Linux. Windows & other Unix patch names would be different.) 6. Install the Oracle Universal Installer (setup.exe in case of Windows patch)