Skip to content

sometimes an ssl error takes down whole process #301

@SaulMoonves

Description

@SaulMoonves
[Error: SSL peer certificate or SSH remote key was not OK] {                                                                                                                                                         
  code: 60,                                                                                                                                                                                                                                   
  isCurlError: true                                                                                                                                                                                                                           
}                                                                                                                                                                                                                                             
node:events:371                                                                                                        
      throw er; // Unhandled 'error' event                                                                                                                                                                                                    
      ^                                                                                                                
                                                                                                                       
Error: 140530677868480:error:140E0197:SSL routines:SSL_shutdown:shutdown while in init:../deps/openssl/openssl/ssl/ssl_lib.c:2130:
                                                                                                                       
Emitted 'error' event on TLSSocket instance at:                                                                                                                                                                                               
    at TLSSocket._emitTLSError (node:_tls_wrap:900:10)                                                                                                                                                                                        
    at TLSWrap.onerror (node:_tls_wrap:432:11) {                                                                       
  library: 'SSL routines',                              
  function: 'SSL_shutdown', 
  reason: 'shutdown while in init',                                                                                    
  code: 'ERR_SSL_SHUTDOWN_WHILE_IN_INIT'                   
}

I'm using curly inside a node fork process. when this error happens it does something that terminates the IPC between child and parent. Doesn't seem catchable, all I can do is detect the process had an error in the parent process, then force exit it and spawn a replacement. that works about 99% of the time, sometimes it just hangs and I find the process stalled when I look at it later, but that might be a node thing.

Inside the child process I'm calling 4 promises with curly in them and using Promise.all on them.

I can provide any other info needed.

host system ubuntu 20.04 amd64
libcurl: 7.68.0-1ubuntu2.5
curl output:
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions