Cannot fit name [.../sbt-load.sock] in maximum unix domain socket length
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Tái hiện lỗi bằng lệnh sbt được hiển thị và một java.io.tmpdir dài, sau đó theo dõi cách đường dẫn socket được chọn và cách exception trở thành ServerAlreadyBootingException. Issue không nêu tệp mã nguồn hoặc test nào, và vẫn cần xác nhận hành vi mong đợi giữa fallback và lỗi; công việc được coi là hoàn tất khi có cách xử lý rõ ràng, được thống nhất cho các đường dẫn vượt quá giới hạn của Unix socket.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
steps
- create an sbt build with a medium deeply-nested folder structure
- try to run a simple command with
java.io.tmpdirset to the base folder of the build
In our case it ends up being something like
sbt -Djava.io.tmpdir=/var/lib/jenkins/workspace/some-very-long-branch-name/target/tmp clean
problem
The above command produces the following error message:
sbt thinks that server is already booting because of this exception:
sbt.internal.ServerAlreadyBootingException: java.io.IOException: org.scalasbt.ipcsocket.NativeErrorException: Cannot fit name [/var/lib/jenkins/workspace/some-very-long-branch-name/target/tmp/.sbt/sbt-socket8737049473820614565/sbt-load.sock] in maximum unix domain socket length
I think the issue is caused by sbt/sbt#6887 - although we don't set XDG_RUNTIME_DIR explicitly, I wonder if the code is somehow falling back to java.io.tmpdir.
There is a secondary issue that the error message is slightly misleading ("sbt thinks that the server is already booting") - would it be possible to separate out "the lock file already exists" from other cases such as this one? (I guess the same issue would happen if e.g. the current user didn't have permission to create the lock file in the given location).
expectation
Not sure what the expected behaviour is here. I see there's some discussion on sbt/sbt#7013 about always (?) using /tmp instead, which would be preferable since the socket name is then guaranteed to always be short enough.
Alternatively sbt could pre-check the proposed socket name length (or catch the exception?) and handle it gracefully - either by falling back to /tmp or else giving a helpful error message?
notes
We can work around the issue by also explicitly setting XDG_RUNTIME_DIR to something shorter (e.g. a known folder under /tmp) but this is mildly annoying since we'd ideally like to have a single temp directory under our build Jenkins workspace folder.
- 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
-
Code review summaryĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
sbt/ipcsocket#101 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ 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
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