Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HHVM CLI script hangs in vsdebug mode after uncaught exception, even with no debugger attached #8484

Closed
ianjhoffman opened this issue Apr 12, 2019 · 5 comments

Comments

@ianjhoffman
Copy link
Contributor

HHVM Version

$ hhvm --version
HipHop VM 3.30.3 (rel)
Compiler: remotes/origin/3.30.3-slack-0-g5a3df294bf9d921093eac96d93aff8f57b0779e9
Repo schema: fb5f31ec9856182de174e17a7439c92f221ad9a7
$ hh_client --version
hh--3.30.3 Mon Apr  1 17:25:31 2019

Operating System and Version

Ubuntu 16.04

$ uname -a
Linux <hostname_redacted> 4.4.0-1075-aws #85-Ubuntu SMP Thu Jan 17 17:15:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Standalone code, or other way to reproduce the problem

repro.php:

<?hh // strict

<<__EntryPoint>>
function vsdebug_repro_main(): void {
    throw new Exception("Ahh!");
}

Run with:

hhvm --mode vsdebug --vsDebugPort 8998 --vsDebugNoWait true repro.php

Actual result

$ hhvm --mode vsdebug --vsDebugPort 8998 --vsDebugNoWait true repro.php

Fatal error: Uncaught exception 'Exception' with message 'Ahh!' in <redacted>/repro.php:7
Stack trace:
#0 (): vsdebug_repro_main()
#1 {main}
![fatal] [Fri Apr 12 14:33:48 2019] Uncaught Exception: Ahh! in <redacted>/repro.php on line 7 (#vsdebug_repro_main())
^C

Hangs after the ![fatal] line even if no debugger is attached.

Expected result

The CLI script exits when encountering the fatal, at least if no debugger is attached.

@ebluestein
Copy link
Contributor

@enjmusic thanks for the report and the awesomely narrowed down repro case! I'm able to repro this and should have a fix in shortly.

@ianjhoffman
Copy link
Contributor Author

@ebluestein Just a clarification - is the way it's working expected behavior for CLI mode? I still wasn't totally sure whether this felt unintentional or not.

@ebluestein
Copy link
Contributor

No, the entire process should still exit cleanly when the script exits if run in CLI mode. There was a bug in the debugger shutdown path causing it to hang if no client was ever attached in this case.

@ianjhoffman
Copy link
Contributor Author

@ebluestein Just checking in, do you have an idea of which release of HHVM this fix will be in?

@fredemmott
Copy link
Contributor

Should be fixed by ed1731c , which was in 4.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants