Chrome crashes when jemalloc build pack is used on Heroku
lukgni opened this issue · 1 comments
In my application I use Ferrum gem to control Chrome over DevTools protocoll. I observed that chrome process has segmentation fault each time when I want to navigate to some webpage. I found that source of this problem is jemalloc build pack which exports LD_PRELOAD=/app/vendor/jemalloc/lib/libjemalloc.so
to bash env-vars.
As chrome is already shipped with its own memory allocator (tcmalloc), forcing linker to use jemalloc instead, will result in some unexpected errors or segmentation faults, like in my case.
I think that the simplest way to solve this would be just adding:
unset LD_PRELOAD
or LD_PRELOAD=
to /app/.apt/usr/bin/google-chrome (-$GOOGLE_CHROME_CHANNEL)
shims.
This will prevent from any other linker injection (possibly forced by other build packs) what I believe would improve stability of chrome in Heroku and remove any unexpected dependencies between this and other build-packs.