[ 
https://issues.apache.org/jira/browse/BEAM-4141?focusedWorklogId=94410&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-94410
 ]

ASF GitHub Bot logged work on BEAM-4141:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Apr/18 01:14
            Start Date: 24/Apr/18 01:14
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #5184: 
BEAM-4141: Drain source when user function processing fails.
URL: https://github.com/apache/beam/pull/5184#discussion_r183581014
 
 

 ##########
 File path: sdks/go/pkg/beam/core/runtime/harness/datamgr_test.go
 ##########
 @@ -0,0 +1,89 @@
+package harness
+
+import (
+       "context"
+       "io"
+       "io/ioutil"
+       "log"
+       "testing"
+
+       "github.com/apache/beam/sdks/go/pkg/beam/core/runtime/exec"
+       pb "github.com/apache/beam/sdks/go/pkg/beam/model/fnexecution_v1"
+)
+
+type fakeClient struct {
+       t     *testing.T
+       done  chan bool
+       calls int
+}
+
+func (f *fakeClient) Recv() (*pb.Elements, error) {
+       f.calls++
+       data := []byte{1, 2, 3, 4}
+       elemData := pb.Elements_Data{
+               InstructionReference: "inst_ref",
+               Data:                 data,
+               Target: &pb.Target{
+                       PrimitiveTransformReference: "ptr",
+                       Name: "instruction_name",
+               },
+       }
+
+       msg := pb.Elements{}
+
+       for i := 0; i < bufElements+1; i++ {
+               msg.Data = append(msg.Data, &elemData)
+       }
+
+       // The first two calls fill up the buffer completely to stimulate the 
deadlock
 
 Review comment:
   <!--new_thread; commit:c99d4fe17f53af898950a67b6b7d816c570ad9aa; 
resolved:0-->
   stimulate or simulate?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 94410)
    Time Spent: 40m  (was: 0.5h)

> Data channel deadlocks when user function fails
> -----------------------------------------------
>
>                 Key: BEAM-4141
>                 URL: https://issues.apache.org/jira/browse/BEAM-4141
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-go
>    Affects Versions: Not applicable
>            Reporter: Bill Neubauer
>            Assignee: Bill Neubauer
>            Priority: Major
>             Fix For: Not applicable
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> There is a deadlock condition in the data channel code that occurs when a 
> user function fails while processing an element. The producer for the data 
> channel is continuing to send information across a channel, but the intended 
> consumer has stopped listening. Unfortunately, this channel blocks the entire 
> data channel, blocking data for any other DoFn that might be running, causing 
> the whole worker to deadlock.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to