adieuadieu / serverless-chrome

🌐 Run headless Chrome/Chromium on AWS Lambda
MIT License
2.87k stars 282 forks source link

Random fail on SEGV_MAPERR #116

Closed slimakovec closed 4 years ago

slimakovec commented 6 years ago

when I run the latest release v1.0.0-38 on lambda, I get random (1 out of cca 30 - 40 runs) SEGV_MAPERR fails.

this happens with the with a bit more complex html files (so far no luck with isolating the issue, any hint very will be much appreciated)

simple <h1>hello world</h1> html seems to work ok (120+ tries)

set of flags:

'--headless',
'--disable-gpu',
'--single-process',
'--no-sandbox',
'--window-size=1920,1200',
'--virtual-time-budget=100',
'--disable-extensions',
'--incognito',
'--v=99',
'--enable-logging=stderr',
'--print-to-pdf=/tmp/pdf_output.pdf',
'file:///tmp/my_html_file.html'

also tried with these additional flags (stiil the same fail)

'--no-zygote',
'--deterministic-fetch',
'--profile-directory=/tmp/profileDir',
'--user-data-dir=/tmp/userDataDir'

stacktrace:

[0225/185929.698092:WARNING:resource_bundle.cc(368)] locale_file_path.empty() for locale

prctl(PR_SET_NO_NEW_PRIVS) failed

[0225/185929.712490:ERROR:gpu_process_transport_factory.cc(1009)] Lost UI shared context.

[0225/185929.713155:VERBOSE1:webrtc_internals.cc(109)] Could not get the download directory.

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 84:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 84:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 93:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 93:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 102:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 102:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 33: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 59: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 68: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 68: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 79: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 79: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 79: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 88: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 23: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39:
Having multiple <family> in <alias> isn't supported and may not work as expected

Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39:
Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 39: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 56: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 66: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 66: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 66: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 75: Having multiple <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 75: Having multiple <family> in <alias> isn't supported and may not work as expected

[0225/185929.830975:WARNING:histograms.cc(40)] Started multiple compositor clients (Browser, Renderer) in one process. Some metrics will be disabled.

[0225/185930.352359:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Aviator' log
[0225/185930.352389:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Icarus' log
[0225/185930.352395:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Pilot' log
[0225/185930.352400:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Rocketeer' log
[0225/185930.352407:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Skydiver' log

[0225/185930.352412:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server
[0225/185930.352418:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server 2
[0225/185930.352423:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec log
[0225/185930.352428:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Vega' log
[0225/185930.352433:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Sirius' log
[0225/185930.352438:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: WoSign log
[0225/185930.352443:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi Gen2 CT log
[0225/185930.352447:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: CNNIC CT log
[0225/185930.352452:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: StartCom log
[0225/185930.352457:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Sabre' CT log
[0225/185930.352462:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Mammoth' CT log
[0225/185930.352467:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Izenpe log
[0225/185930.352472:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi log
[0225/185930.352477:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Certly.IO log
[0225/185930.352485:VERBOSE1:proxy_service.cc(958)] PAC support disabled because there is no system implementation

[0225/185930.371357:ERROR:instance.cc(49)] Unable to locate service manifest for metrics
[0225/185930.371379:ERROR:service_manager.cc(890)] Failed to resolve service name: metrics

[0225/185930.390918:ERROR:gl_implementation.cc(292)] Failed to load /var/task/bin/libosmesa.so: /var/task/bin/libosmesa.so: cannot open shared object file: No such file or directory
[0225/185930.390940:VERBOSE1:gpu_init.cc(307)] gl::init::InitializeGLNoExtensionsOneOff failed

[0225/185930.876534:VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: file:///tmp/tmp-1ifSXGRQl8Bnn

[0225/185930.890755:VERBOSE1:loader_util.cc(47)] To buffer: file:///tmp/tmp-1ifSXGRQl8Bnn

[0225/185930.893555:ERROR:gpu_command_buffer_stub.cc(611)] ContextResult::kFatalFailure: Failed to create default offscreen surface.

[0225/185930.911043:VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: blob:file:///214913db-6f34-4045-be40-a3bf5f8e6e92

[0225/185930.930992:VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css

[0225/185930.931147:VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.3/leaflet.css

[0225/185931.578162:VERBOSE1:LocalWindowProxy.cpp(229)] A context is created NOT from snapshot

[0225/185931.601193:VERBOSE1:LocalWindowProxy.cpp(229)] A context is created NOT from snapshot

[0225/185931.615839:VERBOSE1:LocalWindowProxy.cpp(229)] A context is created NOT from snapshot

[0225/185931.621532:VERBOSE1:LocalWindowProxy.cpp(229)] A context is created NOT from snapshot

[0225/185931.771033:INFO:headless_shell.cc(566)] Written to file /tmp/tmp-1AKZMmn5v6BvX.

Received signal 11 SEGV_MAPERR 000000000000

#0 0x00000354c04c <unknown>
#1 0x00000354bbb1
<unknown>
#2 0x7fd16cb7d5a0
<unknown>
#3 0x00000358d8e3
<unknown>
#4 0x00000332e440
<unknown>
#5 0x00000332dc2e
<unknown>
#6 0x00000332e50e <unknown>
#7 0x00000332d9a3 <unknown>
#8 0x0000030c6daf <unknown>
#9 0x0000030c972f <unknown>
#10 0x000003519f36 <unknown>
#11 0x0000034fbdb0 <unknown>
#12 0x0000034fc485 <unknown>
#13 0x0000046ac0cf <unknown>
#14 0x0000034f5e31 <unknown>
#15 0x0000035190c9 <unknown>
#16 0x00000351913e <unknown>
#17 0x00000351033a <unknown>
#18 0x7fd16b4f2c05
__libc_start_main
#19 0x00000226b02a
<unknown>
r8: 0000000000000000 r9: 0000000000000002 r10: 00002c503b0662c0 r11: 00000000063826d0
r12: 00002c503b08e4e0 r13: 000000000104bba0 r14: 00002c503b085558 r15: 00002c503b085548
di:
0000000000000030 si: 0000000000000003 bp: 00007fffd050c940 bx: 00002c503b085558
dx: 0000000000000006 ax: 0000000000000000 cx: 0000000000000430 sp: 00007fffd050c910
ip: 000000000358d8e3 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]

Calling _exit(1). Core file will not be generated.

edit: the pdf is safely written (last info before the SEGV_MAPERR bug) so it seems it just dies when trying to exit.

adieuadieu commented 6 years ago

Hi @slimakovec — Does this happen with a beta or dev channel version? Or, an older npm version e.g. v1.0.0-7 or v1.0.0-28?

slimakovec commented 6 years ago

hi, I have tried beta, dev and stable (v1.0.0-38) and it randomly occurred no matter what version I tried. I even tried v1.0.0-29 and (not sure about this release number though) v1.0.0-34, still the same. To be honest, I haven't tried the v1.0.0-7, I wanted one of the latest releases.

sorry if I'm not very helpful, it's quite hard to isolate when exactly this happens :( as I wrote - the pdf is safely written so that's okay for me