Skip to content

(Updated): timeout() operator leaking ScheduledFutureTasks on Scheduler #1919

@daschl

Description

@daschl

Hi folks,

(update, see below, looks like it's the timeout operator)

I'm raising a ticket earlier than later, because I suspect we have a leak somewhere in the Scheduler logic. It could by in my code too, but from the characteristics it looks more like something rx internal.

I've been able to generate some OOM scenarios where GC takes all the time to clean things up and it's not able to, which pointed me to a leak. A heap dump showed the leak suspect is the ScheduledFutureTask as part of the computation scheduler:

screen shot 2014-12-02 at 10 40 28

You can see a full GC kicking in without actually making old gen smaller:

screen shot 2014-12-02 at 10 42 50

The code path uses both .observeOn() once to move it onto a scheduler and also blocks .single() at the very end. So I'll start looking in those places. But maybe @akarnokd or @benjchristensen you have an idea where I can start debugging?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions