theia-ide / yangster-electron

Bundled Yangster electron application
Apache License 2.0
118 stars 32 forks source link

Tons of stale Yangster Helper processes run after quitting the application #17

Open kittaakos opened 6 years ago

kittaakos commented 6 years ago

Although it does not affect the CPU, it would be nice to terminate the process:

screen shot 2017-11-10 at 09 48 25
kittaakos commented 6 years ago

This can be reproduced easily. Start the Yangster application. One can see that there is the main process with four helpers:

screen shot 2017-11-14 at 16 57 23

After terminating the Yangster application with Cmd+Q on OS X. There are two stale processes:

screen shot 2017-11-14 at 16 57 41

As of my first guess, it could be related to the issue we load the main.js two times.

kittaakos commented 6 years ago

The sample of one of the processes. The first one does not have a parent process. Parent process:

cwd
/
txt
/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper
txt
/Applications/Yangster.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel
txt
/Applications/Yangster.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa
txt
/Applications/Yangster.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib
txt
/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
txt
/System/Library/Frameworks/SafariServices.framework/Versions/A/SafariServices
txt
/usr/lib/libexpat.1.dylib
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin
txt
/usr/lib/dyld
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin
txt
/usr/share/icu/icudt57l.dat
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat
txt
/private/var/db/dyld/dyld_shared_cache_x86_64h
0
/dev/null
1
/dev/null
2
/dev/null
4
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin
5
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin
6
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat
7
->0x6116629f731075c3
8
->0x6116629f73108283
9
count=0, state=0xa
10
->0x6116629f73108343
11
->0x6116629f73107443
12
->0x6116629f73105703
13
->0x6116629f73106d83
14
/Applications/Yangster.app/Contents/Resources/electron.asar
15
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/en.lproj/locale.pak
16
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/content_shell.pak
17
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/pdf_viewer_resources.pak
18
->0x6116629f73108403
19
->0x6116629f73106c03
20
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin
21
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin
22
/dev/urandom
23
->0x6116629f73105e83
24
->0x6116629f73107e03
25
/dev/null
26
/
27
/private/etc
28
/private/etc/hosts
29
->0x6116629f8c2e79d3
30
localhost:58297
39
->(none)
40
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
41
/System/Library/Frameworks/CoreImage.framework/ci_kernels.metallib
42
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/libraries.maps
43
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/libraries.data
44
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/Intel(R) HD Graphics 530/functions.maps
45
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/Intel(R) HD Graphics 530/functions.data

And the second one, which is the child process of the previous one: Child process:

cwd
/
txt
/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
txt
/Applications/Yangster.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel
txt
/Applications/Yangster.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa
txt
/Applications/Yangster.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib
txt
/System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
txt
/System/Library/Frameworks/SafariServices.framework/Versions/A/SafariServices
txt
/usr/lib/libexpat.1.dylib
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin
txt
/Applications/Yangster.app/Contents/Resources/app/node_modules/node-pty/build/Release/pty.node
txt
/usr/share/icu/icudt57l.dat
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat
txt
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin
txt
/usr/lib/dyld
txt
/private/var/db/dyld/dyld_shared_cache_x86_64h
0
/dev/null
1
/dev/null
2
/dev/null
3
->0x6116629f8c2e6d53
4
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/icudtl.dat
5
->0x6116629f73106843
6
->0x6116629f73107c83
7
count=0, state=0xa
8
->0x6116629f73107803
9
->0x6116629f731081c3
10
->0x6116629f73106cc3
11
->0x6116629f73107203
12
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/snapshot_blob.bin
13
/Applications/Yangster.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/natives_blob.bin
14
/dev/urandom
15
/dev/null
16
17
->0x6116629f8c2e92d3
26
/
27
/private/etc
28
/private/etc/hosts
39
->(none)
40
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
41
/System/Library/Frameworks/CoreImage.framework/ci_kernels.metallib
42
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/libraries.maps
43
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/libraries.data
44
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/Intel(R) HD Graphics 530/functions.maps
45
/private/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/C/theia.yangster/com.apple.metal/Intel(R) HD Graphics 530/functions.data
kittaakos commented 6 years ago

