Open Aurora-yzj opened 7 months ago
Thank you @Aurora-yzj, for the report. I managed to reproduce the issue 🙏
Just one note, memory limit is respected if resources are limited in the Docker container, so to reproduce that as well, it probably needs to be run natively.
Memgraph version 2.15.0
Environment Operating system: Ubuntu 22.04 Architecture: AMD64 Connect method: any connect method Driver: any driver
Describe the bug When passing an empty string to the replace() function, the database will hang and consume all system resources it can. The
--query-execution-timeout-sec
configuration also cannot limit the execution time in this circumstance.To Reproduce Steps to reproduce the behavior:
Memgraph will hang and occupy lots of memory space (for example, after executing the query for 5 minutes, it already took 50GiB of the memory space):
Just as you note, despite the fact that I have set a limitation to the maximum execution time of the query, this query will still cause Memgraph to hang forever and consume massive resources. This could cause DoS attacks.
Expected behavior Normally finishing executing the query.
Thank you so much for your help!
Verification Environment