That’s not a crash, warnings don’t make the server crash or even halt execution of the script. Have you looked in the usermeta table to see if it is actually being duplicated, and that another duplicate entry is added every time this runs? Does this happen when you publish a new post only, or also when you save an already synced one?
Try removing $bb_roles from the list of globals that you added to config.php. There seems to be a problem with that. I don’t understand what’s going on in line 271 – the second parameter should be a function, but it’s providing an array? – but that’s involved and that’s the only thing that comes to mind.