Redis legacy command path can terminate the process with SIGPIPE
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c, redis
- Domain
- backend-api-design
Research direction
Start in src/net/redis/cwist_redis.c at redis_send_all() (lines 121–136), then compare its send handling with the deadline-bounded implementation that uses CWIST_REDIS_NOSIGNAL and SO_NOSIGPIPE. Add regression coverage for normal cwist_redis_command*() and SUBSCRIBE calls with default SIGPIPE behavior when the peer resets the connection. Done means both calls return an error without terminating the process, while EINTR handling remains intact.
Written by the indexing model from the issue text.
Description
Affected: dev at bb2a33946.
redis_send_all() calls send(..., 0) (src/net/redis/cwist_redis.c:121-136). It is used by normal commands and SUBSCRIBE through redis_command_frame_tree() and send_command(). On POSIX, writing after the Redis peer resets or closes the connection can raise SIGPIPE and kill the entire server process instead of returning a CWIST error.
The deadline-bounded implementation already uses CWIST_REDIS_NOSIGNAL and configures SO_NOSIGPIPE where available, but the legacy path does not.
Expected: suppress SIGPIPE on every legacy send with MSG_NOSIGNAL or the platform socket option, preserve EINTR handling, and return an error. Add a default-SIGPIPE regression test where the peer resets the connection during a normal cwist_redis_command*() call and during SUBSCRIBE.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 5h 1m
- Merged PRs (30d)
- 197
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c4punks/CWIST
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
area/docs
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Clodmony/starship-coop#72 ·
Maintainers usually reply within 1 day
-
ospf6d: heap-use-after-free in seqnumber_mismatch()/bad_lsreq() when a neighbor is deleted with events pendingPossibly taken @lichenlang89 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
Maintainers usually reply within 2 days
-
5700模组网络优先级问题Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
luainkernel/lunatik#2372 ·
Maintainers usually reply within 1 day