glibc error in router while running : malloc + pthread