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

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

                Author: ASF GitHub Bot
            Created on: 24/Apr/18 01:17
            Start Date: 24/Apr/18 01:17
    Worklog Time Spent: 10m 
      Work Description: wcn3 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_r183581292
 
 

 ##########
 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:
   Stimulate is more properly correct here, since I'm creating the actual 
condition of the deadlock. It's not a simulation of a deadlock; without the 
fix, it truly deadlocks. :)
   
   If the word is confusingly due to similarity, happy to replace with 'to 
force the deadlock'

----------------------------------------------------------------
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: 94414)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  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