You can also try installing the packages with debugging symbols for libssl and libmysqlclient, then get the trap again to see more details about what happens inside libssl and libmysqlclient. Now it seems that some function is overwritten from inside libmysqlclient.