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

starting puppeteer with --single-process flag leads chrome to crash on some websites #5487

Closed
gsouf opened this issue Mar 9, 2020 · 3 comments

Comments

@gsouf
Copy link

gsouf commented Mar 9, 2020

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 2.1.1
  • Platform / OS version: ubuntu 19.10/18.04/Google Cloud Functions
  • Node.js version: 10

What steps will reproduce the problem?

Minimal reproducible example:

const puppeteer = require('puppeteer');

const waitPromise = (time) => {
    return new Promise(res => setTimeout(res, time))
};

const main = async () => {
    let result;
    let browser = null;
    try {
        browser = await puppeteer.launch({
            dumpio: true,
            args: ['--single-process'],
            headless: true,
        });
        let page = await browser.newPage();
        await page.goto('https://tiktokbet.org/');

        // give an opportunity for the error to trigger
        await waitPromise(1500);

        result = await page.title();
    } finally {
        if (browser !== null) {
            await browser.close();
        }
    }

    console.log(result);
};

main();

What is the expected result?

Should print the title of the website

What happens instead?

Chrome crashes, with dumpio enabled you can see this error:

[0309/140654.029200:FATAL:service.cc(56)] Check failed: !base::SystemMonitor::Get(). 
#0 0x565457e6c219 base::debug::CollectStackTrace()
#1 0x565457dd0363 base::debug::StackTrace::StackTrace()
#2 0x565457de2195 logging::LogMessage::~LogMessage()
#3 0x5654566f3cd1 audio::Service::Service()
#4 0x5654566f6306 audio::CreateStandaloneService()
#5 0x5654577c7aa6 content::UtilityServiceFactory::RunService()
#6 0x5654577c88d4 content::UtilityThreadImpl::RunService()
#7 0x56545a8c69fc base::internal::Invoker<>::RunOnce()
#8 0x565457e18d3b base::TaskAnnotator::RunTask()
#9 0x565457e298be base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#10 0x565457e29651 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork()
#11 0x565457de5ffa base::MessagePumpDefault::Run()
#12 0x565457e2a149 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#13 0x565457e01a22 base::RunLoop::Run()
#14 0x565457e3e077 base::Thread::ThreadMain()
#15 0x565457e7d5be base::(anonymous namespace)::ThreadFunc()
#16 0x7f8a6d8fd669 start_thread
#17 0x7f8a6bd22323 clone
Task trace:
#0 0x56545a8c652a content::ChildThreadImpl::IOThreadState::RunService()
#1 0x565457f8e73c mojo::Connector::ReadAllAvailableMessages()
#2 0x565457fa6031 mojo::SimpleWatcher::ArmOrNotify()
#3 0x56545a8c4278 content::ChildThreadImpl::Init()
#4 0x5654577c6079 content::InProcessUtilityThread::Init()
IPC message handler context: 0x1D6C7CD1

Received signal 6
#0 0x565457e6c219 base::debug::CollectStackTrace()
#1 0x565457dd0363 base::debug::StackTrace::StackTrace()
#2 0x565457e6bd61 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7f8a6d909540 <unknown>
#4 0x7f8a6bc463eb gsignal
#5 0x7f8a6bc25899 abort
#6 0x565457e6ab65 base::debug::BreakDebugger()
#7 0x565457de2634 logging::LogMessage::~LogMessage()
#8 0x5654566f3cd1 audio::Service::Service()
#9 0x5654566f6306 audio::CreateStandaloneService()
#10 0x5654577c7aa6 content::UtilityServiceFactory::RunService()
#11 0x5654577c88d4 content::UtilityThreadImpl::RunService()
#12 0x56545a8c69fc base::internal::Invoker<>::RunOnce()
#13 0x565457e18d3b base::TaskAnnotator::RunTask()
#14 0x565457e298be base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#15 0x565457e29651 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork()
#16 0x565457de5ffa base::MessagePumpDefault::Run()
#17 0x565457e2a149 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#18 0x565457e01a22 base::RunLoop::Run()
#19 0x565457e3e077 base::Thread::ThreadMain()
#20 0x565457e7d5be base::(anonymous namespace)::ThreadFunc()
#21 0x7f8a6d8fd669 start_thread
#22 0x7f8a6bd22323 clone
  r8: 0000000000000000  r9: 00007f8a52853db0 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007f8a52855098 r13: 00007f8a52854050 r14: 00007f8a528550a0 r15: aaaaaaaaaaaaaaaa
  di: 0000000000000002  si: 00007f8a52853db0  bp: 00007f8a52854000  bx: 00007f8a52856700
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f8a6bc463eb  sp: 00007f8a52853db0
  ip: 00007f8a6bc463eb efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]

Additional note

That's not occuring with all website. Only a small number of websites, the one I used in the example is one of the website causing the issue.

That's happening only when flag single-process is enabled. I tried to combinate it with some other flags that I read that could fix the issue. Nothing in my knowledge fixed it.

Thanks

@gsouf gsouf changed the title starting puppeteer with --single-process flag leads chrome error starting puppeteer with --single-process flag leads chrome to crash on some websites Mar 9, 2020
@DinisCruz
Copy link

I'm also getting this error when opening an atlassian website that needs authentication

the error is triggered on the redirect to the login page

Here is the error I get

image

it works if I remove the --single-process flag

@gsouf
Copy link
Author

gsouf commented Apr 16, 2020

Please, note that I opened a ticket on chromium support https://bugs.chromium.org/p/chromium/issues/detail?id=1060099#c6

@gsouf gsouf closed this as completed Apr 16, 2020
@Rajat16nov
Copy link

Facing the same issue. Any resolution so far?

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

3 participants