Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Debugger: Fix crash when accessing process.env from WebStorm #7517

Closed
wants to merge 1 commit into from
Closed

Debugger: Fix crash when accessing process.env from WebStorm #7517

wants to merge 1 commit into from

Conversation

refack
Copy link
Contributor

@refack refack commented Apr 26, 2014

I fixed the crash, but I haven't figured out what's the situation that causes env to be corrupt.
AFAICT is not made redundant by #7512

@Nodejs-Jenkins
Copy link

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

Commit refack/node@789ac96 has the following error(s):

  • First line of commit message must be no longer than 50 characters

The following commiters were not found in the CLA:

  • Refael Ackermann

You can fix all these things without opening another issue.

Please see CONTRIBUTING.md for more information

@indutny
Copy link
Member

indutny commented Apr 26, 2014

Could you please describe, what sort of crash are you getting? Do you have a back trace?

Could you obtain a core dump with ulimit -c unlimited ?

@refack
Copy link
Contributor Author

refack commented Apr 27, 2014

I have been testing on windows so here's a dmp file .

reproduction steps:
run node with node --debug-brk
run another node to attach as debugger

$node debug localhost
> repl
> process.env
program terminated
program terminated

@refack
Copy link
Contributor Author

refack commented Apr 27, 2014

here's a nice core from ubuntu
BTW: both dumps were made by node build from the HEAD to the repos

@indutny
Copy link
Member

indutny commented Apr 27, 2014

Oh, thanks for the instructions! :)

indutny added a commit to indutny/node that referenced this pull request Apr 27, 2014
indutny added a commit to indutny/node that referenced this pull request Apr 27, 2014
@indutny
Copy link
Member

indutny commented Apr 27, 2014

Thanks for the fix, but unfortunately it doesn't fix the source of the problem. Could you please give a try to: #7519 ?

@refack refack closed this Apr 27, 2014
@refack
Copy link
Contributor Author

refack commented Apr 27, 2014

No more crash, but the output is lacking values:

{ TERM: undefined,
  SHELL: undefined,
  XDG_SESSION_COOKIE: undefined,
  SSH_CLIENT: undefined,
  SSH_TTY: undefined,
  USER: undefined,
  LS_COLORS: undefined,
  MAIL: undefined,
  PATH: undefined,
  PWD: undefined,
  LANG: undefined,
  NODE_PATH: undefined,
  SHLVL: undefined,
  HOME: undefined,
  LOGNAME: undefined,
  SSH_CONNECTION: undefined,
  LESSOPEN: undefined,
  LESSCLOSE: undefined,
  OLDPWD: undefined,
  _: undefined }

P.S. How come EnvGetter:2258 worked (supposedly using the same env)?

@indutny
Copy link
Member

indutny commented Apr 27, 2014

EnvGetter worked because it was executed by the js runtime, not a debugger runtime. Regarding undefined, I don't know the answer yet, but it seems to be the same with v0.10... Guess this is a mirroring problem in v8.

@indutny
Copy link
Member

indutny commented Apr 27, 2014

Could you please open an issue for it?

indutny added a commit that referenced this pull request May 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants