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

Check failed: static_cast<int64_t>(u_.json_obj.cons.bytes_used) >= size #4725

Closed
kostasrim opened this issue Mar 7, 2025 · 6 comments · Fixed by #4777
Closed

Check failed: static_cast<int64_t>(u_.json_obj.cons.bytes_used) >= size #4725

kostasrim opened this issue Mar 7, 2025 · 6 comments · Fixed by #4777
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kostasrim
Copy link
Contributor

How to reproduce:

async def test_bug(df_factory: DflyInstanceFactory):                                                                                                                                                               
    master = df_factory.create(proactor_threads=2, serialization_max_chunk_size=1)                                                                                                                                 
    replicas = [                                                                                                                                                                                                   
        df_factory.create(proactor_threads=2)                                                                                                                                                                      
        for i in range(2)                                                                                                                                                                                          
    ]                                                                                                                                                                                                              
                                                                                                                                                                                                                   
    # Start instances and connect clients                                                                                                                                                                          
    df_factory.start_all([master] + replicas)                                                                                                                                                                      
    c_master = master.client()                                                                                                                                                                                     
    c_replicas = [replica.client() for replica in replicas]                                                                                                                                                        
                                                                                                                                                                                                                   
    total = 100000                                                                                                                                                                                                 
    await c_master.execute_command(f"DEBUG POPULATE {total} tmp 1000 TYPE SET ELEMENTS 100")                                                                                                                       
                                                                                                                                                                                                                   
    thresehold = 25000                                                                                                                                                                                             
    for i in range(thresehold):                                                                                                                                                                                    
        rand = random.randint(1, 4)                                                                                                                                                                                
        await c_master.execute_command(f"EXPIRE tmp:{i} {rand} NX")                                                                                                                                                
                                                                                                                                                                                                                   
    seeder = StaticSeeder(key_target=100_000)                                                                                                                                                                      
    fill_task = asyncio.create_task(seeder.run(master.client()))                                                                                                                                                   
                                                                                                                                                                                                                   
    for replica in c_replicas:                                                                                                                                                                                     
        await replica.execute_command(f"REPLICAOF LOCALHOST {master.port}")                                                                                                                                        
                                                                                                                                                                                                                   
    async with async_timeout.timeout(240):                                                                                                                                                                         
        await wait_for_replicas_state(*c_replicas)                                                                                                                                                                 
                                                                                                                                                                                                                   
    await fill_task               

@kostasrim kostasrim added bug Something isn't working urgent Important issue that needs to be fixed asap important higher priority than the usual ongoing development tasks labels Mar 7, 2025
@kostasrim
Copy link
Contributor Author

@romange it's important + urgent. We trigger a check failed in json so something could be off with our mem tracking

@romange
Copy link
Collaborator

romange commented Mar 7, 2025

I see here a test and a bug. What should I understand from this? :)
Can you please explain why do you think it's important and urgent?

@kostasrim
Copy link
Contributor Author

Because check fails are hard crashes and can cause service disruption and I would like this fixed on the next version. I suspect we have a bug around memory tracking and I would like to avoid crashes in production

@kostasrim
Copy link
Contributor Author

If you still think it's not that important I am happy to remove the labels

@romange
Copy link
Collaborator

romange commented Mar 7, 2025

every crash bug is important but we estimate urgency based on empirical evidence whether this bug does really affect anything.

@kostasrim
Copy link
Contributor Author

gotcha, removing it then

@kostasrim kostasrim removed urgent Important issue that needs to be fixed asap important higher priority than the usual ongoing development tasks labels Mar 7, 2025
@adiholden adiholden added this to the v1.29 milestone Mar 12, 2025
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Mar 16, 2025
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Mar 16, 2025
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Mar 16, 2025
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants