Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug radixcache stack_overflow #1499

Merged

Conversation

luzengxiangcn
Copy link
Contributor

Motivation

A bug happens in 3 hours whe running pressure test on a A800*4 with Qwen2-72B.
Error Trace :

  • Location:
/sglang/python/sglang/srt/mem_cache/radix_cache.py
-- class RadixCache
     -- def _collect_leaves
        -- def dfs_
  • Error:
    Too many times recursion causes stack overflow.
Python Stack Overflow

Modifications

For radix cache, replace recursion with stask for dfs search.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@luzengxiangcn
Copy link
Contributor Author

Motivation

A bug happens in 3 hours whe running pressure test on a A800*4 with Qwen2-72B. Error Trace :

  • Location:
/sglang/python/sglang/srt/mem_cache/radix_cache.py
-- class RadixCache
     -- def _collect_leaves
        -- def dfs_
  • Error:
    Too many times recursion causes stack overflow.
Python Stack Overflow

Modifications

For radix cache, replace recursion with stask for dfs search.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@merrymercy merrymercy merged commit e6692bf into sgl-project:main Sep 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants