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

[Bug]: Runtime CmdRun timeout issue. Command execution failed: {"detail":"invalid literal for int() with base 10: \'echo\'"} #4158

Closed
2 tasks done
xingyaoww opened this issue Oct 2, 2024 · 0 comments · Fixed by #4161
Assignees
Labels
bug Something isn't working severity:low Minor issues or affecting single user

Comments

@xingyaoww
Copy link
Collaborator

Is there an existing issue for the same bug?

Describe the bug

Sometime cmd execution will get error like this:

02:51:33 - ACTION
**CmdRunAction (source=EventSource.AGENT)**
THOUGHT: I will run the development server again in the background to test the autoreloader:
COMMAND:
python ./tests/i18n/sampleproject/manage.py runserver > server.log 2>&1 &
02:51:33 - openhands:INFO: runtime.py:411 - Awaiting session
02:51:33 - openhands:INFO: runtime.py:304 -
-----------------------------------Container logs:-----------------------------------
    |INFO:     172.17.0.1:33556 - "GET /alive HTTP/1.1" 200 OK
    |02:51:32 - openhands:ERROR: client.py:343 - Failed to execute command. Error: Timeout exceeded.
    |<pexpect.pty_spawn.spawn object at 0x7fc4c833d610>                                                                                          |command: /usr/bin/su
    |args: [b'/usr/bin/su', b'root']
    |buffer (last 100 chars): ".settings'\r\nStarting development server at http://127.0.0.1:8000/\r\nQuit the server with CONTROL-C.\r\n"
    |before (last 100 chars): ".settings'\r\nStarting development server at http://127.0.0.1:8000/\r\nQuit the server with CONTROL-C.\r\n"
    |after: <class 'pexpect.exceptions.TIMEOUT'>
    |match: None
    |match_index: None
    |exitstatus: None
    |flag_eof: False
    |pid: 55
    |child_fd: 8
    |closed: False
    |timeout: 30
    |delimiter: <class 'pexpect.exceptions.EOF'>
    |logfile: None
    |logfile_read: None
    |logfile_send: None
    |maxread: 2000
    |ignorecase: False
    |searchwindowsize: None
    |delaybeforesend: 0.05
    |delayafterclose: 0.1
    |delayafterterminate: 0.1
    |searcher: searcher_re:
    |    0: re.compile('\\[PEXPECT_BEGIN\\]\\s*(.*?)\\s*([a-z0-9_-]*)@([a-zA-Z0-9.-]*):(.+)\\s*\\[PEXPECT_END\\]')
--------------------------------------------------------------------------------
02:51:33 - openhands:ERROR: runtime.py:430 - Error from server: {"detail":"invalid literal for int() with base 10: 'echo'"}
02:51:33 - OBSERVATION
ErrorObservation(content='Command execution failed: {"detail":"invalid literal for int() with base 10: \'echo\'"}', observation='error')

We should write a test case try to reproduce it, and then fix it.

Current OpenHands version

branch eval/24-sep

Installation and Configuration

make build

Model and Agent

No response

Operating System

No response

Reproduction Steps

No response

Logs, Errors, Screenshots, and Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working severity:low Minor issues or affecting single user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants