[BUG] function CheckAndReportBinariesStatus cannot correctly check the number of processes when encountering symbolic link directory situation
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- go
- Lĩnh vực
- build-system, cli
Hướng nghiên cứu
Bắt đầu từ hàm init của package mageutil và theo dõi cách OpenIMRoot được CheckBinariesRunning sử dụng bên trong CheckAndReportBinariesStatus. Tái hiện hành vi bằng cách truy cập project thông qua một thư mục liên kết tượng trưng, sau đó xác minh rằng mage start phát hiện các process và mage stop có thể dừng chúng bằng path đã được phân giải.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
OpenIM Server Version
3.8.1
Operating System and CPU Architecture
macOS (ARM)
Deployment Method
Source Code Deployment
Bug Description and Steps to Reproduce
If the project's directory is included in a symbolic link directory, after running mage start in the OpenIM project, CheckBinariesRunning(in CheckAndReportBinariesStatus) cannot correctly check the number of processes. The reason is that in the init function of the mageutil module, the value of the OpenIMRoot variable is obtained via os.Getwd(), which may return a path containing symbolic links, rather than the actual file path. But the underlying implementation of CheckBinariesRunning is based on the proc_pidpath function in C, which retrieves the process path as the true file path (not symbolic link paths).
It will also make the "mage stop" not work to stop processes.
It is recommended to modify the package's init function
func init() {
currentDir, err := os.Getwd()
if err != nil {
panic("Error getting current directory: " + err.Error())
}
OpenIMRoot = currentDir
to
func init() {
currentDir, err := os.Getwd()
if err != nil {
panic("Error getting current directory: " + err.Error())
}
currentDir, err = filepath.EvalSymlinks(currentDir)
if err != nil {
panic("Error resolving symlinks in current directory: " + err.Error())
}
OpenIMRoot = currentDir
Screenshots Link
No response
- Ngôn ngữ chính
- Go
- Star
- 15
- Fork
- 31
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 openimsdk/gomake
Tất cả issue của openimsdk/gomake
Issue tương tự
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsCó thể đã có người làm @antcybersec đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
projectdiscovery/dsl#372 ·
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 68/100
JuliusBrussee/caveman#1449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openclaw/gogcli#1291 · 1 bình luận · 1 reaction ·
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 72/100
apache/arrow-swift#209 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(instrumentation/kafka-go): producer hook writes trace headers into the caller's messagesCó thể đã có người làm @Aryanbhargava18 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
open-telemetry/opentelemetry-go-compile-instrumentation#1669 ·
Maintainer thường phản hồi trong vòng 2 ngày