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

CI Segfault when return type of KafkaSinkEncoder implementation is a union #1178

Closed
jtfmumm opened this issue Aug 23, 2017 · 11 comments
Closed

Comments

@jtfmumm
Copy link
Contributor

jtfmumm commented Aug 23, 2017

If we use the following code in celsius-kafka:

primitive FahrenheitEncoder
  fun apply(f: F32, wb: Writer): (Array[ByteSeq] val, (Array[ByteSeq] val | None)) =>
    wb.f32_be(f)
    (wb.done(), None)

then though it compiles on OSX and Dipin's Linux VM, it causes a segfault on Travis.

This signature does not trigger this:

primitive FahrenheitEncoder
  fun apply(f: F32, wb: Writer): (Array[ByteSeq] val, None) =>
    wb.f32_be(f)
    (wb.done(), None)

It may be that bringing this change over to Sendence compiler will address this:
ponylang/ponyc#1615

@jtfmumm jtfmumm added this to the 0.1.0 milestone Aug 23, 2017
@jtfmumm jtfmumm changed the title CI Segfault when return type of KafkaSinkEncoder is a union CI Segfault when return type of KafkaSinkEncoder implementation is a union Aug 23, 2017
@SeanTAllen
Copy link
Contributor

@jtfmumm did you mean #1615? that seems not like the right one.

@jtfmumm
Copy link
Contributor Author

jtfmumm commented Aug 24, 2017

@SeanTAllen Dipin was dealing with this issue earlier and thought it might be related. @dipinhora

@dipinhora
Copy link
Contributor

@SeanTAllen I thought #1615 might be the right one because what I encountered while developing the KafkaClient is that the AST sometimes causes either a segfault or some other not correct/useful error but which goes away once the AST is changed without necessarily changing the logic implemented. At the time, I didn't investigate because I didn't want to distract myself and it hasn't occurred recently for me so I can't try out #1615 to confirm if it fixes it or not.

I suggested #1615 to @jtfmumm because I assumed this issue in Travis was similar to what I was encountering but it is possible that the assumption is incorrect.

@SeanTAllen
Copy link
Contributor

The first code listed isn't legally valid. The 2nd is but I am still getting a segfault.

@SeanTAllen
Copy link
Contributor

#1190 which has ponylang/ponyc#1615 in it ran fine for CI. Closing this.

@jtfmumm
Copy link
Contributor Author

jtfmumm commented Aug 25, 2017

There was a typo in the first code listed. Fixed and reopening

@jtfmumm jtfmumm reopened this Aug 25, 2017
@SeanTAllen
Copy link
Contributor

I thought I had a minimal example for this, but I don't.

@dipinhora
Copy link
Contributor

@jtfmumm Why was this reopened? I thought the segfault was because of the bug fixed by ponylang/ponyc#1615.

@jtfmumm
Copy link
Contributor Author

jtfmumm commented Aug 25, 2017 via email

@SeanTAllen
Copy link
Contributor

@dipinhora it was never tested for that change. i am testing it now.

@jtfmumm i thought i had a minimal example. i was tired and wrong.

@SeanTAllen
Copy link
Contributor

This was fixed by #1615.

SeanTAllen added a commit that referenced this issue Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants