[Bug 1687004] Re: multipath crash generating core dump
Rafael David Tinoco
rafael.tinoco at canonical.com
Fri Apr 28 12:15:34 UTC 2017
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
Foundations Bugs, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1687004
Title:
multipath crash generating core dump
Status in multipath-tools package in Ubuntu:
In Progress
Bug description:
It was brought to my attention that:
multipath-tools: 0.4.9-3ubuntu7.15
Faced a crash and generated a dump.
## multipath (trusty) crashed and its dump shows:
(gdb) bt full
#0 __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:66
__PRETTY_FUNCTION__ = "__pthread_mutex_lock"
type = 0
#1 0x00007f48700b606e in flush_logqueue () at log_pthread.c:39
empty = 0
#2 0x00007f48700b611b in log_thread (et=0x0) at log_pthread.c:57
No locals.
#3 0x00007f4870964184 in start_thread (arg=0x7f4870d8b700) at pthread_create.c:312
__res = <optimized out>
pd = 0x7f4870d8b700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139949107623680, -3200163692152804016, 0, 0, 139949107624384, 139949107623680, 3244383534590274896,
3244383107817352528}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#4 0x00007f486fdb537d in __ecvt_r (value=9.532824124368238e-130, ndigit=0, decpt=0x0, sign=0x0, buf=0x7f4870d8b9c0 "\220R\267pH\177", len=139949107623680)
at efgcvt_r.c:218
d = 0
f = 3.2378592100206092e-319
exponent = 1893250816
#5 0x0000000000000000 in ?? ()
No symbol table info available.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1687004/+subscriptions
More information about the foundations-bugs
mailing list