Just to make sure, I try to reproduce it on another Mac too.

kittaakos commented 6 years ago

Confirmed. Same issue on 10.13.1, MacOS High Sierra.

kittaakos commented 6 years ago

I am still just blindly guessing though, I have compared the processes that load the main.js in the Electron version.

First process:

{
     title: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     version: 'v7.9.0',
     moduleLoadList:
      [ 'Binding contextify',
        'Binding natives',
        'NativeModule events',
        'Binding config',
        'NativeModule util',
        'Binding uv',
        'NativeModule buffer',
        'Binding buffer',
        'Binding util',
        'NativeModule internal/util',
        'NativeModule internal/buffer',
        'NativeModule timers',
        'Binding timer_wrap',
        'NativeModule internal/linkedlist',
        'NativeModule assert',
        'Binding atom_common_asar',
        'NativeModule ELECTRON_ASAR',
        'NativeModule child_process',
        'Binding constants',
        'Binding spawn_sync',
        'Binding pipe_wrap',
        'NativeModule internal/child_process',
        'NativeModule string_decoder',
        'NativeModule net',
        'NativeModule stream',
        'NativeModule internal/streams/legacy',
        'NativeModule _stream_readable',
        'NativeModule internal/streams/BufferList',
        'NativeModule _stream_writable',
        'NativeModule _stream_duplex',
        'NativeModule _stream_transform',
        'NativeModule _stream_passthrough',
        'NativeModule internal/net',
        'Binding cares_wrap',
        'Binding tty_wrap',
        'Binding tcp_wrap',
        'Binding stream_wrap',
        'NativeModule dgram',
        'Binding udp_wrap',
        'Binding process_wrap',
        'NativeModule internal/socket_list',
        'NativeModule path',
        'NativeModule fs',
        'Binding fs',
        'Binding fs_event_wrap',
        'NativeModule internal/fs',
        'NativeModule internal/url',
        'NativeModule internal/querystring',
        'Binding url',
        'NativeModule querystring',
        'NativeModule os',
        'Binding os',
        'NativeModule module',
        'NativeModule internal/module',
        'NativeModule vm',
        'NativeModule internal/process',
        'NativeModule internal/process/warning',
        'NativeModule internal/process/next_tick',
        'NativeModule internal/process/promises',
        'NativeModule internal/process/stdio',
        'NativeModule cluster',
        'NativeModule internal/cluster/child',
        'NativeModule internal/cluster/worker',
        'NativeModule internal/cluster/utils',
        'NativeModule console',
        'NativeModule tty',
        'Binding signal_wrap' ],
     versions:
      { http_parser: '2.7.0',
        node: '7.9.0',
        v8: '5.8.283.38',
        uv: '1.11.0',
        zlib: '1.2.11',
        ares: '1.10.1-DEV',
        modules: '54',
        openssl: '1.0.2k' },
     arch: 'x64',
     platform: 'darwin',
     release:
      { name: 'node',
        sourceUrl: 'https://atom.io/download/electronv7.9.0/node-v7.9.0.tar.gz',
        headersUrl: 'https://atom.io/download/electronv7.9.0/node-v7.9.0-headers.tar.gz' },
     argv:
      [ '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
        '/Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main' ],
     execArgv: [],
     env:
      { LC_NUMERIC: 'C',
        _: './Yangster',
        OLDPWD: '/Applications/Yangster.app/Contents',
        VSCODE_NODE_CACHED_DATA_DIR_8267: '/Users/akos.kitta/Library/Application Support/Code/CachedData/dcee2202709a4f223185514b9275aa4229841aa7',
        VSCODE_PID: '8267',
        NVM_BIN: '/Users/akos.kitta/.nvm/versions/node/v8.8.0/bin',
        VSCODE_IPC_HOOK: '/Users/akos.kitta/Library/Application Support/Code/1.18.0-main.sock',
        LOGNAME: 'akos.kitta',
        VSCODE_NLS_CONFIG: '{"locale":"en-us","availableLanguages":{}}',
        HOME: '/Users/akos.kitta',
        SHLVL: '3',
        XPC_SERVICE_NAME: '0',
        XPC_FLAGS: '0x0',
        LANG: 'en_US.UTF-8',
        ELECTRON_NO_ATTACH_CONSOLE: '1',
        PWD: '/Applications/Yangster.app/Contents/MacOS',
        PATH: '/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/akos.kitta/.nvm/versions/node/v8.8.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin',
        GOOGLE_API_KEY: 'AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q',
        __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0',
        SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.1zYguUNwbH/Listeners',
        USER: 'akos.kitta',
        NVM_DIR: '/Users/akos.kitta/.nvm',
        TERM_SESSION_ID: 'DEE68C3D-6044-42A6-8B57-B5CB386865C5',
        TERM_PROGRAM_VERSION: '1.18.0',
        Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.cVfDfT7VB9/Render',
        TMPDIR: '/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/T/',
        TERM: 'xterm-256color',
        SHELL: '/bin/bash',
        NVM_CD_FLAGS: '',
        TERM_PROGRAM: 'vscode',
        VSCODE_CLI: '1',
        ELECTRON_RUN_AS_NODE: '1' },
     pid: 8972,
     features:
      { debug: false,
        uv: true,
        ipv6: true,
        tls_npn: true,
        tls_alpn: true,
        tls_sni: true,
        tls_ocsp: true,
        tls: true },
     _needImmediateCallback: false,
     execPath: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     debugPort: 5858,
     _startProfilerIdleNotifier: [Function: _startProfilerIdleNotifier],
     _stopProfilerIdleNotifier: [Function: _stopProfilerIdleNotifier],
     _getActiveRequests: [Function: _getActiveRequests],
     _getActiveHandles: [Function: _getActiveHandles],
     reallyExit: [Function: reallyExit],
     abort: [Function: abort],
     chdir: [Function: chdir],
     cwd: [Function: cwd],
     umask: [Function: umask],
     getuid: [Function: getuid],
     geteuid: [Function: geteuid],
     setuid: [Function: setuid],
     seteuid: [Function: seteuid],
     setgid: [Function: setgid],
     setegid: [Function: setegid],
     getgid: [Function: getgid],
     getegid: [Function: getegid],
     getgroups: [Function: getgroups],
     setgroups: [Function: setgroups],
     initgroups: [Function: initgroups],
     _kill: [Function: _kill],
     _debugProcess: [Function: _debugProcess],
     _debugPause: [Function: _debugPause],
     _debugEnd: [Function: _debugEnd],
     hrtime: [Function: hrtime],
     cpuUsage: [Function: cpuUsage],
     dlopen: [Function],
     uptime: [Function: uptime],
     memoryUsage: [Function: memoryUsage],
     binding: [Function: binding],
     _linkedBinding: [Function: _linkedBinding],
     _setupDomainUse: [Function: _setupDomainUse],
     _events:
      { exit: [Function],
        warning: [Function],
        newListener: [Object],
        removeListener: [Object],
        internalMessage: [Object],
        error: [Function],
        message: [Function],
        disconnect: [Object],
        SIGWINCH: [Object] },
     crash: [Function],
     crashReporter: { start: [Function] },
     _rawDebug: [Function],
     _eventsCount: 9,
     domain: null,
     _maxListeners: undefined,
     NativeModule:
      { [Function: NativeModule]
        _source: [Object],
        _cache: [Object],
        require: [Function],
        getCached: [Function],
        exists: [Function],
        nonInternalExists: [Function],
        isInternal: [Function],
        getSource: [Function],
        wrap: [Function],
        wrapper: [Object] },
     _fatalException: [Function],
     _exiting: false,
     assert: [Function],
     config: { variables: {} },
     emitWarning: [Function],
     nextTick: [Function: nextTick],
     _tickCallback: [Function: _tickCallback],
     _tickDomainCallback: [Function: _tickDomainCallback],
     stdout: [Getter],
     stderr: [Getter],
     stdin: [Getter],
     openStdin: [Function],
     exit: [Function],
     kill: [Function],
     channel:
      Pipe {
        bytesRead: 0,
        _externalStream: {},
        fd: 3,
        writeQueueSize: 0,
        buffering: false,
        onread: [Function],
        sockets: [Object] },
     _channel: [Getter/Setter],
     _handleQueue: null,
     _pendingHandle: null,
     send: [Function],
     _send: [Function],
     connected: true,
     disconnect: [Function],
     _disconnect: [Function],
     argv0: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     mainModule:
      Module {
        id: '.',
        exports: {},
        parent: null,
        filename: '/Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main.js',
        loaded: false,
        children: [],
        paths: [Object] } },
  Buffer:
   { [Function: Buffer]
     poolSize: 8192,
     from: [Function],
     alloc: [Function],
     allocUnsafe: [Function],
     allocUnsafeSlow: [Function],
     isBuffer: [Function: isBuffer],
     compare: [Function: compare],
     isEncoding: [Function],
     concat: [Function],
     byteLength: [Function: byteLength] },
  clearImmediate: [Function],
  clearInterval: [Function],
  clearTimeout: [Function],
  setImmediate: [Function],
  setInterval: [Function],
  setTimeout: [Function],
  console: [Getter] }

