puppeteer: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed!
Steps to reproduce
Tell us about your environment:
- Puppeteer version: 1.2.0
- Platform / OS version: ubuntu 16.04 (docker)
- URLs (if applicable):
- Node.js version: 8.9.4 chromium version: google-chrome-stable : 65.0.3325.162
What steps will reproduce the problem?
I have the following code.
const options = { args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu', '--disable-dev-shm-usage'] };
await puppeteer.launch(options);
Fri Mar 16 2018 08:27:05 GMT+0000 (UTC) - error: [3] Error: Failed to launch chrome!
[0316/082705.295375:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
Inconsistency detected by ld.so: dl-tls.c: 493: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)' failed!
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/kakao/service/htmltojpg/node_modules/puppeteer/lib/Launcher.js:246:14)
at ChildProcess.helper.addEventListener (/kakao/service/htmltojpg/node_modules/puppeteer/lib/Launcher.js:236:60)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
W0316 17:26:20.877745 24163 logging.cpp:91] RAW: Received signal SIGTERM from process 2242 of user 0; exiting
What causes the above error?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 21
- Comments: 36 (1 by maintainers)
Commits related to this issue
- [IMP] tests: verify that the browser is running When issuing the first json command, it happens that the chrome process has crashed. As a consequence, a log entry appears with saying that it could no... — committed to odoo-dev/odoo by d-fence 5 years ago
- [IMP] tests: verify that the browser is running When issuing the first json command, it happens that the chrome process has crashed. As a consequence, a log entry appears with saying that it could no... — committed to odoo/odoo by d-fence 5 years ago
- fix tests on github actions https://github.com/GoogleChrome/puppeteer/issues/2207#issuecomment-516487621 — committed to qawolf/qawolf by jperl 5 years ago
- Add retries when launching chromium in e2e tests (#16775) Northstar e2e tests are intermittently failing (pretty often) due to chromium failing to launch. Per https://github.com/puppeteer/puppeteer/i... — committed to microsoft/fluentui by ecraig12345 3 years ago
And why is this issue even closed?! It is not solved yet and the upstream bug exists for years now…!
It’s a glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=19329, I ran into it today using Puppeteer as well.
Apparently this was fixed just a month ago: https://sourceware.org/bugzilla/show_bug.cgi?id=19329
Still need to try it out.Release of glibc 2.34 should be released as a dev version around August 1st 2021This bug manifests itself very randomly for me, and only in Jenkins on build process, but local all is fine. I guess it related with build platform resources, and add argument
'--disable-dev-shm-usage'
from this page like this:new Puppeteer: { ..., args: ['--disable-dev-shm-usage'] }
So far it works fine
Same here: Error happens randomly.
Docker base image node:13 (Debian 9, Node 13), Pptr 2.1.0
Fresh default Ubuntu 20.04 server, Ubuntu
GLIBC 2.31-0ubuntu9
i have this crash regulary … 2.31 > 2.30
Facing same problem. I am using node -v 16.19.0 with 4GB RAM VPS node+PM2 server. Is this due to some memory issue? How can I debug to understand what exactly is happening? I am running 3 pages per chrome instance. Will increasing it to 5 or 8 page per instance help? Any suggestions?
No, this issue has not been fixed in glibc and it is not likely it ever will be (from reading all the posts about it on the glibc development mailing list (libc-alpha) over the past 5 years). It is a race condition occurring when starting and stopping many threads/processes at the same time. Even if this bug ever gets fixed there may be other temporary reasons for the spawning of a browser process to fail.
Since in this case there is not actually anything wrong with the process we’re trying to start, a retry attempt may be successful. This is what I have hacked together locally for my backstopjs testing purposes. However, I am not a puppeteer, node or even javascript developer so I’d appreciate it if someone else could create a PR with an optional, configurable retry mechanism for starting browsers.
@kyrylo-pshenychnyi According to the first response. glibc-2.30 fixed it. (You can’t install that version with an old OS, so you can either upgrade your os or install necessary dependencies and hope it works)
@jribbens There’s some recent activity there at least. I doubt there’s any way around it - I see it without Puppeteer involved in my own project (qutebrowser, which is based on QtWebEngine, which is based on Chromium) as well.
Failed to launch the browser process! Inconsistency detected by ld.so: ../elf/dl-tls.c: 481: _dl_allocate_tls_init: Assertion
listp->slotinfo[cnt].gen <= GL(dl_tls_generation)’ failed!TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md `
Same happened to me today for the first time, I have puppeteer 3.0.0 Never seen this error locally, happened on Ubuntu 18.04 server.
We thought we have resolved this by working with 1 instance, but after 5 weeks, this is back! Single Instance used 5:31 +00:00: Inconsistency detected by ld.so: dl-tls.c: 493: _dl_allocate_tls_init: Assertion `listp->slotinfo[cnt].gen <= GL(dl_tls_generation)’ failed! 15:31 +00:00: 15:31 +00:00: 15:31 +00:00: TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md 15:31 +00:00: 15:31 +00:00: at onClose (/opt/formtitan/docker-node-workflow/application/node_modules/puppeteer/lib/Launcher.js:349:14) 15:31 +00:00: at ChildProcess.<anonymous> (/opt/formtitan/docker-node-workflow/application/node_modules/puppeteer/lib/Launcher.js:339:60)
Got it today, on node 12.7!