Skip to content

ensure preload modules are always preloaded - #2253

Closed
bmeck wants to merge 1 commit into
nodejs:masterfrom
bmeck:preload-always
Closed

ensure preload modules are always preloaded#2253
bmeck wants to merge 1 commit into
nodejs:masterfrom
bmeck:preload-always

Conversation

@bmeck

Copy link
Copy Markdown
Member

For consistency -r/--require should always preload modules; right now it works with normal startup, cluster, and eval; having preloading work with stdin and interactive mode would make this more consistent.

@thefourtheyethefourtheye added the module Issues and PRs related to the module subsystem. label Jul 27, 2015
@thefourtheye

Copy link
Copy Markdown
Contributor

Will it have impact on startup time?

@Fishrock123

Copy link
Copy Markdown
Contributor

Will it have impact on startup time?

No not really.

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thefourtheye only when the flag is enabled, otherwise we are looking at a few integer checks for preloaded_module_count

@Fishrock123

Copy link
Copy Markdown
Contributor

@Fishrock123

Copy link
Copy Markdown
Contributor

Test is failing on smartos-14 (32 and 64bit):

not ok 535 - test-preload.js
# # assert.js:89
# throw new assert.AssertionError({
# ^
# AssertionError: '' == 'A\nhello\n'
# at ChildProcess.<anonymous> (/home/iojs/build/workspace/iojs+pr+other/nodes/smartos14-64/test/parallel/test-preload.js:78:10)
# at emitTwo (events.js:87:13)
# at ChildProcess.emit (events.js:172:7)
# at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

@bmeck

Copy link
Copy Markdown
MemberAuthor

@Fishrock123 even without this patch it should never be empty... that is... concerning

@Fishrock123

Copy link
Copy Markdown
Contributor

cc @nodejs/platform-solaris

@bmeck

Copy link
Copy Markdown
MemberAuthor

is there a person I can talk to about this, as I don't run SmartOS normally, and am completely lost as to how it could be empty/worked prior to this.

@Fishrock123

Copy link
Copy Markdown
Contributor

cc @jbergstroem / @misterdjules again

@Fishrock123

Copy link
Copy Markdown
Contributor

@Fishrock123

Copy link
Copy Markdown
Contributor

Seems fine to me. @bmeck how do you feel about just ignoring it on smartos?

@thefourtheye

Copy link
Copy Markdown
Contributor

The commit message is too long and commit log has to be improved.

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thefourtheye improved how

Comment threadtest/parallel/test-preload.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we'd prefer if you only const unmodified variables you add, but if you want to do these also I really don't mind.

@Fishrock123

Copy link
Copy Markdown
Contributor

LGTM otherwise, I'll just add some detail to the commit description if you don't. :)

@jbergstroem

Copy link
Copy Markdown
Member

I can reproduce this fail but haven't had time to look into it. Would appreciate if @misterdjules had a moment.

@bmeck

Copy link
Copy Markdown
MemberAuthor

rebased. uses camelcase now. repro'd fail on smartos, trying to reduce it

@bmeck

Copy link
Copy Markdown
MemberAuthor

@nodejs/platform-solaris i am unsure how to test this exactly, but is closing stdin before it is fully drained dropping the content on smartos?

@rvagg

Copy link
Copy Markdown
Member

ping @No9, perhaps you can lend an eye to this one since you're an Illumos user?

@jbergstroem

Copy link
Copy Markdown
Member

If anyone else is using illumos/smartos and would like to help out reviewing that'd be great!

@rvagg

Copy link
Copy Markdown
Member

also would love to additional people to @nodejs/platform-solaris if there are any

@No9

No9 commented Sep 11, 2015

Copy link
Copy Markdown
Member

@rvagg I'll look in over the weekend

@jbergstroem

Copy link
Copy Markdown
Member

@No9 would you be interested in being part of the small team of people that (in my case, at least tries to) debugs sunos stuff?

@No9

No9 commented Sep 11, 2015

Copy link
Copy Markdown
Member

@jbergstroem Thanks for asking
Yes I would :)

@rvagg

Copy link
Copy Markdown
Member

added to @nodejs/platform-solaris, thanks @No9!

@Fishrock123

Copy link
Copy Markdown
Contributor

