Re: Advice for debugging a GC lockup

  • From: Mike Pall <mike-1501@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 28 Jan 2015 09:40:39 +0100

Kevin Thornberry wrote:
> I'm running LuaJIT on a PPC-based platform with some
> modifications to support non-JIT FFI, and with the v2.1 branch
> I'm seeing frequent lockups in an infinite loop in the GC.

Well, what's the nature of those modifications? Are you sure they
don't interfere with the GC by accident?

> The master branch with the same modifications applied does
> not exhibit these lockups.

Umm ... the GC is essentially unchanged between 2.0 and 2.1 ...

> It's highly likely I'm doing something incorrectly, but it's
> proving difficult to diagnose. I can only recreate the issue in
> my full application; I have not been able to create a test case.
> I was wondering if you had any thoughts based on this
> description:

My best guess is that your code is writing past the end of some
cdata object (usually an array) and this damages the GC info for
the following object. It depends a lot on the memory layout at
runtime when and where this causes trouble, so different versions
could easily make a difference.

--Mike

Other related posts: