Showing results for 
Search instead for 
Did you mean: 

Memory Leak in Oracle

Sharad D. Pawar
Occasional Contributor

Memory Leak in Oracle


I am running oracle 9ir2 on Hp-ux 11i and I am facing the memory leak problem. Application is very simple of testing transactions.
I had checked memory leak with the help of Purify tool. I am sending log file of memory leak ,Application was running for only 1 Hr. Memory leak observed 30 MB. Most of memory is leaked in oracle library nioqrc and ttcdrv.
I don't know what is nioqrc and ttcdrv library used for ?

Machine configuration is as follows :
RAM 512 MB. swapspace 3 GB.

SGA : total System Global Area 219638280 bytes
Fixed Size 735752 bytes
Variable Size 184549376 bytes
Database Buffers 33554432 bytes
Redo Buffers 798720 bytes

Kernel parameters as follows :
acctresume 4
acctsuspend 2
allocate_fs_swapmap 0
bufpages 9352
create_fastlinks 0
dbc_max_pct 50
dbc_min_pct 5
default_disk_ir 0
dskless_node 0
eisa_io_estimate 768
eqmemsize 17
file_pad 10
fs_async 0
hpux_aes_override 0
maxdsiz 262144
maxdsiz_64bit 524288
maxfiles 2000
maxfiles_lim 1024
maxssiz 32768
maxssiz_64bit 262144
maxswapchunks 16384
maxtsiz 16384
maxtsiz_64bit 262144
maxuprc 75
maxvgs 10
msgmap 5119
nbuf 7140
ncallout 8992
ncdnode 150
ndilbuffers 30
netmemmax 0
nfile 172042
nflocks 8192
ninode 43008
no_lvm_disks 0
nproc 5120
npty 60
nstrpty 60
nswapdev 10
nswapfs 10
public_shlibs 1
remote_nfs_swap 0
rtsched_numpri 32
sema 0
semmap 10241
shmem 0
shmmni 512
streampipes 0
swapmem_on 1
swchunk 2048
timeslice 10
unlockable_mem 20680

I had checked memory leak ,memory leak using purify tools is seems to in nioqrc and ttcdrv.

MLK: 4935220 bytes leaked in 18415 blocks
* This memory was allocated from:
malloc [rtlib.o]
sltsmxi []
snsbitts_ts []
nsdo []
nioqrc []
ttcdrv []
* Block of 268 bytes (18415 times); last block at 0x42eac228

for the reference I am sending the log file of purify memory leak.
is this problem with network configuration or OS network issue.
Thanks in advance for help.

- Sharad D. Pawar.
Honored Contributor

Re: Memory Leak in Oracle

To track down a memory leak, you need to know how the memory blocks are used and where they are stored, and you need to understand where they are lost. Run the program again and look for a section of code that loses the last pointer to a block of memory. The last pointer to a block of memory can be lost if:
.The pointer is reassigned to a new value
.The pointer goes out of scope
.A memory block containing the pointer is freed or becomes a leak itself

To understand this memory leak message, you need to review how to store and use hashEntry(in purify o/p) type memory blocks. It is possible that a pointer to a hashEntry is being lost when a new one is inserted in putHash, or when the old one in remHash is removed. It is also possible that they are being lost when they are removed in delHashTable.

Start your debugger and set breakpoints in the program after calls to PutHash, RemHash, and DelHashTable.

# dbx x.pure
(dbx) file y.c
(dbx) run

Each time the program stops call 'purify_new_leaks'.

(dbx) print purify_new_leaks()

Continue this process until u get
next = (nil)
in (dbx) print purify_new_leaks.

Recompile the program and run it again.

This time Purify should indicate that there are no leaks

never give up
R. Allan Hicks
Trusted Contributor

Re: Memory Leak in Oracle

I had a memory leak in also. It manifested itself in dbsnmp growing. Oracle Tech Support gave me a patch for the network software that appears to straighten things out. Go to metalink ( and try patch ID:1766383 for HP-UX.

Good Luck
"Only he who attempts the absurd is capable of achieving the impossible
Carlos Fernandez Riera
Honored Contributor

Re: Memory Leak in Oracle

I am installing and testing now Oracle 9.2.0

I will be aware of these memory leaks. Thanks for the info.
Sharad D. Pawar
Occasional Contributor

Re: Memory Leak in Oracle

Thanks Allan ,
I had downloaded patch but while appliing the same I am encountering following errror. If any info on the same will be great .

le/lib32/naect.o /dbms/oracle/lib32/naedhs.o /dbms/oracle/rdbms/lib32/defopt.o
-lpls9 -lsql9 -lxsd9
/usr/ccs/bin/ld: Can't find library: "fcgi"
*** Error exit code 1

*** Error exit code 1


- Sharad
Steve Steel
Honored Contributor

Re: Memory Leak in Oracle


Steve Steel

Reduce your support time!

Oracle Support Services' premier web support, MetaLink,
can save what you value most -- TIME!

OracleMetaLink is:

Available Online, 24x7 -- Leverage the internet's speed and accessibility for technical support that accommodates your schedule and needs.

Faster and More Efficient -- Logging Technical Assistance Requests (TARs) online allows you to:

Use TAR templates, describe a problem in your own words, cut and paste error messages
ELIMINATE hold times and voicemail tag
Take advantage of automatic skill routing
Use TAR profiles - templates of your product, platform, version numbers, CSI and contact information, eliminating the need to repeat standard profile information
Monitor or update your open TARs online
Proactive -- Take preventive action by downloading and applying appropriate software fixes, workarounds, or plan future upgrades.

Track the progress of bugs associated with your licensed products
A Global Knowledge Repository -- MetaLink contains Oracle Support Services' technical best practices and expertise for enhanced business productivity and minimized business disruption.

Login or Register now (only for customers with an active support contract on their Oracle licenses)!

OracleMetaLink Features:

No Additional Cost - Premier web support service available at no cost to Oracle customers with active support service contracts

Available Online, 24x7 - Always available twenty-four hours a day, seven days a week

Technical Libraries - Access information that will aid you in using Oracle products, such as hot topics, product reference, installation assistance materials, white papers, problem/solution articles, and more

Knowledge Base Search - Full-text queries against all content in MetaLink's repositories, including technical forum postings and the bug database

Forums - Post questions for feedback from technical analysts and other Oracle customers

Product Lifecycle - Product availability, product alerts, certifications, and de-support information online

Bug Database Search - Query published bugs from the Oracle Bug Database

File Access - Download patches and patch sets directly from OracleMetaLink

Enter TARs Online - Submit, update, review, and close your TARs online (not available in some countries)

Skills-Based Routing - TARs submitted electronically are automatically matched to the right technical resource within Oracle Support Services (not available in some countries)

TAR Access and Reporting - Track issues by generating and viewing TAR reports

My Headlines - Customize your MetaLink account to receive only the information you want

User Profile - Customize your personal Oracle Support Services account information

User Administration - Manage access of your company's MetaLink users

Context-Sensitive Help - Learn the features of MetaLink and see "how to" instructions

Feedback - Enter feedback about MetaLink

How can you get access to our current MetaLink web site? Customers with an active support contract for their Oracle licenses can register for access today or login if already registered. MetaLink is a valuable tool that will help you get the most out of your Oracle products.

If you want truly to understand something, try to change it. (Kurt Lewin)
Sharad D. Pawar
Occasional Contributor

Re: Memory Leak in Oracle

Hi Allan,
I had applied Patch but still the memory is leaking. Is there any specific setting required after patch installations.
if anybody know the any answer on hints let me know.
Thanks in advance.

- Sharad
Honored Contributor

Re: Memory Leak in Oracle

Hi Allan,
I had applied Patch but still the memory is leaking. Is there any specific setting required after patch installations.
if anybody know the any answer on hints let me know.
Thanks in advance.

Hi Mr. Sharad,

Normally, you don't need any "specific settings" for patch installation. Anyway, if there are any, you should get it in the documentation coming with the patch.

There are some ways to stop these errors from being displayed or logged. But it would be advisable that you log an iTAR at the metalin site given above.

Hope this helps!
Best regards
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)