The actual answer to your question is that ar_ptr = arena_for_chunk(p); is an internal data structure that determines where the memory should be freed to. However, you can keep digging there if you like, until you find why p which almost certainly is the buffer you pass in or some value closely related to it is "incorrect" - but that would be a bit like looking for your dropped keys under the streetlamp because you can see better there, rather than trying to find them where you dropped them.
When code in the standard library crashes, especially code that is called every time you run any trivial program, then it's 99.9% of the time caused by "bad input" - go look at the code calling the function, not inside the function (although it's worth looking back at whatever went wrong to determine which of the input parameters it was that caused the problem).
The actual problem is that your code is calling free() with a bad parameter, which makes the arena_for_chunk to be doing something wrong - given the value mem = 0xbffff11e in the line above, I expect that buffer is actually a value on the stack, which shouldn't be freed.