代码中的dbx WUA错误跟踪

时间:2012-10-04 12:36:35

标签: c memory-leaks oracle11g dbx

我正在调试内存泄漏程序。启用“check -memuse”时,我收到以下错误:

Write to unallocated (wua) on thread 1:
Attempting to write 8 bytes at address 0xffffffff79f001d0
t@1 (l@1) stopped in _private_pthread_atfork at 0xffffffff5bd4ce28

当我发出Where命令时:

current thread: t@1
=>[1] _private_pthread_atfork(0xffffffff64d565ac, 0xffffffff64d5660c, 0xffffffff64d565dc, 0xffffffff79f001c0, 0xffffffff64eb6a50, 0xffffffff5bf4a360), at 0xffffffff5bd4ce28
  [2] _init(0x0, 0x0, 0xffffffff7f73cdf8, 0xffffffff7f617c5c, 0xffffffff5bdd6908, 0xffffffff6a700200), at 0xffffffff64d9e2d8
  [3] call_init(0xffffffff79d02670, 0x1, 0x10020204, 0xffffffff64d9e2d0, 0x80, 0xffffffff77e01d18), at 0xffffffff7f617c64
  [4] setup(0x21441, 0xffffffff7f73c278, 0xffffffff7f73c4a4, 0x25000, 0x0, 0x0), at 0xffffffff7f616f50
  [5] _setup(0xffffffff7f638f8c, 0x1401c0, 0x0, 0xffffffff7ffff578, 0x2, 0xffffffffffffffff), at 0xffffffff7f6297f4
  [6] _rt_boot(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xffffffff7f608028

我可以追溯到发生此错误的代码的位置吗?你能帮我一点找回来源吗?

  

更多信息

这是一个proC流程。在10g上编译时,它工作正常。提供的二进制文件正在加载Oracle 10g库。 但是当用11g编译时给出了错误。在我的调试过程中,我在以下代码中发现10g内存泄漏:

EXEC SQL CONNECT :Userid;
oraca.orastxtf = ORASTFANY;

(dbx) showleaks
Checking for memory leaks...

Actual leaks report    (actual leaks:            1  total size:       1112 bytes)

  Total     Num of  Leaked     Allocation call stack
  Size      Blocks  Block
                    Address
==========  ====== =========== =======================================
      1112       1 0x1003231c8  _nss_XbyY_buf_alloc < get_pwbuf < _getpwuid < sigunmu < kpueaudi < kpugskey < kpu8lgn < kpuauthxa


Possible leaks report  (possible leaks:          0  total size:          0 bytes)

在11g到同一代码的调试期间,我得到了以下内存泄漏:

(dbx) showleaks
Checking for memory leaks...

Actual leaks report    (actual leaks:            4  total size:      25816 bytes)

  Total     Num of  Leaked     Allocation call stack
  Size      Blocks  Block
                    Address
==========  ====== =========== =======================================
     16384       1 0x1002c9b88  calloc < slts_tls_getaddr < sltsqKeyAdd < sltskys < dbgc_tls_ini < dbgc_find_diagctx < kpeDbgInitDBGC < nlstddt_do_alter_trace
      8280       1 0x1002c7b08  calloc < slts_tls_getaddr < sltsqKeyAdd < sltskys < dbgc_tls_ini < dbgc_find_diagctx < kpeDbgInitDBGC < nlstddt_do_alter_trace
      1112       1 0x10038b7e8  _nss_XbyY_buf_alloc < get_pwbuf < _getpwuid < sigunmu < siugunmu < kpugskey < kpu8lgn < kpuauthxa
        40       1 0x10028f658  sltsqKeyAdd < sltskys < dbgc_tls_ini < dbgc_find_diagctx < kpeDbgInitDBGC < nlstddt_do_alter_trace < nlstdggo < nlstdgg

任何人都可以有这样的问题吗?

1 个答案:

答案 0 :(得分:1)

用水户协会的错误是假的。针对RTC提出了一个错误:      7014457 RTC在_pthread_atfork中报告误报

此错误已在dbx7.9中修复。 Oracle Studio有一个新的代码分析工具,可以检测内存泄漏错误以及其他静态和动态问题。您可以在https://forums.oracle.com/forums/forum.jspa?forumID=894

中找到有关这些工具的更多讨论