{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/24934","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/24934/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/24934/comments","events_url":"https://api.github.com/repos/akka/akka/issues/24934/events","html_url":"https://github.com/akka/akka/issues/24934","id":316194783,"number":24934,"title":"Streams established using SourceRef and SinkRef timeout","user":{"login":"svozniuk","id":2470133,"avatar_url":"https://avatars3.githubusercontent.com/u/2470133?v=4","gravatar_id":"","url":"https://api.github.com/users/svozniuk","html_url":"https://github.com/svozniuk","followers_url":"https://api.github.com/users/svozniuk/followers","following_url":"https://api.github.com/users/svozniuk/following{/other_user}","gists_url":"https://api.github.com/users/svozniuk/gists{/gist_id}","starred_url":"https://api.github.com/users/svozniuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svozniuk/subscriptions","organizations_url":"https://api.github.com/users/svozniuk/orgs","repos_url":"https://api.github.com/users/svozniuk/repos","events_url":"https://api.github.com/users/svozniuk/events{/privacy}","received_events_url":"https://api.github.com/users/svozniuk/received_events","type":"User","site_admin":false},"labels":[{"id":92356850,"url":"https://api.github.com/repos/akka/akka/labels/3%20-%20in%20progress","name":"3 - in progress","color":"eb6420","default":false},{"id":92619677,"url":"https://api.github.com/repos/akka/akka/labels/bug","name":"bug","color":"e11d21","default":true},{"id":93144690,"url":"https://api.github.com/repos/akka/akka/labels/t:stream","name":"t:stream","color":"cccccc","default":false}],"state":"open","locked":false,"assignee":{"login":"ktoso","id":120979,"avatar_url":"https://avatars1.githubusercontent.com/u/120979?v=4","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"assignees":[{"login":"ktoso","id":120979,"avatar_url":"https://avatars1.githubusercontent.com/u/120979?v=4","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/akka/akka/milestones/129","html_url":"https://github.com/akka/akka/milestone/129","labels_url":"https://api.github.com/repos/akka/akka/milestones/129/labels","id":3265018,"number":129,"title":"2.5.13","description":"","creator":{"login":"patriknw","id":336161,"avatar_url":"https://avatars3.githubusercontent.com/u/336161?v=4","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":7,"state":"open","created_at":"2018-04-13T08:14:01Z","updated_at":"2018-04-23T01:39:49Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2018-04-20T09:28:10Z","updated_at":"2018-04-23T02:03:34Z","closed_at":null,"author_association":"NONE","body":"I have been trying to use Stream references for a week now (Akka 2.5.12)\r\nHowever I'm experiencing that every stream established using SourceRef or SinkRef is unstable and times out in exactly `akka.stream.materializer.stream-ref.subscription-timeout` period of time. Note that it times out even after the data had been flowing through it (i.e. it was properly materialized and functioning)\r\n\r\nI have been debugging this behavior and I think I've isolated the problem: During the startup of `SinkRefImpl` the timeout timer is attempted to be cancelled in `preStart` but it doesn't exist at that point of time. Afterwards, the last thing that `preStart` does is scheduling of a new timer that's never cancelled and leads to stream being stopped.\r\n\r\nI have tried using both `SourceRef` and `SinkRef` and I'm getting the same instability of the stream, however the exceptions logged are different depending on the case \r\n* in case of `SinkRef` being shared - the real exception is silently swallowed and it looks like the stream just stopped \r\n* in case of `SourceRef` being shared you can clearly see that it's due to the timer ` akka.stream.StreamRefSubscriptionTimeoutException ... Remote side did not subscribe (materialize) handed out Sink reference`\r\n\r\nI have created a small reproducer project here https://github.com/svozniuk/akka-streamref-issue\r\n\r\nThe bug can be observed both when running a Clustered version (see `Main.java` in the reproducer project) or a simple local `ActorSystem` (see `SourceRefTest.java` or `SinkRefTest.java`)\r\n\r\nThe main thing to observe in the logs - in 30 seconds the stream breaks, although it was successfully running and streaming data from source to sink"},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/383434049","html_url":"https://github.com/akka/akka/issues/24934#issuecomment-383434049","issue_url":"https://api.github.com/repos/akka/akka/issues/24934","id":383434049,"user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars1.githubusercontent.com/u/120979?v=4","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T02:03:34Z","updated_at":"2018-04-23T02:03:34Z","author_association":"OWNER","body":"I have a fix for this, thanks a lot for reporting."}}
{"actor":{"display_login":"ktoso"}}