The function attributes don't play a role here because this code was
called by a callback and they would warn only at compile time.
(gdb) list log_thread_start
62 void log_thread_start (pthread_attr_t *attr)
63 {
64 logdbg(stderr,"enter log_thread_start\n");
65
66 logq_lock = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
67 logev_lock = (pthread_mutex_t *)
malloc(sizeof(pthread_mutex_t));
68 logev_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t));
69
70 pthread_mutex_init(logq_lock, NULL);
71 pthread_mutex_init(logev_lock, NULL);
72 pthread_cond_init(logev_cond, NULL);
73
74 if (log_init("multipathd", 0)) {
75 fprintf(stderr,"can't initialize log buffer\n");
76 exit(1);
77 }
78 pthread_create(&log_thr, attr, log_thread, NULL);
79
80 return;
81 }
Meaning that the code:
71 pthread_mutex_init(logev_lock, NULL);
likely failed to initialize the "logev_lock" pthread_mutex and THAT caused the
error and segfault later.
(From this analysis, this is the real problem to solve)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1687004
Title:
multipath crash generating core dump
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1687004/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs