Memory leak in my driver (lengthy)???

Someone please give me a hint on what happens here:
Test Program
===========
#define MEMSZ (256*1024)
main()
int devdes, count;
char devname[31];
unsigned char * buffer;
strcpy(devname,"/dev/mydriver\0") ;
devdes = open(devname,O_RDWR) ;
buffer = (unsigned char *)malloc(MEMSZ);
while(1){
i++;
count = read(devdes, buffer, MEMSZ);
if(count < 0)
printf("i = %d ERROR - errno=%d\n",i, errno);
break;
My Driver
=======
my_read(dev_t dev, struct uio uiop, cred_t credp) {
return (physio(my_strategy, (struct buf *)NULL, dev, B_READ, my_minphys,
uiop));
my_strategy(struct buf *bp)
//pdx is my soft state
pdx->buf_p = bp;
Allocate dma handle for user data buffer
if(ddi_dma_alloc_handle(pdx->dip, &pdx->dma_attr, DDI_DMA_DONTWAIT,
(caddr_t)0, &pdx->dma_handle) != DDI_SUCCESS) {
cmn_err(CE_WARN,"my_strategy: instance %d: ddi_dma_alloc_handle failure!",
instance) ;
bp->b_error |= EIO;
bp->b_flags |= B_ERROR;
biodone(bp);
return (0);
if (ddi_dma_buf_bind_handle(pdx->dma_handle, bp, DDI_DMA_READ|
DDI_DMA_CONSISTENT, DDI_DMA_DONTWAIT,
(caddr_t)0, &dma_cookie, &cookie_count) != DDI_DMA_MAPPED) {
cmn_err(CE_WARN,"my_strategy: instance %d: ddi_dma_buf_bind_handle
failure!", instance);
ddi_dma_free_handle(&pdx->dma_handle);
bp->b_error |= EIO;
bp->b_flags |= B_ERROR;
biodone(bp);
return (0);
* set up descriptor lists on the board based on each cookie
pdx->cookie_count = cookie_count;
ddi_put32(pdx->my_regs_handle,(uint32_t *)(pdx->my_base+HL_COMMAND),
CMD_SGREAD);
temp = HL_ARGS;
do {
ddi_put32(pdx->my_regs_handle,(uint32_t *)(pdx->my_base+temp),
dma_cookie.dmac_size);
temp += 4;
ddi_put32(pdx->my_regs_handle,(uint32_t *)(pdx->my_base+temp),
dma_cookie.dmac_address);
temp += 4;
cookie_count--;
if (cookie_count != 0)
ddi_dma_nextcookie(pdx->dma_handle, &dma_cookie);
else break;
} while (1);
ddi_put32(pdx->my_regs_handle,(uint32_t *)(pdx->my_base+temp), 0);
temp += 4;
ddi_put32(pdx->my_regs_handle,(uint32_t *)(pdx->my_base+temp), 0);
DELIVER_COMMAND(pdx, 1); //start DMA
return (0);
#define DMA_MINPHYS 0xffffffff
my_minphys(struct buf *bp)
minphys(bp);
bp->b_bcount = (min(bp->b_bcount, DMA_MINPHYS));
my_intr(...)
mutex_enter(&pdx->mutex);
ddi_dma_unbind_handle(pdx->dma_handle);
ddi_dma_free_handle(&pdx->dma_handle);
biodone(pdx->buf_p);
mutex_exit(&pdx->mutex);
return(DDI_INTR_CLAIMED);
NOTE:
The following is dma_attr:
pdx->dma_attr.dma_attr_version = DMA_ATTR_V0;
pdx->dma_attr.dma_attr_addr_lo = 0x0;
pdx->dma_attr.dma_attr_addr_hi = 0xFFFFFFFF;
pdx->dma_attr.dma_attr_count_max = 0xFFFFFFFF;
pdx->dma_attr.dma_attr_align = 0x1;
pdx->dma_attr.dma_attr_burstsizes = 0x17;
pdx->dma_attr.dma_attr_minxfer = 0x4;
pdx->dma_attr.dma_attr_maxxfer = 0xFFFFFFFF;
pdx->dma_attr.dma_attr_seg = 0xFFFFFFFF;
pdx->dma_attr.dma_attr_sgllen = 1;
pdx->dma_attr.dma_attr_granular = 1;
pdx->dma_attr.dma_attr_flags = 0x0;
What Happens
============
My test program does nothing but read 256k data out of my PCI board and
throw them to the ground. It is a stress test. It stops and shows
"i = 8192 ERROR = 22", which I figure means 8192 x 256K = 2G. I check my
driver code, and I don't allocate any memory and I only use whatever the
user program allocates. I unbindle_handle and free_handle for each
interrupt.(I only have one interrupt from my board; that is DMA done
interrupt). I hope I have given as much detail as possible. Is there
anything wrong in my driver that causes the possible memory leak?
Thanks

Hi tyh,
There is a lovely feature in mdb that allows you to track down memory usage in kernel modules (including drivers of course), so the hint is rather straight-forward: get the mdb (comes with Solaris 8), read the AnswerBook (available at docs.sun.com) and you are 75% done :).
Good luck ;)
--I.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Memory leak in ODBC Driver version 8.1.7.8?

    We have a web application connected to an 8.1.7 database on a MS Windows 2000 SP 2 server.
    We recently upgraded ODBC driver from 8.1.7.7 to 8.1.7.8 and found that we ran out of virtual memory.
    On further investigations, a simple refresh of our summary web page (going to the database to select a small recordset - even when there are only 2 records with 6 small VARCHAR2 fields) causes the virtual memory usage to increase by approximately 1Mb each refresh.
    The same refresh using driver 8.1.7.7 occasionally increases the VM usage by 4Kb!
    Is there a memory leak in ODBC driver version 8.1.7.8?

    Hello Thomas,
    thanks for your tips, but they did not help. Activating Connection Polling did not change anything. And opening another connection did not help, either. I did it the following way:
    Sub memtest2()
    Dim conODBC As New ADODB.Connection
    conODBC.ConnectionString = "Data Source='xxxx';User ID='xxx';Password='xxx'"
    conODBC.Open
    Dim Rs1 As Recordset, Rs2 As Recordset, DB1 As Database
    Set DB1 = CurrentDb
    Set Rs1 = DB1.OpenRecordset("select id from artikel")
    Do While Not Rs1.EOF
        Set Rs2 = DB1.OpenRecordset("select * from artikel where id=" & Rs1("id"))
        'do something
        Rs2.Close
        Set Rs2 = Nothing
        Rs1.MoveNext
    Loop
    Rs1.Close
    Set Rs1 = Nothing
    DB1.Close
    Set DB1 = Nothing
    conODBC.Close
    End Sub
    Perhaps one of you has another tip how this can be done.
    @Lukasz:
    using a seperate ADODB.Connection works fine, but that does not solve the problem itself. At first I would have to rewrite much code and the second much bigger thing is that the memory leak occurs even when working with bound forms in MS Access. For example: I have one large form with many subforms on it. If i go from record to record on this form the memory usage is increasing dramatically fast and there is no way to influence what kind of connection MS Access is using for bound forms.
    Regards
    Thorstem

  • Memory leak in ODBC driver

    I have a serious problem with the maxdb ODBC Driver. I tested Version 7.06.03.00 and some older Versions.
    Here is a little example for MS Access to show the problem. The table "artikel" is a linked maxdb table. The example code opens and closes a recordset in a loop. You can see the memory usage in the task manger going up and up. If you have many recordsets in the table, the system is crashing when it is going out of memory.
    If i change the linked table to for example a mysql-table the memory usage is stable. So I think there must be a memory leak in the maxdb odbc driver.
    Example code:
    Sub memtest()
    Dim RS1 As Recordset, RS2 As Recordset, DB1 As Database
    Set DB1 = CurrentDb
    Set RS1 = DB1.OpenRecordset("select id from artikel")
    Do While Not RS1.EOF
        Set RS2 = DB1.OpenRecordset("select * from artikel where id=" & RS1("id"))
        'do something
        RS2.Close
        Set RS2 = Nothing
        RS1.MoveNext
    Loop
    RS1.Close
    Set RS1 = Nothing
    DB1.Close
    Set DB1 = Nothing
    End Sub
    I hope you can follow me and find the leak.
    Thorsten

    Hello Thomas,
    thanks for your tips, but they did not help. Activating Connection Polling did not change anything. And opening another connection did not help, either. I did it the following way:
    Sub memtest2()
    Dim conODBC As New ADODB.Connection
    conODBC.ConnectionString = "Data Source='xxxx';User ID='xxx';Password='xxx'"
    conODBC.Open
    Dim Rs1 As Recordset, Rs2 As Recordset, DB1 As Database
    Set DB1 = CurrentDb
    Set Rs1 = DB1.OpenRecordset("select id from artikel")
    Do While Not Rs1.EOF
        Set Rs2 = DB1.OpenRecordset("select * from artikel where id=" & Rs1("id"))
        'do something
        Rs2.Close
        Set Rs2 = Nothing
        Rs1.MoveNext
    Loop
    Rs1.Close
    Set Rs1 = Nothing
    DB1.Close
    Set DB1 = Nothing
    conODBC.Close
    End Sub
    Perhaps one of you has another tip how this can be done.
    @Lukasz:
    using a seperate ADODB.Connection works fine, but that does not solve the problem itself. At first I would have to rewrite much code and the second much bigger thing is that the memory leak occurs even when working with bound forms in MS Access. For example: I have one large form with many subforms on it. If i go from record to record on this form the memory usage is increasing dramatically fast and there is no way to influence what kind of connection MS Access is using for bound forms.
    Regards
    Thorstem

  • Memory leak in weblogic 6.0 sp2 oracle 8.1.7 thin driver

    Hi,
         I have a simple client that opens a database connection, selects from
    a table containing five rows of data (with four columns in each row)
    and then closes all connections. On running this in a loop, I get the
    following error after some time:
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
    <OutOfMemoryError in
    Adapter
    java.lang.OutOfMemoryError
    <<no stack trace available>>
    >
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
    failed
    java.lang.OutOfMemoryError
    I am running with a heap size of 64 Mb. The java command that runs
    the client is:
    java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
    -Djava.naming.f
    actory.initial=weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=
    t3://garlic:7001 -verbose:gc Test
    The following is the client code that opens the db connection and does
    the select:
    import java.util.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    public class Test {
    private static final String strQuery = "SELECT * from tblPromotion";
    public static void main(String argv[])
    throws Exception
    String ctxFactory     = System.getProperty
    ("java.naming.factory.initial");
    String providerUrl     = System.getProperty
    ("java.naming.provider.url");
    Properties jndiEnv          = System.getProperties ();
    System.out.println ("ctxFactory : " + ctxFactory);
    System.out.println ("ProviderURL : " + providerUrl);
    Context ctx     = new InitialContext (jndiEnv);
    for (int i=0; i <1000000; i++)
    System.out.println("Running query for the "+i+" time");
    Connection con = null;
    Statement stmnt = null;
    ResultSet rs     = null;
    try
    DataSource ds     = (DataSource) ctx.lookup
    (System.getProperty("eaMDataStore", "jdbc/eaMarket"));
    con = ds.getConnection ();
    stmnt = con.createStatement();
    rs = stmnt.executeQuery(strQuery);
    while (rs.next ())
    //System.out.print(".");
    //System.out.println(".");
    ds = null;
    catch (java.sql.SQLException sqle)
    System.out.println("SQL Exception : "+sqle.getMessage());
    finally
    try {
    rs.close ();
    rs = null;
    //System.out.println("closed result set");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    stmnt.close ();
    stmnt = null;
    //System.out.println("closed statement");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    con.close();
    con = null;
    //System.out.println("closed connection");
    } catch (Exception e) {
    System.out.println("Exception closing connection");
    I am using the Oracle 8.1.7 thin driver. Please let me know if this
    memory leak is a known issue or if its something I am doing.
    thanks,
    rudy

    Repost in JDBC section ... very serious issue but it may be due to Oracle or
    to WL ... does it happen if you test inside WL itself?
    How many iterations does it take to blow? How long? Does changing to a
    different driver (maybe Cloudscape) have the same result?
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "R.C." <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple client that opens a database connection, selects from
    a table containing five rows of data (with four columns in each row)
    and then closes all connections. On running this in a loop, I get the
    following error after some time:
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
    <OutOfMemoryError in
    Adapter
    java.lang.OutOfMemoryError
    <<no stack trace available>>
    >
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
    failed
    java.lang.OutOfMemoryError
    I am running with a heap size of 64 Mb. The java command that runs
    the client is:
    java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
    -Djava.naming.f
    actory.initial=weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=
    t3://garlic:7001 -verbose:gc Test
    The following is the client code that opens the db connection and does
    the select:
    import java.util.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    public class Test {
    private static final String strQuery = "SELECT * from tblPromotion";
    public static void main(String argv[])
    throws Exception
    String ctxFactory = System.getProperty
    ("java.naming.factory.initial");
    String providerUrl = System.getProperty
    ("java.naming.provider.url");
    Properties jndiEnv = System.getProperties ();
    System.out.println ("ctxFactory : " + ctxFactory);
    System.out.println ("ProviderURL : " + providerUrl);
    Context ctx = new InitialContext (jndiEnv);
    for (int i=0; i <1000000; i++)
    System.out.println("Running query for the "+i+" time");
    Connection con = null;
    Statement stmnt = null;
    ResultSet rs = null;
    try
    DataSource ds = (DataSource) ctx.lookup
    (System.getProperty("eaMDataStore", "jdbc/eaMarket"));
    con = ds.getConnection ();
    stmnt = con.createStatement();
    rs = stmnt.executeQuery(strQuery);
    while (rs.next ())
    //System.out.print(".");
    //System.out.println(".");
    ds = null;
    catch (java.sql.SQLException sqle)
    System.out.println("SQL Exception : "+sqle.getMessage());
    finally
    try {
    rs.close ();
    rs = null;
    //System.out.println("closed result set");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    stmnt.close ();
    stmnt = null;
    //System.out.println("closed statement");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    con.close();
    con = null;
    //System.out.println("closed connection");
    } catch (Exception e) {
    System.out.println("Exception closing connection");
    I am using the Oracle 8.1.7 thin driver. Please let me know if this
    memory leak is a known issue or if its something I am doing.
    thanks,
    rudy

  • Memory leak using Oracle thin driver on wls6.1...

    Hi, I've been attempting to find a memory leak in an application that
    runs on WLS 6.1 SP2, on Solaris 8 and accessing an Oracle 9i db. We
    are using the Type 4 (Thin) driver and JProbe reports that hundreds of
    oracle.jdbc.* objects are left on the heap after my test case
    completes. Specifically oracle.jdbc.ttc7.TTCItem is the most common
    loiterer on the heap. I have verified that after each database access
    the resources are release correctly (i.e. ResultSet, Connection,
    PreparedStatement, etc.)
    Has anyone encountered similar problems? or does anyone know how to
    fix this?
    Thanks,
    Tim Watson

    Hi Tim!
    We have seen problem using oracle 817 client that has been resolved using
    901 client for type2(oci) driver, But i am not aware of thin driver
    problem. You should check with oracle if they have find any customer's
    with this problem.
    Thanks,
    Mitesh
    Tim Watson wrote:
    Hi, I've been attempting to find a memory leak in an application that
    runs on WLS 6.1 SP2, on Solaris 8 and accessing an Oracle 9i db. We
    are using the Type 4 (Thin) driver and JProbe reports that hundreds of
    oracle.jdbc.* objects are left on the heap after my test case
    completes. Specifically oracle.jdbc.ttc7.TTCItem is the most common
    loiterer on the heap. I have verified that after each database access
    the resources are release correctly (i.e. ResultSet, Connection,
    PreparedStatement, etc.)
    Has anyone encountered similar problems? or does anyone know how to
    fix this?
    Thanks,
    Tim Watson

  • Memory Leak with Oracle ODBC Driver for Long Raw columns

    Oracle version : 8.1.7
    Platform : Win2K
    Oracle ODBC Driver version : 8.0.1.7.5.0.0
    Hi,
    I've got an Oracle database upgraded from
    V8.0.5 to V8.1.7 which has a table having one long raw +
    normal columns. I was able to observe distinct memory
    leaks (approx 80K) when using ODBC interface calls (thro C++ code) that referenced a combination of normal & long raw columns in a select statement. However, this leak was not observed when only normal columns were present in the
    select statement. Is there any known restriction for using
    long raw columns with other columns? Or do long raw columns have a known memory leak problem thro ODBC?
    Thanks!
    Regards
    Sanchayan

    Did you ever get an answer on this issue?
    Thanks in advance

  • Oracle JDBC Thin Driver Memory leak in scrollable result set

    Hi,
    I am using oracle 8.1.7 with oracle thin jdbc driver (classes12.zip) with jre 1.2.2. When I try to use the scrollable resultset and fetch records with the default fetch size, I run into memory leaks. When the records fetched are large(10000 records) over a period of access I get "outofmemory" error because of the leak. There is no use increasing the heap size as the leak is anyhow there.
    I tried using optimizeit and found there is a huge amout of memory leak for each execution of scrollable resultsets and this memory leak is propotional to the no of records fetched. This memory leak is not released even when i set the resultset,statement objects to null. Also when i use methods like scrollabelresultset.last() this memory leak increases.
    So is this a problem with the driver or i am doing some wrong.
    If some of you can help me with a solution to solve this it would be of help. If needed i can provide some statistics of these memory leaks using optimize it and share the code.
    Thanks
    Rajesh

    This thread is ancient and the original was about the 8.1.7 drivers. Please start a new thread. Be sure to include driver and database versions, stack traces, sample code and why you think there is a memory leak.
    Douglas

  • Microsoft Jdbc driver for SQL Server memory leak

    I'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
    Appreciate your help

    I'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about memory leak issue in Microsoft Jdbc driver for SQL Server?
    Appreciate your help

  • JDBC memory leak in 11.2.0.2.0 driver ?

    Hi,
    my customer on WLS 9.2.1 have just upgraded to new database and to a new JDBC Oracle 11.2.0.2.0 driver and it seems there is a memory leak. Based on heap dump it seem that leek i near oracle.jdbc.xa.OracleXAResource$XidListEntry. Admins are missing about 200MB on each server after 3 days.
    Class Name | Objects | Shallow Heap | Retained Heap
    oracle.jdbc.xa.OracleXAResource$XidListEntry| 2,378,575 | 57,085,800 | 171,257,016
    Class Name | Objects | Shallow Heap | Retained Heap
    weblogic.transaction.internal.XidImpl| 2,378,605 | 57,086,520 | 114,172,880
    2,378,605 objects are really a lot :) and it about 114 MB of weblogic.transaction.internal.XidImpl objects
    I found patch 8423655 but it is for older driver version. Does anybody have a similar experience? Any solution?
    Thanks
    Patrik

    After a discussion with support we have found patch for the problem:
         Document Titleoracle.jdbc.xa.OracleXAResource$XidListEntry Objects Leaking in JDBC Driver for WebLogic Server (WLS) (Doc ID 872258.1)
    You were right the problem was on Weblogic site and also on driver side. In last JDBC driver it is already fixed so we have to upgrade just WLS part.
    Thanks
    Patrik

  • Memory Leak when I get the SP return refcursor by oracle ODBC driver:

    Oracle server:&#65320;&#65328;&#65293;&#65333;&#65358;&#65353;&#65368;
    Oracle Version: 9.2.0.6.0
    Application Server: windows2003
    Develop tool &#65306; VC++;
    Question:
    when I get the return refcursor by OLEDB.Oracle, there is not any memory leak and work well. But when I change the driver to ODBC “Oralce in OraHome92"
    there will be an 56k memory leak.
    And in the other hand if I call an store precedure without return ref. Both driver /way can work well.
    Can you give me the advice? thanks a lot.
    Code such as:
    _ConnectionPtr m_AdoConnection;
    _CommandPtr pcmd = NULL;
    _RecordsetPtr sp_rs = NULL;
    _bstr_t bstrConstruct = _bstr_t("DSN=test;Uid=test;Pwd=test;PLSQLRSet=1");
    HRESULT hr = CoCreateInstance(__uuidof(Connection),NULL,CLSCTX_INPROC_SERVER,__uuidof(_ConnectionPtr),(LPVOID *)&m_AdoConnection);
    if (FAILED (hr) ) throw hr ;
    m_AdoConnection->PutCursorLocation(adUseClient) ;
    m_AdoConnection->IsolationLevel = adXactSerializable;
    m_AdoConnection->Mode = adModeShareExclusive;
    bstr_t bstrEmpty(L"") ;
    m_AdoConnection->Open (bstrConstruct, bstrEmpty, bstrEmpty, -1) ;
    SAFE_CALL(m_spObjectContext->CreateInstance(__uuidof(Command),__uuidof(_CommandPtr),(LPVOID *)&pcmd));
    if(pcmd == NULL)
    throw CAtlExceptionEx(E_POINTER,"pcmd is NULL");
    pcmd->CommandText = _bstr_t(L"wec_pkg_spl.wec_proc_spl_check");
    pcmd->CommandType = adCmdStoredProc;
    _bstr_t id = _bstr_t("65650000");     
    pcmd->Parameters->Append(pcmd->CreateParameter(_bstr_t(L"id"),DataTypeEnum(adVarChar),adParamInput,2000,_variant_t(id)));          
    pcmd->Parameters->Append(pcmd->CreateParameter(_bstr_t(L"errcode"),DataTypeEnum(adNumeric),adParamOutput,4));
    pcmd->Parameters->Append(pcmd->CreateParameter(_bstr_t(L"errdescription"),DataTypeEnum(adVarChar),adParamOutput,2000));
    pcmd->ActiveConnection = sp_con.m_AdoConnection;
    sp_rs = pcmd->Execute(NULL,NULL,adCmdStoredProc);
    pcmd->Release;          
    sp_rs->Close();     
    if (m_AdoConnection->State == adStateOpen)
    m_AdoConnection->Close();
    wec_pkg_spl.wec_proc_spl_check arguments:
    id          varchar2     in
    flowpaths     ref cursor     out
    errcode          number          out
    errdescription     varchar2     out
    Message was edited by:
    [email protected]

    I'm using the oracle ODBC driver 8.05.10 with MFC and client version 8.0.5. In my experience you can't prevent memory leaks with that or earlier versions of the ODBC driver. Client patchkits or service packs for NT or the Visual Studio doesn't solve the problem.
    The following code will result in a memory leak with the oracle driver. With every expiration of the timer the leak will grow.
    void CTestOdbcOracleDriverDlg::OnTimer(UINT nIDEvent)
    TCHAR errString[255];
    //open the database with class CDatabase
    //use of CRecordset
    TRY {
    //my table name is AL_ALARME_LOG
    pMyRecordset->Open(CRecordset::dynaset,"SELECT * FROM AL_ALARME_LOG",CRecordset::none);
    //do something with the data
    Sleep(0);
    pMyRecordset->Close();
    CATCH_ALL(error) {
    error->GetErrorMessage(errString,255);
    DELETE_EXCEPTION(error);
    END_CATCH_ALL
    CDialog::OnTimer(nIDEvent);
    The same code with the Microsoft ODBC driver
    doesn't cause memory leaks.
    Andreas ([email protected])

  • Memory leak when using database connectivity toolset and ODBC driver for MySQL

    The "DB Tools Close Connection VI" does not free all the memory used when "DB Tools Open Connection VI" connects to "MySQL ODBC Driver 3.51".
    I have made a small program that only opens and close the connection that I run continously and it's slowly eating all my memory. No error is given from any of the VI's. (I'm using the "Simple Error Handler VI" to check for errors.)
    I've also tried different options in the DSN configuration without any results.
    Attachments:
    TestProgram.vi ‏16 KB
    DSNconfig1.jpg ‏36 KB
    DSNconfig2.jpg ‏49 KB

    Also,
    I've duplicated the OPs example: a simple VI that opens and closes a connection. I can say this definately causes a memory leak.
    Watching the memory:
    10:17AM - 19308K
    10:19AM - 19432K
    10:22AM - 19764K
    10:58AM - 22124K
    Regards,
    Ken
    Attachments:
    OpenCloseConnection.vi ‏13 KB

  • Memory Leak when TOMCAT connects to Oracle 10g RAC using JDBC Thin driver.

    We had experienced Memory leak when a Oracle 10g (10.2.0.3) RAC node was evicted. TOMCAT app server is connecting to the Oracle 10g RAC database instances using JDBC 10.2.0.3 thin driver.
    Anyone had similar experience?
    Any ideas? Any bugs reported/fixed?
    Thanks,
    Raj

    If you're doing XA, we absolutely do not support
    driver-level load-balancing OR failover. Use neither.
    For non-XA, you can use driver-level failover. For
    non-XA, you could set load-balancing, but it won't
    help because we get connections from the driver,
    and keep them indefinitely, so the driver never gets
    the chance to affect which connections the pool
    uses after that.

  • T61 with memory leak on XP for driver battc.sys

    Hi
    I have an issue with XP where the battc.sys module that is part of Windows XP and responsible for the kernel side of monitoring the battery status. This module continually leaks memory until I have no more kernel paged resources left and programs start to fail on my laptop.
    I raised a support case for this with Microsoft and after some investigation and upgrading to the latest T61 power drivers that were released a few days ago on the Lenovo site, MS support told me it is a fault of the T61 and that I would need to disable Microsoft APCI support to stop this memory leak from occuring and to take the issue up with Lenovo.
    I have used the verifier tool to confirm that it is the Windows XP SP3 battc.sys memory module leaking.
    I am running the latest T61 drivers and fully patch with MS drivers on SP3.
    As MS have told me it is the fault of the T61 I am posting this issue here.
    Thanks
    Stephen

    It is memory available to the kernelwhich itself does not show under a process in task manager as far as I am aware (unles it is taken account as part of the system process).
    The best way to measure the available kernel memory space available is by using sysinternals procexp.
    You need to download procexp and also install the windows debugging tools from Microsoft. Then in procexp set the "Options > Configure Symbols : Debughlp.dll path" to the new debughlp.dll installed with your debu tools and set the symbols path to srv*c:\Symbols*http://msdl.microsoft.com/download/symbols
    Then you can choose in procexp "View > System Information" and see the used and total paged and non-paged kernel memory space.
    poolmon helps monitor all the symbols that are taking up this memory and verifier lets you drill down to the exact module and the changes in memory for a module that is occuring.
    Here are two really good links on it
    http://blogs.msdn.com/ntdebugging/archive/2006/12/18/Understanding-Pool-Consumption-and-Event-ID_3A0...
    http://blogs.msdn.com/ntdebugging/archive/2008/05/08/tracking-down-mmst-paged-pool-usage.aspx
    In my poolmon i notice that Mmst and battc are taking alot of memory after my computer has been running for some time. Mmst being high is normal but battc should not continually be growing as it is which is why I raised the case to MS but they want verification it is not a Lenovo issue.

  • Memory Leaks   Unresponsive Mouse

    2009 8 core Mac Pro w/ 24 GB of RAM, ATI Radeon 4870, and a SeriTek PCIe eSATA card (card only has drives connected when running a manual drive clone).  When running Toast 10 or Parallels 9, my RAM will fill up (I use a program called Menu Meters to monitor stuff).  This machine worked just fine under OS 10.9 and earlier - no issues like this at all.  ClamXAV will also completely fill the RAM up (the meter will be full green, instead of part green, then mostly grey when Toast or Parallels fills it up).  I have to use Terminal to purge it so that the machine is usable.
    The other thing that happens is that sometimes when the computer wakes up or I am in the middle of doing something, the mouse will still move, but the dock will not pop open and the left button the mouse doesn't respond.  The right button will open the right click menu, but will not respond normally at all.  I have tried a different Magic Mouse, but the problem is the same.
    I thought that it may be a problem with the factory RAM and the Kingston RAM not playing nicely together.  So I ran it with just the factory 8 GB and then ran it with the Kingston 16 GB - the problem persists no matter which RAM is installed.  All of the RAM also passes the memory tests in Rember and TechTool.
    So, I need to find out if someone thinks that maybe the bluetooth module may be going bad causing the mouse issues.  I also need to find out what is causing the memory leaks.  I followed the steps that someone gave on this site to boot into safe mode, repair permissions, reset PRAM, then reset SMC (or the other way around - I did it like they said to).  It did nothing to fix the problem.
    I need some guidance here.  As I stated early on, the machine worked perfectly with OS 10.9.  I have WAY too much software that I use, so doing a completely fresh install is out of the question - I don't have time to reload everything.  This problem is annoying and I know that I am not the only one having these issues.  Any input will be greatly appreciated.  Thanks in advance.

    Here is the EtreCheck report:
    Problem description:
    Memory leaks when using Toast 10 or Parallels 9.  Mouse also become unresponsive (it will move, but left button does not work and dock will not pop open - mouse problem happens independent of the RAM being filled up - different mouse was tried with same result).
    EtreCheck version: 2.1.5 (108)
    Report generated January 9, 2015 at 9:20:59 PM MST
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
        Mac Pro (Early 2009) (Verified)
        Mac Pro - model: MacPro4,1
        2 2.26 GHz Quad-Core Intel Xeon CPU: 8-core
        24 GB RAM Upgradeable
            DIMM 1
                4 GB DDR3 ECC 1066 MHz ok
            DIMM 2
                4 GB DDR3 ECC 1066 MHz ok
            DIMM 3
                2 GB DDR3 ECC 1066 MHz ok
            DIMM 4
                2 GB DDR3 ECC 1066 MHz ok
            DIMM 5
                4 GB DDR3 ECC 1066 MHz ok
            DIMM 6
                4 GB DDR3 ECC 1066 MHz ok
            DIMM 7
                2 GB DDR3 ECC 1066 MHz ok
            DIMM 8
                2 GB DDR3 ECC 1066 MHz ok
        Bluetooth: Old - Handoff/Airdrop2 not supported
        Wireless:  en2: 802.11 a/b/g/n
    Video Information: ℹ️
        ATI Radeon HD 4870 - VRAM: 512 MB
            AL2216W 1680 x 1050 @ 60 Hz
    System Software: ℹ️
        OS X 10.10.1 (14B25) - Uptime: 2:4:35
    Disk Information: ℹ️
        HL-DT-ST BD-RE  WH12LS39 
        HL-DT-ST DVDRAM GH24NS90 
        SAMSUNG HD103SJ disk1 : (1 TB)
            EFI (disk1s1) <not mounted> : 210 MB
            OS 10.10.1 (disk1s2) / : 999.35 GB (410.30 GB free)
            Recovery HD (disk1s3) <not mounted>  [Recovery]: 650 MB
        SAMSUNG HD103SJ disk2 : (1 TB)
            EFI (disk2s1) <not mounted> : 210 MB
            Extra Storage (disk2s2) /Volumes/Extra Storage : 999.86 GB (554.20 GB free)
        SAMSUNG HD103SJ disk3 : (1 TB)
            EFI (disk3s1) <not mounted> : 210 MB
            Extra Storage 2 - Scratch (disk3s2) /Volumes/Extra Storage 2 - Scratch : 999.86 GB (39.54 GB free)
        WDC WD5001AALS-00LWTA0 disk0 : (500.11 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            BOOTCAMP (disk0s2) /Volumes/BOOTCAMP : 499.90 GB (275.71 GB free)
    USB Information: ℹ️
        Shuttle Technology Inc. E-USB Bridge
        Sony C6606
        Apple, Inc. Keyboard Hub
            Apple Inc. Apple Keyboard
        Apple Inc. BRCM2046 Hub
            Apple Inc. Bluetooth USB Host Controller
    Firewire Information: ℹ️
        Apple Computer, Inc. iSight 200mbit - 400mbit max
    Gatekeeper: ℹ️
        Anywhere
    Kernel Extensions: ℹ️
            /Applications/Hotspot Shield.app
        [not loaded]    com.anchorfree.tun (1.0) [Support]
            /Applications/Parallels Desktop.app
        [not loaded]    com.parallels.kext.hidhook (9.0 24251.1052177) [Support]
        [not loaded]    com.parallels.kext.hypervisor (9.0 24251.1052177) [Support]
        [not loaded]    com.parallels.kext.netbridge (9.0 24251.1052177) [Support]
        [not loaded]    com.parallels.kext.usbconnect (9.0 24251.1052177) [Support]
        [not loaded]    com.parallels.kext.vnic (9.0 24251.1052177) [Support]
            /Applications/TechTool Deluxe.app
        [not loaded]    com.micromat.iokit.ttpatadriver (5.0.0) [Support]
        [not loaded]    com.micromat.iokit.ttpfwdriver (5.0.0) [Support]
            /Applications/TechTool Protogo/Protogo Applications/TechTool Pro 7.app
        [not loaded]    com.micromat.driver.spdKernel (1 - SDK 10.8) [Support]
        [not loaded]    com.micromat.driver.spdKernel-10-8 (1 - SDK 10.8) [Support]
            /Applications/Temperature Monitor 4.94/Temperature Monitor 4.94.app
        [not loaded]    com.bresink.driver.BRESINKx86Monitoring (8.0) [Support]
            /Applications/Toast 11 Titanium/Spin Doctor.app
        [not loaded]    com.hzsystems.terminus.driver (4) [Support]
            /Applications/Toast 7 Titanium/Toast Titanium.app
        [not loaded]    com.roxio.TDIXController (1.6) [Support]
            /Library/Extensions
        [loaded]    at.obdev.nke.LittleSnitch (4216 - SDK 10.8) [Support]
            /System/Library/Extensions
        [loaded]    com.SiliconImage.driver.Si3132 (1.2.5) [Support]
        [not loaded]    com.devguru.driver.SamsungComposite (1.2.63 - SDK 10.6) [Support]
        [not loaded]    com.microsoft.driver.MicrosoftMouse (8.2) [Support]
        [not loaded]    com.roxio.BluRaySupport (1.1.6) [Support]
            /System/Library/Extensions/MicrosoftMouse.kext/Contents/PlugIns
        [not loaded]    com.microsoft.driver.MicrosoftMouseBluetooth (8.2) [Support]
        [not loaded]    com.microsoft.driver.MicrosoftMouseUSB (8.2) [Support]
            /System/Library/Extensions/ssuddrv.kext/Contents/PlugIns
        [not loaded]    com.devguru.driver.SamsungACMControl (1.2.63 - SDK 10.6) [Support]
        [not loaded]    com.devguru.driver.SamsungACMData (1.2.63 - SDK 10.6) [Support]
        [not loaded]    com.devguru.driver.SamsungMTP (1.2.63 - SDK 10.5) [Support]
        [not loaded]    com.devguru.driver.SamsungSerial (1.2.63 - SDK 10.6) [Support]
    Startup Items: ℹ️
        HP IO: Path: /Library/StartupItems/HP IO
        SiCoreService: Path: /Library/StartupItems/SiCoreService
        Startup items are obsolete in OS X Yosemite
    Launch Agents: ℹ️
        [running]    at.obdev.LittleSnitchUIAgent.plist [Support]
        [loaded]    com.coupons.coupond.plist [Support]
        [running]    com.micromat.TechToolProAgent.plist [Support]
        [loaded]    com.oracle.java.Java-Updater.plist [Support]
        [invalid?]    com.parallels.mobile.prl_deskctl_agent.launchagent.plist [Support]
        [invalid?]    com.parallels.mobile.startgui.launchagent.plist [Support]
        [not loaded]    com.teamviewer.teamviewer.plist [Support]
        [not loaded]    com.teamviewer.teamviewer_desktop.plist [Support]
    Launch Daemons: ℹ️
        [running]    at.obdev.littlesnitchd.plist [Support]
        [loaded]    com.adobe.fpsaud.plist [Support]
        [loaded]    com.bombich.ccc.plist [Support]
        [loaded]    com.hp.lightscribe.plist [Support]
        [running]    com.micromat.TechToolProDaemon.plist [Support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Support]
        [invalid?]    com.parallels.mobile.dispatcher.launchdaemon.plist [Support]
        [failed]    com.parallels.mobile.kextloader.launchdaemon.plist [Support] [Details]
        [not loaded]    com.teamviewer.teamviewer_service.plist [Support]
    User Launch Agents: ℹ️
        [loaded]    com.facebook.videochat.[redacted].plist [Support]
        [loaded]    com.google.keystone.agent.plist [Support]
        [running]    com.nchsoftware.expressinvoice.agent.plist [Support]
        [loaded]    uk.co.markallan.clamxav.clamscan.plist [Support]
        [loaded]    uk.co.markallan.clamxav.freshclam.plist [Support]
    User Login Items: ℹ️
        iTunesHelper    Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        SMARTReporter    Application (/Applications/SMARTReporter/SMARTReporter.app)
        BetterSnapTool    Application (/Applications/BetterSnapTool.app)
        smcFanControl    Application (/Applications/smcfancontrol_2_2_2/smcFanControl.app)
        Android File Transfer Agent    Application (/Users/[redacted]/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app)
    Internet Plug-ins: ℹ️
        JavaAppletPlugin: Version: Java 8 Update 25 Check version
        FlashPlayer-10.6: Version: 16.0.0.235 - SDK 10.6 [Support]
        Default Browser: Version: 600 - SDK 10.10
        AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 [Support]
        CouponPrinter-FireFox_v2: Version: 5.0.3 - SDK 10.6 [Support]
        AdobePDFViewer: Version: 11.0.06 - SDK 10.6 [Support]
        Flash Player: Version: 16.0.0.235 - SDK 10.6 [Support]
        QuickTime Plugin: Version: 7.7.3
        SharePointBrowserPlugin: Version: 14.4.6 - SDK 10.6 [Support]
        iPhotoPhotocast: Version: 7.0 - SDK 10.8
    Safari Extensions: ℹ️
        AdBlock [Installed]
        F.B. Purity - Cleans Up Facebook [Installed]
        OpenIE [Installed]
    3rd Party Preference Panes: ℹ️
        Déjà Vu  [Support]
        Flash Player  [Support]
        FUSE for OS X (OSXFUSE)  [Support]
        Java  [Support]
        MacFUSE  [Support]
        MenuMeters  [Support]
        Microsoft Mouse  [Support]
        MouseLocator  [Support]
        NTFS-3G  [Support]
        TechTool Protection  [Support]
    Time Machine: ℹ️
        Time Machine not configured!
    Top Processes by CPU: ℹ️
            48%    plugin-container
            39%    fontd
             6%    firefox
             5%    WindowServer
             4%    bluetoothaudiod
    Top Processes by Memory: ℹ️
        928 MB    firefox
        412 MB    plugin-container
        258 MB    mds_stores
        180 MB    iTunes
        129 MB    Finder
    Virtual Memory Information: ℹ️
        19.38 GB    Free RAM
        3.11 GB    Active RAM
        1.88 GB    Inactive RAM
        1.38 GB    Wired RAM
        2.40 GB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Jan 9, 2015, 07:16:57 PM    Self test - passed
        Jan 8, 2015, 11:37:48 AM    /Library/Logs/DiagnosticReports/ClamXav_2015-01-08-113748_[redacted].cpu_resour ce.diag [Details]
        Jan 8, 2015, 11:21:46 AM    /Users/[redacted]/Library/Logs/DiagnosticReports/Preview_2015-01-08-112146_[red acted].crash

  • Memory leak in WLS6.1 sp3 on Solaris?

    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x <pid>", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

    If you set -Xmx512m then the java heap will grow no larger than 512MB.
    WLS is reporting the size of the java heap. (It is a java program after
    all and doesn't know a lot about what native code might be doing.)
    My first thought is try running with Oracle's thin (type-4) driver.
    Since this is java code, it will use the java heap. If the memory usage
    drastically changes, then you can point the finger at the jDriver.
    Are you using any other native code / libraries?
    -- Rob
    Erik Westland wrote:
    We are running WLS 6.1 sp3 on Solaris 8 using Sun's 1.3.1 JVM with BEA's
    JDriver to connect to Oracle (8.1.7). We have set the JVM to a maximum
    heap
    of 512M (-Xms256m -Xmx512m).
    The issue is that we are now seeing (via pmap) the resident memory growing
    to ~1GB. Yet, the WLS management console is reporting memory usage of
    ~200M.
    So, if we are to believe WLS, then the JVM (or some native library) is
    chewing up the extra memory.
    Having examined the results of "pmap -x ", I see the heap (and some
    anon) mem/file are quite large.
    Address Kbytes Resident Shared Private Permissions Mapped File
    00026000 418912 416096 - 416096 read/write/exec [ heap ]
    D8C00000 524288 447928 - 447928 read/write/exec [ anon ]
    total Kb 1083832 981136 37960 943176
    Questions:
    - Are there any known memory leaks with 6.1 sp3 on Solaris?
    - Should it be possible for pmap's value of "heap" to grow larger than the
    "Xms" setting? We have observed this recently, but the numbers above don't
    reflect this.
    - Any idea what the "anon" is or how to determine what it is?
    - Do you know of any tools that might help me determine what is using that
    memory or what is in it?
    Any suggestions will be greatly appreciated...
    Thanks in advance,
    Erik

Maybe you are looking for

  • Request for visual studio that is compatible with windows 7

    I have installed many visual studio i.e, 2012,13 and they did not work in my system with windows 7 OS.Please kindly guide me with the 2010 or 2008 version so that i can develop my apps using it and please make sure that i contains all the specificati

  • Error Log entry Unable to write file with XML Saver

    Hi all, I have just encountered the following problem. I am saving a XML file using the XML Saver. Another BLT reads the file, changes something, and saves it again with the same name. The file is saved, but the NetWeaver SAP Log gives the error "Una

  • WS-Security Headers

    I am having a problem making a webservice call through a partnerlink with the wsse security headers in the webservice call. BPEL server is receiving a SOAP webservice call with ws-security headers. I want to call a partner link, external webservice,

  • Planning stratergy 59

    hi i used planning stratergy 59 Planning at phantom assy lvl but the indreq and ordres was not reduced even though the final assy was dlv. what can i do. thanks saran

  • Resizing TextLine

    Hi All, My question is more about the Text Engine. I am writing a TextField class, which can have only one line of text and its width has a maximum value. If the the width of the textline is higher than the width of the textfield, then the textline h