Skip to content

Ix.Net ToObservableObservable throwing System.NotSupportedException: Specified method is not supported. #2212

@cowlinb6

Description

@cowlinb6

When using an IObservable we are intermittently seeing exceptions like:

at System.Linq.AsyncEnumerable.ToObservableObservable1.<>c__DisplayClass2_0.<<Subscribe>g__Core|0>d.MoveNext() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs:line 74" at Cloud.Common.Database.DocumentDbRepositoryBase1.GetItemsStream[T](String sqlString, CancellationToken cancellationToken, Int32 batchSize, Int32 priority)+System.IAsyncDisposable.DisposeAsync()"
Unhandled exception. System.NotSupportedException: Specified method is not supported.

Assembly: System.Linq.Asynq
Version: 6.0.3

Not able to reliable reproduce this, but the basic usage pattern we have is:

    IObservable<SomeType> source = ..

    var reportData = source
        .TakeWhile(_ => !cts.Token.IsCancellationRequested)
        .Do(_ =>
        {
            count++;

            if (count > settings.RowLimit)
            {
                cts.Cancel();
            }
        })
        .Select(call => Process(call,))
        .Where(filterFuncSummary)
        .ToList()
        .Subscribe(
            tcs.SetResult,
            tcs.SetException,
            () => tcs.TrySetResult([])
        );

    var results = tcs.Task.Result;

This is running in a Linux container (seen in Docker and in Kubernetes) running Alpine 3.2.1.

We don't seem to be able to catch this so it is crashing the pod.

Is this something we should be handling or an issue in the library?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions