GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v8::Isolate::GetCurrent()->IdleNotificationDeadline not working in 3.x (manual gc not working) · Issue #2478 · nodejs/node

v8::Isolate::GetCurrent()->IdleNotificationDeadline not working in 3.x (manual gc not working) #2478

New issue
Copy link
New issue
Copy link
Closed
Closed
v8::Isolate::GetCurrent()->IdleNotificationDeadline not working in 3.x (manual gc not working)#2478
Copy link
Labels
c++Issues and PRs that require attention from people who are familiar with C++.v8 engineIssues and PRs related to the V8 dependency.

Description

@marcominetti
marcominetti
opened on Aug 20, 2015
Issue body actions

Hi there, I'm currently maintaining the node-memwatch package against latest iojs/nodejs versions, available as memwatch-next on npm.

I've noticed that with new v8 version 4.4.63.26 the IdleNotification does not trigger GC at all.

I'm using both NaN 2.0.5 and direct v8::Isolate::GetCurrent()->IdleNotificationDeadline call with 500ms, 1s and 5s.

The gc seems not to be executed. I can make it run successfully with --expose-gc flag through the global.gc() function.

Activity

  1. marcominetti commented on Aug 20, 2015

    @marcominetti
    marcominetti
    on Aug 20, 2015
    Author
    More actions

    example code (from memwatch):

    NAN_METHOD(memwatch::trigger_gc) {
        Nan::HandleScope scope;
        while(!(v8::Isolate::GetCurrent()->IdleNotificationDeadline(0.500))) {};
    
        //while(!Nan::IdleNotification(500)) {};
    
        info.GetReturnValue().Set(Nan::Undefined());
    }
    
  2. bnoordhuis commented on Aug 20, 2015

    @bnoordhuis
    bnoordhuis
    on Aug 20, 2015
    Member
    More actions

    Do you start iojs with --use_idle_notification? It's a complete no-op without that flag.

  3. Fishrock123
    added
    c++Issues and PRs that require attention from people who are familiar with C++.
    v8 engineIssues and PRs related to the V8 dependency.
    on Aug 20, 2015
  4. marcominetti commented on Aug 20, 2015

    @marcominetti
    marcominetti
    on Aug 20, 2015
    Author
    More actions

    I supposed that flag was enabled by default... I'll try when back to the office.

    Has been changed something in iojs 3.x? Everything works fine till 2.5.0 branch.

  5. bnoordhuis commented on Aug 21, 2015

    @bnoordhuis
    bnoordhuis
    on Aug 21, 2015
    Member
    More actions

    I take back what I said, I see that --use_idle_notification is on by default. Does v8::Isolate::IdleNotification() work?

  6. marcominetti commented on Aug 21, 2015

    @marcominetti
    marcominetti
    on Aug 21, 2015
    Author
    More actions

    Nope. Seems something not working in v8...

  7. marcominetti commented on Aug 21, 2015

    @marcominetti
    marcominetti
    on Aug 21, 2015
    Author
    More actions

    Should we suppose the strategy to call

    while(!(v8::Isolate::GetCurrent()->IdleNotificationDeadline(0.500))) {};
    

    is deprecated cause new IdleNotification implementation does not returns true as consistently as before?

  8. kkoopa commented on Aug 21, 2015

    @kkoopa
    kkoopa
    on Aug 21, 2015
    More actions

    That is probably a safe assumption. IIRC, there was never a guarantee of this triggering garbage collection. Only reliable way is by the functionality exposed with --expose-gc.

  9. Fishrock123 commented on Aug 22, 2015

    @Fishrock123
    Fishrock123
    on Aug 22, 2015
    Contributor
    More actions

    Closing unless there is actually something we can do about this and/or should. :)

  10. Fishrock123
    closed this as completedon Aug 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.