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

crystal i crashes in HAR shard #14830

Closed
bararchy opened this issue Jul 24, 2024 · 4 comments
Closed

crystal i crashes in HAR shard #14830

bararchy opened this issue Jul 24, 2024 · 4 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. status:duplicate topic:compiler:interpreter

Comments

@bararchy
Copy link
Contributor

while trying to play around with the har shard, I got an error and then a crash

icr:4> har = HAR::Log.new
 => Error while calling inspect on value: compiling x.inspect
#<HAR::Log:0x797efbdaf5c0 @version="1.2" @creator=#<HAR::Creator:0x797effb64f00 @name="Crystal HAR", @version="1.2.0", @comment=nil> @browser=#<HAR::Browser:0x797effb64ed0 @name="Crystal HAR", @version="1.2.0", @comment=nil> @pages=nil @entries=[] @comment=nil>
icr:5> har
 => Invalid memory access (signal 11) at address 0x700000018
[0x6442d5f12669] ?? +110238219970153 in crystal
[0x6442d5f12620] ?? +110238219970080 in crystal
[0x797f11bd21d0] ?? +133586665415120 in /usr/lib/libc.so.6
[0x6442d65bdd19] ?? +110238226963737 in crystal
[0x6442d63d72fb] ?? +110238224970491 in crystal
[0x6442d65e2bf6] ?? +110238227114998 in crystal
[0x6442d69a2e9d] ?? +110238231047837 in crystal
[0x6442d699f82c] ?? +110238231033900 in crystal
[0x6442d68fe265] ?? +110238230372965 in crystal
[0x6442d5eb99bf] __crystal_main +36271 in crystal
[0x6442d5ebef69] main +73 in crystal
[0x797f11bbae08] ?? +133586665319944 in /usr/lib/libc.so.6
[0x797f11bbaecc] __libc_start_main +140 in /usr/lib/libc.so.6
[0x6442d5eb0b35] _start +37 in crystal
[0x0] ???

@bararchy bararchy added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Jul 24, 2024
@straight-shoota
Copy link
Member

This works with my local interpreter build.

So this issue might be related to the interpreter failure we're observing when upgrading the CI workflows to build with Crystal 1.13.1: https://github.com/crystal-lang/crystal/actions/runs/9922862004/job/27739788863?pr=14810
I'm currently investigating that and so far I've narrowed it down to an interpreter built with a compiler that uses LLVM 18. So if your version of the interpreter is built from a compiler with LLVM 18, it's likely the same issue.
Unfortunately, building the interpreter in debug mode makes the memory issue go away.

@bararchy
Copy link
Contributor Author

bararchy commented Jul 24, 2024

@straight-shoota yeha, seems I snugged the same issue then:

crystal --version
Crystal 1.13.0 (2024-07-09)

LLVM: 18.1.8
Default target: x86_64-pc-linux-gnu

Tough my version is 1.13 and not 1.13.1

@straight-shoota
Copy link
Member

I don't think the compiler version matters much. It's the LLVM version that the compiler was compiled with (i.e. the current compiler's parent).

@straight-shoota
Copy link
Member

Duplicate of #14832

@straight-shoota straight-shoota marked this as a duplicate of #14832 Jul 25, 2024
@straight-shoota straight-shoota closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. status:duplicate topic:compiler:interpreter
Projects
None yet
Development

No branches or pull requests

3 participants