[BUG] function CheckAndReportBinariesStatus cannot correctly check the number of processes when encountering symbolic link directory situation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- go
- Ambito
- build-system, cli
Direzione di ricerca
Inizia dalla funzione init del package mageutil e traccia come OpenIMRoot viene utilizzato da CheckBinariesRunning all'interno di CheckAndReportBinariesStatus. Riproduci il comportamento accedendo al progetto tramite una directory con collegamento simbolico, quindi verifica che mage start rilevi i processi e che mage stop possa arrestarli utilizzando il percorso risolto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 15
- Fork
- 31
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openimsdk/gomake
Tutte le issue di openimsdk/gomake
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
CycloneDX/cyclonedx-go#304 ·
-
[Bug]: snowflake_share fails to read a share attached to a listing with target accounts ('TARGETED ACCOUNTS' in the "to" column)Forse già presa @akhil9tiet l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
snowflakedb/terraform-provider-snowflake#5366 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
txn2/mcp-data-platform#2493 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(doctor): format MongoDB URI and UNIX socket addresses correctly in doctor diagnostic outputApertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oscarbol09/branchbase#178 ·
I maintainer di solito rispondono entro 4 giorni