Second process:

{
     title: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     version: 'v7.9.0',
     moduleLoadList:
      [ 'Binding contextify',
        'Binding natives',
        'NativeModule events',
        'Binding config',
        'NativeModule util',
        'Binding uv',
        'NativeModule buffer',
        'Binding buffer',
        'Binding util',
        'NativeModule internal/util',
        'NativeModule internal/buffer',
        'NativeModule timers',
        'Binding timer_wrap',
        'NativeModule internal/linkedlist',
        'NativeModule assert',
        'Binding atom_common_asar',
        'NativeModule ELECTRON_ASAR',
        'NativeModule child_process',
        'Binding constants',
        'Binding spawn_sync',
        'Binding pipe_wrap',
        'NativeModule internal/child_process',
        'NativeModule string_decoder',
        'NativeModule net',
        'NativeModule stream',
        'NativeModule internal/streams/legacy',
        'NativeModule _stream_readable',
        'NativeModule internal/streams/BufferList',
        'NativeModule _stream_writable',
        'NativeModule _stream_duplex',
        'NativeModule _stream_transform',
        'NativeModule _stream_passthrough',
        'NativeModule internal/net',
        'Binding cares_wrap',
        'Binding tty_wrap',
        'Binding tcp_wrap',
        'Binding stream_wrap',
        'NativeModule dgram',
        'Binding udp_wrap',
        'Binding process_wrap',
        'NativeModule internal/socket_list',
        'NativeModule path',
        'NativeModule fs',
        'Binding fs',
        'Binding fs_event_wrap',
        'NativeModule internal/fs',
        'NativeModule internal/url',
        'NativeModule internal/querystring',
        'Binding url',
        'NativeModule querystring',
        'NativeModule os',
        'Binding os',
        'NativeModule module',
        'NativeModule internal/module',
        'NativeModule vm',
        'NativeModule internal/process',
        'NativeModule internal/process/warning',
        'NativeModule internal/process/next_tick',
        'NativeModule internal/process/promises',
        'NativeModule internal/process/stdio',
        'NativeModule console',
        'NativeModule tty',
        'Binding signal_wrap' ],
     versions:
      { http_parser: '2.7.0',
        node: '7.9.0',
        v8: '5.8.283.38',
        uv: '1.11.0',
        zlib: '1.2.11',
        ares: '1.10.1-DEV',
        modules: '54',
        openssl: '1.0.2k' },
     arch: 'x64',
     platform: 'darwin',
     release:
      { name: 'node',
        sourceUrl: 'https://atom.io/download/electronv7.9.0/node-v7.9.0.tar.gz',
        headersUrl: 'https://atom.io/download/electronv7.9.0/node-v7.9.0-headers.tar.gz' },
     argv:
      [ '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
        '/Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main' ],
     execArgv: [],
     env:
      { ELECTRON_RUN_AS_NODE: '1',
        VSCODE_CLI: '1',
        TERM_PROGRAM: 'vscode',
        NVM_CD_FLAGS: '',
        SHELL: '/bin/bash',
        TERM: 'xterm-256color',
        TMPDIR: '/var/folders/k3/d2fkvv1j16v3_rz93k7f74180000gn/T/',
        Apple_PubSub_Socket_Render: '/private/tmp/com.apple.launchd.cVfDfT7VB9/Render',
        TERM_PROGRAM_VERSION: '1.18.0',
        TERM_SESSION_ID: 'DEE68C3D-6044-42A6-8B57-B5CB386865C5',
        NVM_DIR: '/Users/akos.kitta/.nvm',
        USER: 'akos.kitta',
        SSH_AUTH_SOCK: '/private/tmp/com.apple.launchd.1zYguUNwbH/Listeners',
        __CF_USER_TEXT_ENCODING: '0x1F5:0x0:0x0',
        GOOGLE_API_KEY: 'AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q',
        PATH: '/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Users/akos.kitta/.nvm/versions/node/v8.8.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin',
        PWD: '/Applications/Yangster.app/Contents/MacOS',
        ELECTRON_NO_ATTACH_CONSOLE: '1',
        LANG: 'en_US.UTF-8',
        XPC_FLAGS: '0x0',
        XPC_SERVICE_NAME: '0',
        SHLVL: '3',
        HOME: '/Users/akos.kitta',
        VSCODE_NLS_CONFIG: '{"locale":"en-us","availableLanguages":{}}',
        LOGNAME: 'akos.kitta',
        VSCODE_IPC_HOOK: '/Users/akos.kitta/Library/Application Support/Code/1.18.0-main.sock',
        NVM_BIN: '/Users/akos.kitta/.nvm/versions/node/v8.8.0/bin',
        VSCODE_PID: '8267',
        VSCODE_NODE_CACHED_DATA_DIR_8267: '/Users/akos.kitta/Library/Application Support/Code/CachedData/dcee2202709a4f223185514b9275aa4229841aa7',
        OLDPWD: '/Applications/Yangster.app/Contents',
        _: './Yangster',
        LC_NUMERIC: 'C' },
     pid: 8971,
     features:
      { debug: false,
        uv: true,
        ipv6: true,
        tls_npn: true,
        tls_alpn: true,
        tls_sni: true,
        tls_ocsp: true,
        tls: true },
     _needImmediateCallback: false,
     execPath: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     debugPort: 5858,
     _startProfilerIdleNotifier: [Function: _startProfilerIdleNotifier],
     _stopProfilerIdleNotifier: [Function: _stopProfilerIdleNotifier],
     _getActiveRequests: [Function: _getActiveRequests],
     _getActiveHandles: [Function: _getActiveHandles],
     reallyExit: [Function: reallyExit],
     abort: [Function: abort],
     chdir: [Function: chdir],
     cwd: [Function: cwd],
     umask: [Function: umask],
     getuid: [Function: getuid],
     geteuid: [Function: geteuid],
     setuid: [Function: setuid],
     seteuid: [Function: seteuid],
     setgid: [Function: setgid],
     setegid: [Function: setegid],
     getgid: [Function: getgid],
     getegid: [Function: getegid],
     getgroups: [Function: getgroups],
     setgroups: [Function: setgroups],
     initgroups: [Function: initgroups],
     _kill: [Function: _kill],
     _debugProcess: [Function: _debugProcess],
     _debugPause: [Function: _debugPause],
     _debugEnd: [Function: _debugEnd],
     hrtime: [Function: hrtime],
     cpuUsage: [Function: cpuUsage],
     dlopen: [Function],
     uptime: [Function: uptime],
     memoryUsage: [Function: memoryUsage],
     binding: [Function: binding],
     _linkedBinding: [Function: _linkedBinding],
     _setupDomainUse: [Function: _setupDomainUse],
     _events:
      { exit: [Function],
        warning: [Function],
        newListener: [Object],
        removeListener: [Object],
        internalMessage: [Function],
        SIGWINCH: [Object] },
     crash: [Function],
     crashReporter: { start: [Function] },
     _rawDebug: [Function],
     _eventsCount: 6,
     domain: null,
     _maxListeners: undefined,
     NativeModule:
      { [Function: NativeModule]
        _source: [Object],
        _cache: [Object],
        require: [Function],
        getCached: [Function],
        exists: [Function],
        nonInternalExists: [Function],
        isInternal: [Function],
        getSource: [Function],
        wrap: [Function],
        wrapper: [Object] },
     _fatalException: [Function],
     _exiting: false,
     assert: [Function],
     config: { variables: {} },
     emitWarning: [Function],
     nextTick: [Function: nextTick],
     _tickCallback: [Function: _tickCallback],
     _tickDomainCallback: [Function: _tickDomainCallback],
     stdout: [Getter],
     stderr: [Getter],
     stdin: [Getter],
     openStdin: [Function],
     exit: [Function],
     kill: [Function],
     channel:
      Pipe {
        bytesRead: 0,
        _externalStream: {},
        fd: 3,
        writeQueueSize: 0,
        buffering: false,
        onread: [Function],
        sockets: [Object] },
     _channel: [Getter/Setter],
     _handleQueue: null,
     _pendingHandle: null,
     send: [Function],
     _send: [Function],
     connected: true,
     disconnect: [Function],
     _disconnect: [Function],
     argv0: '/Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper',
     mainModule:
      Module {
        id: '.',
        exports: {},
        parent: null,
        filename: '/Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main.js',
        loaded: false,
        children: [],
        paths: [Object] } },
  Buffer:
   { [Function: Buffer]
     poolSize: 8192,
     from: [Function],
     alloc: [Function],
     allocUnsafe: [Function],
     allocUnsafeSlow: [Function],
     isBuffer: [Function: isBuffer],
     compare: [Function: compare],
     isEncoding: [Function],
     concat: [Function],
     byteLength: [Function: byteLength] },
  clearImmediate: [Function],
  clearInterval: [Function],
  clearTimeout: [Function],
  setImmediate: [Function],
  setInterval: [Function],
  setTimeout: [Function],
  console: [Getter] }
