paramiko / paramiko/paramiko

Bad File descriptor on write

Open
#1,656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.9k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

I am working on connecting to a Nethack4 server and communicating with it with JSON commands (input to server through stdin, output of server stdout) through Paramiko.

Paramiko sends, and the server reads in the first command just fine, but when the server uses the c function "poll" it returns -1 with errno being 9:"Bad file descriptor". I'm guessing I'm the idiot, not paramiko, but I was hoping for some help. Neither end (my class nor the server) closes the file, which is what I saw in other issues.

The text file below is the python class that uses Paramiko (assume given host, port, key, etc is correct). The top half of the functions are the ones that actually utilize paramiko.
Interact.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the attached Interact.txt class and how it uses Paramiko to connect stdin and stdout to the Nethack4 server. Reproduce the first successful command followed by the server's poll failure with errno 9, then trace the descriptor lifecycle to determine what needs to change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.