sass / sassc-ruby

Use libsass with Ruby!
MIT License
367 stars 156 forks source link

Core Dump using jRuby with sassc 2.4.0 #208

Closed jboler closed 3 years ago

jboler commented 4 years ago

Happens on Mac & Linux with jRuby & sassc v2.4.0. It doesn't happen with v2.3.0.

Haven't tested MRI.

Error in `/usr/local/lib/jvm/openjdk11/bin/java': double free or corruption (out): 0x00007fb7489170e0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fb77efce7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fb77efd737a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fb77efdb53c]
[0x7fb760c67890]
======= Memory map: ========
00400000-00401000 r-xp 00000000 08:01 791938                             /usr/local/lib/jvm/openjdk11/bin/java
00600000-00601000 r--p 00000000 08:01 791938                             /usr/local/lib/jvm/openjdk11/bin/java
00601000-00602000 rw-p 00001000 08:01 791938                             /usr/local/lib/jvm/openjdk11/bin/java
01d5f000-01d80000 rw-p 00000000 00:00 0                                  [heap]
...
7fb71e3f7000-7fb71e985000 r-xp 00000000 08:01 2315350                    /home/travis/.rvm/gems/jruby-9.2.11.0/gems/sassc-2.4.0/lib/sassc/libsass.so
7fb71e985000-7fb71eb85000 ---p 0058e000 08:01 2315350                    /home/travis/.rvm/gems/jruby-9.2.11.0/gems/sassc-2.4.0/lib/sassc/libsass.so
7fb71eb85000-7fb71eb94000 r--p 0058e000 08:01 2315350                    /home/travis/.rvm/gems/jruby-9.2.11.0/gems/sassc-2.4.0/lib/sassc/libsass.so
7fb71eb94000-7fb71ebab000 rw-p 0059d000 08:01 2315350                    /home/travis/.rvm/gems/jruby-9.2.11.0/gems/sassc-2.4.0/lib/sassc/libsass.so
...
headius commented 3 years ago

This may be related to https://github.com/jruby/jruby/issues/6310.

I have not done any investigation to know whether this is a sassc problem or a JRuby FFI problem, but we have no other known issues with double-freeing in JRuby FFI.

headius commented 3 years ago

@jboler Do you have an easy way to reproduce this?

headius commented 3 years ago

This may be fixed by https://github.com/jruby/jruby/pull/6331 but I do not have a way to reproduce or test... @jboler help!

headius commented 3 years ago

It looks as though jruby/jruby#6331 does indeed fix this issue. It will be released in JRuby 9.2.13.

jboler commented 3 years ago

I can reproduce it locally but I haven't tracked it down to a minimal case that I can upload. Is there a way to install a pre-release build of 9.2.13 to test it?

headius commented 3 years ago

@jboler We have one confirmation that it is fixed in the 9.2.13.0 snapshots, but more confirmation is good!

You can download a tarball from here: https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/9.2.13.0-SNAPSHOT/

jboler commented 3 years ago

Confirmed as fixed in jRuby 9.2.13.0