Code review summary
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- backend, networking
Hướng nghiên cứu
Start by reviewing the listed pull requests and the sbt 1.13.x and 2.x impact notes; the issue names no source files or tests to begin with. It combines several outstanding fixes, follow-up dependencies, security concerns, and release work, so the intended scope and a single definition of done are unclear.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I asked Claude for a code review of this repo.
First, according to claude, this repo is mainly relevant for sbt 1.x
- sbt 1.13.x uses it for every server and client connection. JNI is the default on Apple Silicon, JNA everywhere else.
- sbt 2.x uses the JDK's own Unix domain sockets
sbt 2.x still bundles ipcsocket in sbtn for Windows, as the named pipe client for servers older than 2.1.0.
Both sbt 1.x and 2.x use ipcsocket from the 1.x branch; develop never shipped. Fixes need to be backported to 1.x where they apply.
PRs
| PR | Fix | Priority | Status |
|---|---|---|---|
| #96 | ForwardingSocketChannel ignored ByteBuffer position/limit (crash at end of stream, endless write loop) |
– (not in 1.x) |
merged |
| #97 | JNI: socket path longer than the system limit overwrote memory and crashed the JVM; array bounds | High | merged |
| #98 | Native library loaded from a predictable /tmp directory another local user could control |
Medium, security | merged |
| #99 | Unix socket closed itself at end of stream, so a response after shutdownOutput() was lost |
Medium, behavior change | merged |
| #100 | Closing a Windows named pipe socket leaked the pipe, two event handles and a TCP socket | High, behavior change | merged |
| #102 | JNA: a timed-out named pipe read kept writing into freed memory and lost data; a pending write could read freed memory | Medium (on 1.x only the write part applies) |
open |
| #103 | Closing sockets and server sockets: wake blocked threads, isBound/isClosed, close() during accept(), Windows close hang |
High | open |
| later | JNI named pipe read/write kept going after errors: hang when the peer closes, read timeout fails concurrent writes | Medium | needs #102 |
| later | JNA reported wrong Windows error codes | Low | needs #102 |
| later | Another program could take over the named pipe's name ("pipe squatting") | Medium, security | needs #103 |
| later | CI: run JNI tests with -Xcheck:jni, fail on warnings from ipcsocket's JNI code |
– | needs the JNI PR |
Impact on sbt 1.13.x
- sbt's server reads every connection with a 5 s timeout, but ipcsocket
1.xignores read timeouts, so the timeout bugs fixed by #102 and the JNI PR don't affect sbt. - sbt sets
sbt.ipcsocket.tmpdirto a directory as predictable as ipcsocket's default; #98 doesn't check it, so this is fixed in sbt (sbt/sbt#10009, sbt/sbt#10013). - On Apple Silicon (JNI), the thin client and BSP can't connect when the socket path has non-ASCII characters (#97). This comes from reading the code; it hasn't been reproduced.
- sbt's
BootServerSocketskipsclose()on Windows because it is "very slow"; that's the close hang fixed in #103, so sbt can drop the workaround. - With #99, sbt should check for -1 in
ReadJsonFromInputStream's body loop: a client disconnecting mid-message would otherwise make it spin.
Not fixed
- On Windows, a closed peer surfaces as an
IOExceptionfromread, not -1. Left alone because callers may depend on it. - Low priority: JNI string leaks, a fd leak when
bindfails in theUnixDomainServerSocketconstructor, no arm64 JNI library on Windows, a missing NULL check onCreateEvent, inefficientreadLine/readAll. - The bundled native binaries predate the recent C fixes; they need a rebuild before the next release.
- Ngôn ngữ chính
- Java
- Star
- 58
- Fork
- 20
- Merge trung bình
- 12 giờ 39 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sbt/ipcsocket
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
sbt/ipcsocket#75 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sbt/ipcsocket
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4654 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
commons-app/apps-android-commons#7486 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
easy first-contributor first-contributors good first issue help wanted kotlin up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
fork-commit-merge/fork-commit-merge#8752 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/fineract-consumer-facing#306 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
testng-team/testng#3672 ·
Maintainer thường phản hồi trong vòng 1 ngày