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

Electron 9 renderer crashes on native sqlite module access when reloading the page #24933

Closed
3 tasks done
dominic-simplan opened this issue Aug 11, 2020 · 4 comments
Closed
3 tasks done

Comments

@dominic-simplan
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 9.2.0
  • Operating System:
    • Windows 10 (1909)
  • Last Known Working Electron version:
    • 8.5.0

Expected Behavior

Reloading contents (Using menu: View/Reload) should not crash Electron

Actual Behavior

Since Electron 9 (tried with 9.1.2 and 9.2) seems like the renderer process (?) crashes when using the reload function. Initial loading of the page works fine, but when reloading, the page stays completely white and the DevTools report that it was disconnected from the page.
Works fine with Electron 8.5 and prior.

I tried to create a crash dump with crashpad and here is the output of WinDbg:

Microsoft (R) Windows Debugger Version 10.0.20153.1000 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\xxx\AppData\Roaming\Electron\Crashpad\reports\99316939-67ae-470c-946b-5b8370ecc606.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available

Symbol search path is: srv*
Executable search path is: 
Windows 10 Version 18362 (900) MP (16 procs) Free x64
Product: WinNt
Edition build lab: Windows NT 10.0.18362.900
Machine Name:
Debug session time: Tue Aug 11 11:35:25.000 2020 (UTC + 2:00)
System Uptime: not available
Process Uptime: 0 days 0:00:10.000
................................................................
.....
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(18f0.82f0): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify checksum for ntdll.dll
*** WARNING: Unable to verify checksum for KERNELBASE.dll
ntdll!NtDelayExecution+0x14:
00007ffe`a653c6f4 c3              ret
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** WARNING: Unable to verify checksum for KERNEL32.DLL
*** WARNING: Unable to verify checksum for USER32.dll
*** WARNING: Unable to verify checksum for combase.dll

KEY_VALUES_STRING: 1

    Key  : AV.Fault
    Value: Write

    Key  : Analysis.CPU.mSec
    Value: 984

    Key  : Analysis.DebugAnalysisProvider.CPP
    Value: Create: 8007007e on HU-NB-370

    Key  : Analysis.DebugData
    Value: CreateObject

    Key  : Analysis.DebugModel
    Value: CreateObject

    Key  : Analysis.Elapsed.mSec
    Value: 783

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 275

    Key  : Analysis.System
    Value: CreateObject

    Key  : Timeline.Process.Start.DeltaSec
    Value: 10

    Key  : WER.Process.Version
    Value: 9.2.0.0


ADDITIONAL_XML: 1

OS_BUILD_LAYERS: 1

NTGLOBALFLAG:  0

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

CONTEXT:  (.ecxr)
rax=00007ff63763fe20 rbx=00007ffe3236fca8 rcx=000002cb58efddd0
rdx=00007ff637f5dec0 rsi=000002cb58d80460 rdi=000000dc32afb470
rip=00007ff638571b63 rsp=000000dc32afafb8 rbp=000000dc32afb170
 r8=000057570f33940d  r9=0000000000000001 r10=0000000000000000
r11=000000dc32afb010 r12=000057570da6e32d r13=00007ff636e74910
r14=0000000000000000 r15=000002cb58b79070
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=0000  ds=0000  es=0000  fs=0053  gs=002b             efl=00010202
electron!napi_delete_reference+0x53:
00007ff6`38571b63 48895008        mov     qword ptr [rax+8],rdx ds:00007ff6`3763fe28=8b48ce89484e74c9
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff638571b63 (electron!napi_delete_reference+0x0000000000000053)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000001
   Parameter[1]: 00007ff63763fe28
Attempt to write to address 00007ff63763fe28

PROCESS_NAME:  electron.exe

WRITE_ADDRESS:  00007ff63763fe28 

ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%p verwies auf Arbeitsspeicher bei 0x%p. Der Vorgang %s konnte im Arbeitsspeicher nicht durchgef hrt werden.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000001

EXCEPTION_PARAMETER2:  00007ff63763fe28

STACK_TEXT:  
000000dc`32afafb8 00007ff6`38571b2f     : ffffffff`fffffffe 000002cb`55c44630 00000000`00000009 fffffe10`dceb6d90 : electron!napi_delete_reference+0x53
000000dc`32afafc0 00007ffe`32227503     : 00007ff6`36e74910 00005757`0da6e32d 00006f55`8336d0db 00007ffe`3232a9ec : electron!napi_delete_reference+0x1f
000000dc`32afaff0 00007ff6`36e7490f     : 00005757`0da6e32d 00006f55`8336d0db 00007ffe`3232a9ec ffffffff`fffffffe : node_sqlite3+0x7503
000000dc`32afaff8 00005757`0da6e32d     : 00006f55`8336d0db 00007ffe`3232a9ec ffffffff`fffffffe 00007ffe`3222216b : electron!node_module_register+0x3ff
000000dc`32afb000 00006f55`8336d0db     : 00007ffe`3232a9ec ffffffff`fffffffe 00007ffe`3222216b 00006f55`8336d03b : 0x00005757`0da6e32d
000000dc`32afb008 00007ffe`3232a9ec     : ffffffff`fffffffe 00007ffe`3222216b 00006f55`8336d03b 000000dc`32afb470 : 0x00006f55`8336d0db
000000dc`32afb010 ffffffff`fffffffe     : 00007ffe`3222216b 00006f55`8336d03b 000000dc`32afb470 000000dc`32afb0a0 : node_sqlite3+0x10a9ec
000000dc`32afb018 00007ffe`3222216b     : 00006f55`8336d03b 000000dc`32afb470 000000dc`32afb0a0 000000dc`32afb490 : 0xffffffff`fffffffe
000000dc`32afb020 00006f55`8336d03b     : 000000dc`32afb470 000000dc`32afb0a0 000000dc`32afb490 00007ff6`00000000 : node_sqlite3+0x216b
000000dc`32afb028 000000dc`32afb470     : 000000dc`32afb0a0 000000dc`32afb490 00007ff6`00000000 00000000`00000000 : 0x00006f55`8336d03b
000000dc`32afb030 000000dc`32afb0a0     : 000000dc`32afb490 00007ff6`00000000 00000000`00000000 00006f55`8336d0bb : 0x000000dc`32afb470
000000dc`32afb038 000000dc`32afb490     : 00007ff6`00000000 00000000`00000000 00006f55`8336d0bb 000000dc`32afb400 : 0x000000dc`32afb0a0
000000dc`32afb040 00007ff6`00000000     : 00000000`00000000 00006f55`8336d0bb 000000dc`32afb400 000000dc`32afb0a0 : 0x000000dc`32afb490
000000dc`32afb048 00000000`00000000     : 00006f55`8336d0bb 000000dc`32afb400 000000dc`32afb0a0 00007ffe`3222b0c7 : 0x00007ff6`00000000


SYMBOL_NAME:  electron!napi_delete_reference+53

MODULE_NAME: electron

IMAGE_NAME:  electron.exe

STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~0s ; .ecxr ; kb

FAILURE_BUCKET_ID:  INVALID_POINTER_WRITE_c0000005_electron.exe!napi_delete_reference

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  9.2.0.0

FAILURE_ID_HASH:  {95da9ce2-f2eb-0c22-0a13-18146f95472d}

Followup:     MachineOwner
---------

Looking at the logs I would assume this is related to the native sqlite module (https://github.com/mapbox/node-sqlite3, v5.0.0) I'm using.

Any ideas what could be the issue?

@dominic-simplan
Copy link
Author

Just stumbled upon this ticket: #22119 and I can confirm that setting app.allowRendererProcessReuse = false solves the reloading issue in my case.
Depending on the solution of #22119 this might also solve this issue.

@MarshallOfSound
Copy link
Member

#22119 is completely unrelated to this, this issue lies with sqlite and you should report it to them to get them to fix it.

@MarshallOfSound
Copy link
Member

Refs #18397

@dominic-simplan
Copy link
Author

Thanks!

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

2 participants