Skip to content

while.mlir test is failing on all the backends with asan config #2252

Closed

Description

@hanhanW

Bisect with internal changes and found that the test is failing after #2076 got merged. If synced at #2198, the test passed with asan config.

log:

AddressSanitizer: 200 byte(s) leaked in 4 allocation(s).

tag @benvanik since the change was landed by him

Activity

  1. added
    bug 🐞
    on Jun 18, 2020
  2. self-assigned this
    on Jun 18, 2020
  3. added this to the milestone on Jun 23, 2020
  4. modified the milestones: , on Jul 1, 2020
  5. added
    runtime
    on Jul 1, 2020
  6. benvanik commented on Jul 1, 2020

    @benvanik
    Collaborator

    Debugging this now; update is that ASAN is unhappy and I can make ASAN happy by changing the VM stack to be allocated on the heap vs. the host stack. I've verified that the stack use is in the right range so I'm suspecting an ASAN issue with tracking the stack VM structure. I'll fiddle with it and see if I can get some real errors or find a way to silence ASAN.

  7. benvanik commented on Jul 1, 2020

    @benvanik
    Collaborator

    Giving up on MSVC ASAN for now as I can't explain its behavior (and LLVM being included in the build massively complicates things). Digging in with the CRT debug allocator I've confirmed that there are two iree::hal::Buffers being leaked, though I'm not sure where from yet.

  8. benvanik commented on Jul 1, 2020

    @benvanik
    Collaborator

    CRT dump output:

    Dumping objects ->
    {988} normal block at 0x0000026D0CECCD40, 16 bytes long.
     Data: <    m           > 98 CE EC 0C 6D 02 00 00 00 00 00 00 00 00 00 00
    {987} normal block at 0x0000026D0CECCE50, 136 bytes long.
     Data: <  w             > E0 98 77 86 F6 7F 00 00 01 00 00 00 00 00 00 00
    D:\Dev\iree\iree\hal\host\host_local_allocator.cc(98) : {986} normal block at 0x0000026D0CECDCF0, 4 bytes long.
     Data: <    > 04 00 00 00
    {955} normal block at 0x0000026D0CECCCF0, 16 bytes long.
     Data: <x   m           > 78 DF EC 0C 6D 02 00 00 00 00 00 00 00 00 00 00
    {954} normal block at 0x0000026D0CECDF30, 136 bytes long.
     Data: <  w             > E0 98 77 86 F6 7F 00 00 01 00 00 00 00 00 00 00
    D:\Dev\iree\iree\hal\host\host_local_allocator.cc(98) : {953} normal block at 0x0000026D0CECD670, 4 bytes long.
     Data: <    > 02 00 00 00
    {942} normal block at 0x0000026D0CEC8420, 96 bytes long.
     Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    {940} normal block at 0x0000026D0CECCFB0, 4 bytes long.
     Data: <    > 00 00 00 00
    {939} normal block at 0x0000026D0CECDA30, 4 bytes long.
     Data: <    > 00 00 00 00
    {938} normal block at 0x0000026D0CECC930, 16 bytes long.
     Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Object dump complete.
    

    (the bottom few are absl::Flags on-demand storage allocation)

  9. benvanik commented on Jul 2, 2020

    @benvanik
    Collaborator

    Pretty sure a legit leak in stack frame cleanup (which is what changed in that big CL) - confirmed all ref counting is correct everywhere else.

  10. added a commit that references this issue on Jul 9, 2020
  11. added a commit that references this issue on Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐞runtime

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions