-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.9
What operating system and processor architecture are you using (go env)?
SuSE
What did you do?
When i use exec.Command("cat", "/proc/uptime") in my programe, i found that there is a memory leak in this call. The memory used by program goes high after 2 hours from initial 20MB to 105MB and increasing continuously unless i restart the programe. The code as below.
func GetSecondFromSystemStart() int {
out, err := exec.Command("cat", "/proc/uptime").Output()
if(err != nil){
logger.ErrorLog(MODULE_NAME, "get time from start fail:%s", err.Error())
}else{
vTimeString := strings.Split(string(out), ".")
if(len(vTimeString) == 0){
logger.ErrorLog(MODULE_NAME, "get time from start fail")
}else{
sed, e := strconv.Atoi(vTimeString[0])
if(e != nil){
logger.ErrorLog(MODULE_NAME, "get time from start fail:%s", e.Error())
}else{
logger.DebugLog(MODULE_NAME, "get time from start:%d", sed)
return sed
}
}
}
return 0
}
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.