openvinotoolkit / stable-diffusion-webui

Stable Diffusion web UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Incompatible with TCMalloc

palant opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

When running with TCMalloc installed, generating an image crashes the process with memory-related error messages. The errors I’ve seen:

  • munmap_chunk(): invalid pointer
  • double free or corruption (out)
  • Segmentation fault
  • free(): invalid size

Steps to reproduce the problem

  1. Install TCMalloc
  2. Start WebUI
  3. Try to generate an image with OpenVINO script.

What should have happened?

TCMalloc is typical for a WebUI setup because without it the Python process will leak memory. Ideally, OpenVINO should support it. Never mind that the bugs causing it to crash with TCMalloc are likely present without it as well, merely masked.

At the very least, the installation instructions should suggest export NO_TCMALLOC=1 as a work-around.

Sysinfo

OS is Ubuntu 23.04. Relevant packages: torch 2.0.1, torchvision 0.15.2, openvino 2023.1.0.

Console logs

There is no Python backtrace, the error happens in native code.

same error on intel iris XE graphic

Is this project in going on ?