Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing Type parameters to functions can cause SIGSEGV #38

Open
bojidar-bg opened this issue Oct 2, 2020 · 0 comments
Open

Passing Type parameters to functions can cause SIGSEGV #38

bojidar-bg opened this issue Oct 2, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@bojidar-bg
Copy link
Collaborator

Passing object of type Type between different FunctionApps running Perper.WebJobs.Extensions causes the receiving instance to segmentation fault whenever it interacts with the Type. Likely related to how Apache Ignite serializes those objects.

PerperTypeBug.zip
namespace Test1
{
    public class TestType
    {
        
    }
}
using Test1;
namespace Test2.FunctionApp
{
    public static class Launcher
    {
        [FunctionName("Launcher")]
        public static async Task Run([PerperModuleTrigger(RunOnStartup = true)]
            PerperModuleContext context,
            CancellationToken cancellationToken)
        {
            await context.StreamActionAsync("Test3.FunctionApp.TestStream.Run", new
            {
                type = typeof(TestType)
            });

            await context.BindOutput(cancellationToken);
        }
    }
}
using Test1;
namespace Test3.FunctionApp
{
    public static class TestStream
    {
        [FunctionName("TestStream")]
        public static async Task Run([PerperStreamTrigger]
            PerperStreamContext context,
            [Perper("type")] Type type,
            CancellationToken cancellationToken)
        {
            Console.WriteLine("{0} {1}", type, typeof(TestType));

            await context.BindOutput(cancellationToken);
        }
    }
}

Output:

Test3> func start --verbose
# ...
Application started. Press Ctrl+C to shut down.
[10/2/2020 9:50:59 AM] Starting 'Test3.FunctionApp.TestStream.Run' as ...
[10/2/2020 9:50:59 AM] Executing 'TestStream' (Reason='(null)', ...)
sh: “func start --verbose” terminated by signal SIGSEGV (Address boundary error)
Test2> func start -p 7072 --verbose
# ...
Application started. Press Ctrl+C to shut down.
[10/2/2020 9:50:59 AM] Executing 'Launcher' (Reason='(null)', Id=...)
@branimirangelov branimirangelov added the bug Something isn't working label Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants