Skip to content

Enumerator#next proceeds to next iteration without being called again #5007

Description

@headius

This is the root cause of #4903.

Our Enumerator#next does not appear to be waiting for a second all to perform a second iteration. Because it runs in a separate thread, this causes it to execute in parallel with code that received a previous result. Because of the improper sharing of a write buffer in IOWritableByteChannel, IO.copy_stream to an Enumerator#next-based sink could see a previously-written chunk modified during use.

This issue has been reported against Fiber before, but our Fiber implementation appears to be solid lately. This is strong justification for us to finally eliminate the "second Fiber" we have in Enumerator#next and replace it with one based on our actual Fiber.

Activity

  1. added this to the JRuby 9.2.0.0 milestone on Jan 24, 2018
  2. headius commented on Oct 11, 2018

    @headius
    MemberAuthor

    Dupe of 4212.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions