See also https://github.com/diegonehab/luasocket/issues/179 where I've posted some more investigation I performed.
As far as I can tell this is caused by the Debian specific patch 0001-add-LUASOCKET_API-to-timeout_markstart-init-for-lua-.patch. This is causing the linker to incorrectly match up the call to buffer_init in luasocket to a different function exported by libtwolame. Dropping the patch fixes the problem for me. However I presume the patch is there for a reason ("for lua-sec") but I couldn't find any information on why it is necessary. Regards, - Steve