Skip to content

doc: os.uptime() temporary bug notice - #36503

Closed
schamberg97 wants to merge 6 commits into
nodejs:masterfrom
schamberg97:master
Closed

doc: os.uptime() temporary bug notice#36503
schamberg97 wants to merge 6 commits into
nodejs:masterfrom
schamberg97:master

Conversation

@schamberg97

Copy link
Copy Markdown
Contributor
Checklist

This commit makes it clear that os.uptime() is currently unreliable in some virtualization cases, until libuv/libuv#3068 is resolved (and thus #36244). At least one member of Node.js (@benjamingr) in the aforementioned issue appears to be in favour of at least a temporary notice, until the issue is resolved by libuv.

However, since similar issues may reappear in the future with the evolution of virtualization technology, I believe it is prudent to leave a permanent notice on os.uptime() doc, so perhaps it is also worth to consider.

Makes it clear that os.uptime() is unreliable in some virtualization cases.
@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. os Issues and PRs related to the os subsystem. labels Dec 13, 2020
@schamberg97schamberg97 changed the title os.uptime() temporary bug noticedoc: os.uptime() temporary bug noticeDec 13, 2020
@mscdex

Copy link
Copy Markdown
Contributor

This seems unnecessary given the linked libuv issue was created only 2 hours ago. Is there any indication that libuv won't fix this in a reasonable amount of time?

@schamberg97

Copy link
Copy Markdown
ContributorAuthor

This seems unnecessary given the linked libuv issue was created only 2 hours ago. Is there any indication that libuv won't fix this in a reasonable amount of time?

In my belief, libuv maintainers may need to spend some time coming to a decision on how best to resolve the issue. I am just unsure how much time it may require. But perhaps you are right, in which case this PR should probably remain open without any further action until there is better understanding of how things develop.

Comment threaddoc/api/os.md Outdated
Comment threaddoc/api/os.md Outdated
Please be aware that the value returned can be inaccurate in some
rare virtualization cases. The issue arises when the virtualized
guest instance shares the kernel with the host system due to a bug
in libuv. `os.uptime()` may thus provide the host's uptime instead of guest's.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this sentence is worded it implies that the bug in libuv is what is responsible for the guest instance sharing the kernel with the host system.

schamberg97and others added 2 commits December 14, 2020 20:06
Rewording
Co-authored-by: Benjamin Gruenbaum <inglor@gmail.com>
Comment threaddoc/api/os.md Outdated
Comment threaddoc/api/os.md Outdated
schamberg97and others added 2 commits December 19, 2020 16:22
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
@schamberg97

Copy link
Copy Markdown
ContributorAuthor

@Trott thanks for review 😊 I am unfortunately always absent-minded about linting markdown. Gotta do something about it 🤓

@schamberg97

schamberg97 commented Dec 19, 2020

Copy link
Copy Markdown
ContributorAuthor

Regarding the PR, despite some opinions to the contrary, I still think it needs to be accepted, because libuv guys seem to be somewhat slow with reviewing the fix, perhaps due to the season 😇 But hopefully it’ll be resolved soon

jasnell pushed a commit that referenced this pull request Jan 9, 2021
Makes it clear that os.uptime() is unreliable in some virtualization
cases.
PR-URL: #36503
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in b9ffb82

@jasnelljasnell closed this Jan 9, 2021
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
Makes it clear that os.uptime() is unreliable in some virtualization
cases.
PR-URL: #36503
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@danielleadamsdanielleadams mentioned this pull request Jan 12, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.osIssues and PRs related to the os subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@schamberg97@mscdex@jasnell@fhinkel@Trott@benjamingr@gireeshpunathil@targos@nodejs-github-bot