kittaakos commented 6 years ago

It seems the main.js processes are the stale ones:

Before termination:

\-+= 11275 akos.kitta ./Yangster
 | |       |--- 11276 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper --type=gpu-process --no-sandbox --supports-dual-gpus=true --gpu-driver-bug-workarounds=1,10,23,25,47,63,65,66,68,74,76,84,85,89,92 --disable-gl-extensions=GL_KHR_blend_equation_advance
 | |       |-+- 11277 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper /Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main
 | |       | \-+- 11278 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper /Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main
 | |       |   \--- 11281 akos.kitta /usr/bin/java -classpath /Applications/Yangster.app/Contents/Resources/app/node_modules/theia-yang-extension/build/yang-language-server/lib/io.typefox.yang.diagram-0.1.0-SNAPSHOT.jar:/Applications/Yangster.app/Contents/Resources/app/node_modules/theia-yang-extension/build/yang-
 | |       \--- 11279 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper --type=renderer --no-sandbox --primordial-pipe-token=F7F31EBA8B06479B86650D55FF309427 --lang=en-US --app-path=/Applications/Yangster.app/Contents/Resources/app --node-integration=true 

After termination:

 \-+- 11277 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper /Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main
   \--- 11278 akos.kitta /Applications/Yangster.app/Contents/Frameworks/Yangster Helper.app/Contents/MacOS/Yangster Helper /Applications/Yangster.app/Contents/Resources/app/src-gen/backend/main
kittaakos commented 6 years ago

That seems to be correct; the outstanding question is instead the following: why does the process forked from the electron-main not terminate on application shutdown.

kittaakos commented 6 years ago

Got it working locally by modifying the generated code. I need to open a follow-up in Theia.

hexa00 commented 6 years ago

Just curious does the fix work on windows too ? (not sure what the fix is ? like to PR ? )

Would it also fix the issue when the backend doesn't stop on ctrl-c on windows?

kittaakos commented 6 years ago

I have not had the chance to try it yet. I will update this thread once I have checked the behavior.

kittaakos commented 6 years ago

For the sake of simplicity, I will modify the generated code after the generation phase so that electron-builder can pick up and we can try it out in the Yangster application.

kittaakos commented 6 years ago

Just curious does the fix work on windows too ? (not sure what the fix is ? like to PR ? )

Would it also fix the issue when the backend doesn't stop on ctrl-c on windows?

No.