ping @bmeck

@Fishrock123

Copy link
Copy Markdown
Contributor

CI: https://ci.nodejs.org/job/node-test-pull-request/2582/

I'm also testing github statues here, see #6674 for more info but please ignore it as it may be incorrect.

Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 11, 2016
This test fails on Solaris, see the PR for discussion.
PR-URL: nodejs#2253
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@Fishrock123

Copy link
Copy Markdown
Contributor

Landed with some nits in 41a063f

(Changed the Skip check to use common.isSunOS)

CI ensuring the nits still work: https://ci.nodejs.org/job/node-test-commit-smartos/2435/

@Fishrock123

Copy link
Copy Markdown
Contributor

Hmm, just got this on my OS X

=== release test-preload === Path: parallel/test-preload
assert.js:90
throw new assert.AssertionError({
^
AssertionError: '' == 'A\nhello\n'
at ChildProcess.<anonymous> (/Users/Jeremiah/Documents/node/test/parallel/test-preload.js:86:10)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
Command: out/Release/node /Users/Jeremiah/Documents/node/test/parallel/test-preload.js

@bmeck

Copy link
Copy Markdown
MemberAuthor

Passed here. Reproducible?
On May 11, 2016 2:31 PM, "Jeremiah Senkpiel" notifications@github.com
wrote:

Hmm, just got this on my OS X

=== release test-preload ===
Path: parallel/test-preload
assert.js:90
throw new assert.AssertionError({
^
AssertionError: '' == 'A\nhello\n'
at ChildProcess. (/Users/Jeremiah/Documents/node/test/parallel/test-preload.js:86:10)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
Command: out/Release/node /Users/Jeremiah/Documents/node/test/parallel/test-preload.js


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#2253 (comment)

@Fishrock123

Copy link
Copy Markdown
Contributor

Strange, it happened as part of #6697, but I din't touch any of those parts of the test. I can't reproduce while looking the test either.

@mhdawson

Copy link
Copy Markdown
Member

Failed on AIX in last night's run as well #6716

@bmeck

Copy link
Copy Markdown
MemberAuthor

This is starting to look like some sort of race condition

@mhdawson

Copy link
Copy Markdown
Member

@bmeck@Fishrock123 on AIX it looks like a consistent failure. If it helps I can give one or both of you access to run on that machine.

@Fishrock123

Copy link
Copy Markdown
Contributor

We should also skip on AIX for now then, but we do need to investigate more.

@Fishrock123Fishrock123 mentioned this pull request May 12, 2016
2 tasks
evanlucas pushed a commit that referenced this pull request May 17, 2016
This test fails on Solaris, see the PR for discussion.
PR-URL: #2253
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

@bmeck looks like there are some regressions here. Adding dont-land for now, but please feel free to open a PR against v4.x-staging if this should be packported

@Fishrock123

Copy link
Copy Markdown
Contributor

@thealphanerd No, those are just the result of other issues.

this should be fine if it lands with #6728

@MylesBorins

Copy link
Copy Markdown
Contributor

thanks @Fishrock123 will work on that later today

@MylesBorins

Copy link
Copy Markdown
Contributor

@bmeck would you be willing to do a manual backport of this and #6728 ?

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thealphanerd onto v4?

@MylesBorins

Copy link
Copy Markdown
Contributor

indeed. It is not landing cleanly

@MylesBorins

Copy link
Copy Markdown
Contributor

ping @bmeck

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thealphanerd backported against v4.5.0 (no staging exists right now?) on https://github.com/bmeck/node/tree/backport-2253 , still flaky it seems after running tests

@MylesBorins

Copy link
Copy Markdown
Contributor

the staging is v4.x-staging

If it is still flaky then perhaps we should just mark this don't land?

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thealphanerd these are just adding tests for expected behavior, if we don't want to land it thats fine

@MylesBorins

Copy link
Copy Markdown
Contributor

@bmeck if that is the case then we should land it. Would you be willing to open a PR?

@bmeck

Copy link
Copy Markdown
MemberAuthor

@thealphanerd#8340

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

moduleIssues and PRs related to the module subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@bmeck@thefourtheye@Fishrock123@jbergstroem@rvagg@No9@jasnell@evanlucas@mhdawson@MylesBorins