SIGSEGV when using multiple kernel protocols