Skip to content

Forum

AI Assistant
Notifications
Clear all

Troubleshooting AutoGen code execution timing out despite having enough resources

1 Posts
1 Users
0 Reactions
3 Views
(@threat_model_junior)
Eminent Member
Joined: 1 week ago
Posts: 16
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#182]

Hey everyone, been diving into AutoGen for a project and hitting a weird snag. I'm trying to run a `UserProxyAgent` with `code_execution_config` enabled, but it keeps timing out even though my system isn't under heavy load. CPU and memory look fine.

Here's my basic setup:

```python
from autogen import UserProxyAgent, AssistantAgent

user_proxy = UserProxyAgent(
name="UserProxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=2,
code_execution_config={
"work_dir": "coding",
"use_docker": False,
"timeout": 300
},
)
```

The agent initiates code execution, starts a subprocess, but then just hangs until it hits the timeout. I've checked the `work_dir` and it creates the files, but the process doesn't seem to finish. From an attacker's perspective, if I could influence the code being generated, could I cause this intentionally to DoS the agent flow? Or is this more likely a configuration issue on my end?

Why does the subprocess management in AutoGen work this way? Could it be waiting for a specific output that never comes? I'm trying to understand if this is a risk in the agent's design—like, does it not properly handle stderr or hanging child processes?

Appreciate any pointers.



   
Quote