Bug #12169
openacpica leaks terribly
0%
Description
During nfs-zone testing, I discovered on both SmartOS and OmniOSce nontrivial leaks in the acpica subsystem.
On SmartOS (2-socket Ivy Bridge E):
CACHE LEAKED BUFCTL CALLER fffffe592de3f008 1 fffffe59dae97c10 AcpiOsAllocate+0x1c fffffe592de3e008 1 fffffe59dc54a5f0 AcpiOsAllocate+0x1c fffffe592de3f008 6 fffffe59dc5d7538 AcpiOsAllocate+0x1c fffffe592de3f008 17 fffffe59dadd91f8 AcpiOsAllocate+0x1c fffffe592de3f008 240 fffffe59dadfd9b0 AcpiOsAllocate+0x1c ---SNIP!--- kmem_alloc_80 leak: 1 buffer, 80 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe59dae97c10 fffffe59daeb8ab8 0 fffffffffbc580c0 fffffe592de3f008 fffffe59421c1740 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiUtCopyIobjectToIobject+0x60 AcpiDsEvaluateNamePath+0x182 AcpiDsExecEndOp+0x2f8 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 AcpiNsExecuteTable+0x13d kmem_alloc_64 leak: 1 buffer, 64 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe59dc54a5f0 fffffe59dc506700 0 fffffffffbc580c0 fffffe592de3e008 fffffe5942db8040 fffffe5990d39730 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiDsBuildInternalPackageObj+0x3c8 AcpiDsEvalDataObjectOperands+0xfc AcpiDsExecEndOp+0x3f7 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 AcpiNsExecuteTable+0x13d AcpiNsParseTable+0x58 AcpiNsLoadTable+0xb3 AcpiTbLoadNamespace+0x18c kmem_alloc_80 leak: 6 buffers, 80 bytes each, 480 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe59dc5d7538 fffffe59dc5a7560 0 fffffffffbc580c0 fffffe592de3f008 fffffe5942db7a40 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsBuildInternalObject+0x93 AcpiDsBuildInternalPackageObj+0x1fb AcpiDsEvalDataObjectOperands+0xfc AcpiDsExecEndOp+0x3f7 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 kmem_alloc_80 leak: 17 buffers, 80 bytes each, 1360 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe59dadd91f8 fffffe59dada7348 0 fffffffffbc580c0 fffffe592de3f008 fffffe59421588c0 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsEvalDataObjectOperands+0x6d AcpiDsExecEndOp+0x5dd AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 AcpiNsExecuteTable+0x13d kmem_alloc_80 leak: 240 buffers, 80 bytes each, 19200 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe59dadfd9b0 fffffe59dada6d10 0 fffffffffbc580c0 fffffe592de3f008 fffffe5942159580 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsBuildInternalObject+0x93 AcpiDsBuildInternalPackageObj+0x1fb AcpiDsEvalDataObjectOperands+0xfc AcpiDsExecEndOp+0x5dd AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135
And on OmniOSce bloody (VMware VM on a MacBook pro) after a fresh reboot and an uptime of less than 30 minutes:
> ::findleaks -d CACHE LEAKED BUFCTL CALLER fffffe0647828848 2 fffffe065378a5f8 AcpiOsAllocate+0x1c fffffe0647828848 2 fffffe065378e390 AcpiOsAllocate+0x1c fffffe0647828848 1 fffffe06537f7cd0 AcpiOsAllocate+0x1c fffffe0647826588 4 fffffe06533d7568 AcpiOsAllocate+0x1c fffffe0647828848 1214 fffffe069bf87580 AcpiOsAllocate+0x1c fffffe0647828848 1 fffffe065378e468 AcpiOsAllocate+0x1c fffffe0647828848 87 fffffe0658ddfde8 AcpiOsAllocate+0x1c fffffe0647828848 2 fffffe06534aa3a0 AcpiOsAllocate+0x1c fffffe0647828848 21 fffffe0658ddfec0 AcpiOsAllocate+0x1c fffffe0647828848 1223 fffffe067bb44820 AcpiOsAllocate+0x1c fffffe0647826588 2 fffffe06537f7a48 AcpiOsAllocate+0x1c fffffe0647828848 1 fffffe06534a9b30 AcpiOsAllocate+0x1c fffffe0647828848 4 fffffe065517bea0 AcpiOsAllocate+0x1c fffffe0647826588 2549 fffffe06533d8d08 AcpiOsAllocate+0x1c fffffe0647828848 2 fffffe06537a8ec0 AcpiOsAllocate+0x1c fffffe0647828848 4 fffffe065378a520 AcpiOsAllocate+0x1c fffffe0647828848 4 fffffe06a2ff9ec0 AcpiOsAllocate+0x1c fffffe0647826588 1 fffffe06575a5970 AcpiOsAllocate+0x1c ------------------------------------------------------------------------ Total 5124 buffers, 266784 bytes kmem_alloc_80 leak: 2 buffers, 80 bytes each, 160 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe065378a5f8 fffffe065375e000 0 fffffffffbc570c0 fffffe0647828848 fffffe064913e300 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0xe8 AcpiDsCreateBufferField+0x173 AcpiDsLoad2EndOp+0x102 AcpiDsExecEndOp+0x536 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b kmem_alloc_80 leak: 2 buffers, 80 bytes each, 160 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe065378e390 fffffe065375dea8 0 fffffffffbc570c0 fffffe0647828848 fffffe064913ea80 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsCreateOperands+0xfe AcpiDsExecEndOp+0x1eb AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b kmem_alloc_80 leak: 1 buffer, 80 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06537f7cd0 fffffe06537c1f78 0 fffffffffbc570c0 fffffe0647828848 fffffe0649d5c4c0 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiUtCopyIobjectToIobject+0x60 AcpiDsStoreObjectToLocal+0x213 AcpiExStore+0x286 AcpiExOpcode_1A_1T_1R+0x1a3 AcpiDsExecEndOp+0x216 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac kmem_alloc_24 leak: 4 buffers, 24 bytes each, 96 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06533d7568 fffffe0653365188 0 fffffffffbc570c0 fffffe0647826588 fffffe06496b8180 fffffe064dc502d8 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiUtCreateStringObject+0x5c AcpiNsRepair_HID+0x5e AcpiNsRepair_CID+0x75 AcpiNsComplexRepairs+0x48 AcpiNsCheckReturnValue+0xab AcpiNsEvaluate+0x2cd AcpiUtEvaluateObject+0x7b AcpiUtExecute_CID+0x6c AcpiGetObjectInfo+0x14f acpidev_alloc_walk_info+0x87 kmem_alloc_80 leak: 1214 buffers, 80 bytes each, 97120 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe069bf87580 fffffe069bf47090 106441f22e fffffe0007b1cc20 fffffe0647828848 fffffe064c6f9500 fffffe064e5cecb8 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsCreateOperands+0xfe AcpiDsExecEndOp+0x1eb AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b kmem_alloc_80 leak: 1 buffer, 80 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe065378e468 fffffe065375de40 0 fffffffffbc570c0 fffffe0647828848 fffffe064913eb40 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiExOpcode_2A_1T_1R+0x17b AcpiDsExecEndOp+0x216 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b AcpiUtEvaluateObject+0x7b kmem_alloc_80 leak: 87 buffers, 80 bytes each, 6960 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe0658ddfde8 fffffe0658c56ea8 4a2dc1f44 fffffffffbc570c0 fffffe0647828848 fffffe064947ff40 fffffe064ef16b68 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsBuildInternalObject+0x93 AcpiDsBuildInternalPackageObj+0x1fb AcpiDsEvalDataObjectOperands+0xfc AcpiDsExecEndOp+0x4ff AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a kmem_alloc_80 leak: 2 buffers, 80 bytes each, 160 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06534aa3a0 fffffe0653440ab8 0 fffffffffbc570c0 fffffe0647828848 fffffe0648f4a380 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsEvalDataObjectOperands+0x6d AcpiDsExecEndOp+0x5f5 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 AcpiNsExecuteTable+0x13d kmem_alloc_80 leak: 21 buffers, 80 bytes each, 1680 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe0658ddfec0 fffffe0658c56e40 4a2dc3967 fffffffffbc570c0 fffffe0647828848 fffffe0649480240 fffffe064ef169f8 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsEvalDataObjectOperands+0x6d AcpiDsExecEndOp+0x4ff AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b kmem_alloc_80 leak: 1223 buffers, 80 bytes each, 97840 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe067bb44820 fffffe067aed7e48 1028932fe4 fffffe0007b1cc20 fffffe0647828848 fffffe064c6908c0 fffffe064e5c02d8 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiExOpcode_2A_1T_1R+0x17b AcpiDsExecEndOp+0x216 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b AcpiUtEvaluateObject+0x7b kmem_alloc_24 leak: 2 buffers, 24 bytes each, 48 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06537f7a48 fffffe06537c0070 0 fffffffffbc570c0 fffffe0647826588 fffffe064a4bcac0 fffffe064de88548 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiUtCreateStringObject+0x5c AcpiNsRepair_HID+0x5e AcpiNsRepair_CID+0x75 AcpiNsComplexRepairs+0x48 AcpiNsCheckReturnValue+0xab AcpiNsEvaluate+0x2cd AcpiUtEvaluateObject+0x7b AcpiUtExecute_CID+0x6c AcpiGetObjectInfo+0x14f isa_acpi_callback+0x10b kmem_alloc_80 leak: 1 buffer, 80 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06534a9b30 fffffe0653441f90 0 fffffffffbc570c0 fffffe0647828848 fffffe0648f454c0 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsCreateOperands+0xfe AcpiDsLoad2EndOp+0x646 AcpiDsExecEndOp+0x288 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteTable+0x135 kmem_alloc_80 leak: 4 buffers, 80 bytes each, 320 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe065517bea0 fffffe065519b968 464abf115 fffffffffbc570c0 fffffe0647828848 fffffe064af9efc0 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsBuildInternalObject+0x93 AcpiDsBuildInternalPackageObj+0x1fb AcpiDsEvalDataObjectOperands+0xfc AcpiDsExecEndOp+0x4ff AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a kmem_alloc_24 leak: 2549 buffers, 24 bytes each, 61176 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06533d8d08 fffffe0653365338 0 fffffffffbc570c0 fffffe0647826588 fffffe06494aeb00 fffffe064dc08220 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiUtCreateStringObject+0x5c AcpiNsRepair_HID+0x5e AcpiNsRepair_CID+0x75 AcpiNsComplexRepairs+0x48 AcpiNsCheckReturnValue+0xab AcpiNsEvaluate+0x2cd AcpiUtEvaluateObject+0x7b AcpiUtExecute_CID+0x6c AcpiNsGetDeviceCallback+0x122 AcpiNsWalkNamespace+0x12f kmem_alloc_80 leak: 2 buffers, 80 bytes each, 160 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06537a8ec0 fffffe06537d2360 0 fffffffffbc570c0 fffffe0647828848 fffffe06496b6800 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiUtCreateIntegerObject+0x49 AcpiExReadDataFromField+0x96 AcpiExResolveNodeToValue+0x47d AcpiExResolveToValue+0x14b AcpiDsEvaluateNamePath+0x125 AcpiDsExecEndOp+0x358 AcpiPsParseLoop+0x25a kmem_alloc_80 leak: 4 buffers, 80 bytes each, 320 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe065378a520 fffffe065375e068 0 fffffffffbc570c0 fffffe0647828848 fffffe064913e000 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsCreateOperands+0xfe AcpiDsEvalBufferFieldOperands+0x58 AcpiDsExecEndOp+0x54c AcpiPsParseLoop+0x25a AcpiPsParseAml+0x1ed AcpiPsExecuteMethod+0x37a kmem_alloc_80 leak: 4 buffers, 80 bytes each, 320 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06a2ff9ec0 fffffe06a2fc22d8 150e1b6bbc fffffe00081edc20 fffffe0647828848 fffffe064b0cea40 0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x25b kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiExOpcode_2A_1T_1R+0x17b AcpiDsExecEndOp+0x216 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b AcpiUtEvaluateObject+0x7b kmem_alloc_24 leak: 1 buffer, 24 bytes ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe06575a5970 fffffe065757b060 4845a6351 fffffffffbc570c0 fffffe0647826588 fffffe0648fb1c40 fffffe064ee29360 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x135 kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiUtCreateStringObject+0x5c AcpiNsRepair_HID+0x5e AcpiNsRepair_CID+0x75 AcpiNsComplexRepairs+0x48 AcpiNsCheckReturnValue+0xab AcpiNsEvaluate+0x2cd AcpiUtEvaluateObject+0x7b AcpiUtExecute_CID+0x6c AcpiGetObjectInfo+0x14f acpinex_event_walk+0x99
This bug MAY be solved by merely updating the acpica bits. But if they don't, this bug should stay opened until fixed.
Files
Updated by Gordon Ross almost 3 years ago
I've run across this too, with a recent illumos (derived) build, running in a VM on VMware ESXi 6.5
Here are the most numerous ACPI leaks I see:
CACHE LEAKED BUFCTL CALLER fffffe0b0e028a00 53131 fffffe0b25ad62d0 AcpiOsAllocate+0x1c fffffe0b0e02ba00 26490 fffffe0b69404588 AcpiOsAllocate+0x1c fffffe0b0e02ba00 26463 fffffe0b695358f8 AcpiOsAllocate+0x1c kmem_alloc_24 leak: 53131 buffers, 24 bytes each, 1275144 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe0b25ad62d0 fffffe0b25864398 0 fffffffffbc57060 fffffe0b0e028a00 fffffe0b110c2080 fffffe0b1a6e8950 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x15e kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiUtCreateStringObject+0x5c AcpiNsRepair_HID+0x5e AcpiNsRepair_CID+0x75 AcpiNsComplexRepairs+0x48 AcpiNsCheckReturnValue+0xab AcpiNsEvaluate+0x2cd AcpiUtEvaluateObject+0x7b AcpiUtExecute_CID+0x6c AcpiNsGetDeviceCallback+0x122 AcpiNsWalkNamespace+0x12f kmem_alloc_80 leak: 26490 buffers, 80 bytes each, 2119200 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe0b69404588 fffffe0b6943f368 1dcd8d90a5 fffffd000f501c20 fffffe0b0e02ba00 fffffe0b15cefe80 fffffe0b203f1ed0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x15e kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiDsCreateOperand+0x286 AcpiDsCreateOperands+0xfe AcpiDsExecEndOp+0x143 AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b kmem_alloc_80 leak: 26463 buffers, 80 bytes each, 2117040 bytes total ADDR BUFADDR TIMESTAMP THREAD CACHE LASTLOG CONTENTS fffffe0b695358f8 fffffe0b69507900 1d773dce16 fffffd000f501c20 fffffe0b0e02ba00 fffffe0b157e3540 fffffe0b203254d0 kmem_cache_alloc_debug+0x2fc kmem_cache_alloc+0x15e kmem_zalloc+0x47 AcpiOsAllocate+0x1c AcpiOsAllocateZeroed+0x24 AcpiOsAcquireObject+0x12b AcpiUtAllocateObjectDescDbg+0x4f AcpiUtCreateInternalObjectDbg+0x6d AcpiExOpcode_2A_1T_1R +0xa3 AcpiDsExecEndOp+0x19c AcpiPsParseLoop+0x25a AcpiPsParseAml+0x3ac AcpiPsExecuteMethod+0x37a AcpiNsEvaluate+0x17b AcpiUtEvaluateObject+0x7b
Anyone have clues about tracking this down? The ACPI code does a lot of passing objects around, and apparently it's forgetting a reference in some code path(s).
Looks like some of the acpi leaks I see might be this: https://github.com/acpica/acpica/commit/52d1da5d
https://patchwork.kernel.org/project/linux-acpi/patch/20201130192048.3093726-6-erik.kaneda@intel.com/
Yes, that patch seems to fix most of the leaks shown above. Re-checking...
BTW, the above is exposed because acpi_drv calls ACPI periodically:
acpica`AcpiNsWalkNamespace+0x12f acpica`AcpiGetDevices+0xb9 acpi_drv`acpi_drv_cbat_rescan+0x45 genunix`callout_list_expire+0x8f
Updated by Gordon Ross almost 3 years ago
Getting a PR ready. Here are the notes from the imported fix:
Imported from: https://github.com/acpica/acpica/commit/52d1da5d
Original author: Erik Kaneda erik.kaneda@intel.com
Interpreter: fix memory leak by using use existing buffer in _HID repair
There was a memory leak that ocurred when a _CID object is defined as
a package containing string objects. When _CID is checked for any
possible repairs, it calls a helper function to repair _HID (because
_CID basically contains multiple _HID entries).
The _HID repair function assumes that string objects are standalone
objects that are not contained inside of any packages. The _HID
repair function replaces the string object with a brand new object
and attempts to delete the old object by decrementing the reference
count of the old object. Strings inside of packages have a reference
count of 2 so the _HID repair function leaves this object in a
dangling state and causes a memory leak.
Instead of allocating a brand new object and removing the old object,
use the existing object when repairing the _HID object.
Updated by Gordon Ross almost 3 years ago
Apparently there are questions about whether its OK to modify these strings in-place. (They're provided by the firmware, and may be mapped read-only.) See: https://www.spinics.net/lists/linux-acpi/msg99303.html
While this fix worked for me (on intel) it might need rework for other platforms.
Let's see what others working on ACPI do with this.
Updated by Gordon Ross over 2 years ago
We've lived with this leak for quite a while, so can probably just wait for #13638 to be integrated.
Updated by Robert Mustacchi over 2 years ago
We found that #13638 didn't help with the leak. Did you find that it did?
Updated by Dan McDonald over 2 years ago
I still saw leaks with a version I tried. To be fair, it might be replacement leaks, I didn't do a before/after leak analysis, just noticed that there were still leaks after "reboot -d".
I'm happy to turn some attention to this if it's close to being ready for integration and it helps in other ways.
Updated by Gordon Ross over 2 years ago
Some test results: With either this fix, or #13638 the large volume of leaking disappears.
(The one originating from the periodic: callout_list_expire / acpi_drv_cbat_rescan)
There are still other leaks, but I don't see any leaks with a large instance count.
Updated by Dan McDonald over 2 years ago
Visit https://kebe.com/~danmcd/webrevs/acpi-dev/ for vmdumps and ::findleaks output. The leaks in VMware appear to be fixed, and my Skylake-E test machine has none to begin with. My Ivy Bridge E, OTOH, appears to still be leaking identically to my initial report at the beginning of this bug.
Updated by Dan McDonald over 2 years ago
- File larry-acpi-noise.txt larry-acpi-noise.txt added
I'm attaching a set of output from the still-leaky larry, on the off chance someone with ACPICA knowledge can look at it and go, OH THAT'S WHAT'S WRONG...
Updated by Gordon Ross over 2 years ago
- File 0001-Fix-memory-leak-caused-by-_CID-repair-function.patch 0001-Fix-memory-leak-caused-by-_CID-repair-function.patch added
Here's the latest fix from intel for this problem. The fix we have in the (pending) import of 201113 is OK on intel boxes but is reported to cause problems on ARM. This later fix is reportedly OK on all platforms.
Updated by Dan McDonald over 2 years ago
Going to try the new small patch on my leaky Ivy Bridge E machine.
Updated by Dan McDonald over 2 years ago
The 0001-Fix-memory-leak-cause-by-_CID... patch, as applied to illumos-joyent:master, did not help:
> ::findleaks CACHE LEAKED BUFCTL CALLER fffffe592de3f008 240 fffffe59dae6a950 AcpiOsAllocate+0x1c fffffe592de3f008 17 fffffe59dae66228 AcpiOsAllocate+0x1c fffffe592de3e008 1 fffffe59dc5d3e70 AcpiOsAllocate+0x1c fffffe592de3f008 1 fffffe59daf45c40 AcpiOsAllocate+0x1c fffffe592de3f008 6 fffffe59dc640e90 AcpiOsAllocate+0x1c fffffe592de3c008 1 fffffe5a6dce1040 au_pathdup+0x4f fffffe592de41008 1 fffffe5a7d7153e0 au_pathdup+0x4f fffffe592de45008 2 fffffe59f14c4b28 dmu_zfetch_stream_create+0x10c fffffe592de45008 7 fffffe59dfcecde8 dmu_zfetch_stream_create+0x10c fffffe592de45008 3 fffffe5a12aab0f0 dmu_zfetch_stream_create+0x10c fffffe592de45008 5 fffffe59f868e8b8 dmu_zfetch_stream_create+0x10c fffffe592de45008 2 fffffe5a160bc720 dmu_zfetch_stream_create+0x10c fffffe592de45008 1 fffffe5a1681ade0 dmu_zfetch_stream_create+0x10c fffffe592de45008 2 fffffe59f0fcddf0 dmu_zfetch_stream_create+0x10c fffffe592de45008 4 fffffe59f150d540 dmu_zfetch_stream_create+0x10c fffffe592de50008 2 fffffe5c889239d0 pn_get+0x35 ------------------------------------------------------------------------ Total 295 buffers, 28624 bytes >
Updated by Gordon Ross about 2 months ago
I believe the patch does fix the leak from AcpiUtCreateInternalObjectDbg
That's from a bug in the ACPI code, exposed with DEBUG builds.
I'd like to keep this issue focused on that leak.
Apparently there's another in Dan's testing.