rust-lang / rust-lang/libc

Panic at FD_SET

Open
#1,401 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request E-easy E-help-wanted
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

  • Platform: Linux dennis-thinkpad 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Info: When try to create more connections to a mysql server, panic at FD_SET.
  • Error:
panicked 'index out of bounds: the len is 16 but the index is 53' at 
"/root/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/libc-0.2.58/src/unix/notbsd/mod.rs:1177"

Contributor guide

Open the contributing guide

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 with src/unix/notbsd/mod.rs at line 1177 and reproduce the panic while creating additional MySQL connections on Linux. Trace how FD_SET handles the reported descriptor index and compare the behavior with the platform API expectations. Done means the reported connection scenario no longer panics and has a regression test or verified reproduction result.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, rust
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.