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

panic in compiler thread does not make deno crash #2097

Closed
ry opened this Issue Apr 11, 2019 · 0 comments

Comments

1 participant
@ry
Copy link
Collaborator

commented Apr 11, 2019

Apparently we are swallowing errors when the compile thread crashes.

Likely this is caused by Tokio's panic swallowing "feature"

test deno_dir::tests::test_get_source_code_4 ... ok
msg from main script hi
after postMessage
msg from main script exit
thread '
tokio-runtime-worker-0' panicked at 'called `Result::unwrap()` on an `Err` value: SpawnError { is_shutdown: true }', src\libcore\result.rs:997:5
stack backtrace:
   0:     0x7ff6317ef3cd - <unknown>
  
 1
: 
  
 
 0x
7ff6317f2858 - <unknown>
  
 
2: 
  
 
 
0x
7ff6317f24d0
 - <unknown>
  
 
3: 
 
 
 
 
0x
7ff6317f30df
 - <unknown>
  
 
4
:  
 
 
 
0x
7ff6317f2c13
 - 
<unknown>
  
 
5
: 
 
 
 
 
0x
7ff6317f2af8
 - 
<unknown>
  
 
6
: 
 
 
 
 
0x
7ff6318014fb
 - 
<unknown>
  
 
7
: 
 
 
 
 
0x
7ff6315afc5c
 - 
<unknown>
  
 
8
: 
 
 
 
 
0x
7ff631657737
 - 
<unknown>
  
 
9
: 
 
 
 
 
0x
7ff631659b93
 - 
<unknown>
  
10
: 
 
 
 
 
0x
7ff63166a206
 - 
<unknown>
  
11
: 
 
 
 
 
0x
7ff631691236
 - 
<unknown>
  
12
:     0x7ff6315feb53 - <unknown>
  13:     0x7ff63187a9cf - <unknown>
  14:    
 0x7ff6318658f4 - <unknown>
  15:     0x7ff6318c0b41 - <unknown>
  16:     0x7ff6318665fe - <unknown>
  17:     0x7ff6316c8a48 - <unknown>
  18:     0x7ff6316c81d0 - <unknown>
  19:     0x7ff6317a3322 - <unknown>
  20:     0x7ff63186a51e - <unknown>
  21:     0x7ff631869fb5 - <unknown>
  22:     0x7ff631870c67 - <unknown>
  23:     0x7ff6317a2a56 - <unknown>
  24
:     0x7ff6317a2244 - <unknown>
  25:     0x7ff631865436 - <unknown>
  26:     0x7ff63186584e - <unknown>
  27:     0x7ff6318c0b41 - <unknown>
  28:     0x7ff63175b380 - <unknown>
  29:     0x7ff6317fce84 - <unknown>
  30:     0x7ffca23f8363 - 
BaseThreadInitThunk
  31:     0x7ffca2ade850 - RtlUserThreadStart
test worker::tests::test_worker_messages ... ok

Likely the fix is to reintroduce this:

  std::panic::set_hook(Box::new(|panic_info| {
    eprintln!("{}", panic_info.to_string());
    std::process::abort();
  }));

@ry ry added the bug label Apr 11, 2019

ry added a commit to ry/deno that referenced this issue Apr 14, 2019

Fix silent error and add custom panic handler again
This is to work around Tokio's panic recovery feautre.
Ref tokio-rs/tokio#495
Ref tokio-rs/tokio#209
Ref denoland#1311
Fixes denoland#2097

ry added a commit to ry/deno that referenced this issue Apr 14, 2019

Fix silent error, add custom panic handler
This is to work around Tokio's panic recovery feature.
Ref tokio-rs/tokio#495
Ref tokio-rs/tokio#209
Ref denoland#1311
Fixes denoland#2097

ry added a commit to ry/deno that referenced this issue Apr 14, 2019

Fix silent error, add custom panic handler
This is to work around Tokio's panic recovery feature.
Ref tokio-rs/tokio#495
Ref tokio-rs/tokio#209
Ref denoland#1311
Fixes denoland#2097

@ry ry closed this in c7e1f8f Apr 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.