assertion error in isc__timer_create(): task != ((void *)0)
Summary
The command host -t soa local.
crashed with an assertion error:
#2 0x00007fe590c645ef in isc_assertion_failed (file=file@entry=0x7fe590cb769c "../../../lib/isc/timer.c", line=line@entry=392, type=type@entry=isc_assertiontype_require, cond=cond@entry=0x7fe590cb0103 "task != ((void *)0)") at ../../../lib/isc/assertions.c:52
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/1797926
BIND version used
1:9.11.4+dfsg-3ubuntu5 in Ubuntu Cosmic 18.10 (https://launchpad.net/ubuntu/+source/bind9/1:9.11.4+dfsg-3ubuntu5)
Steps to reproduce
Unknown, but reporter indicated it was after his computer came back from sleep.
What is the current bug behavior?
The host
command failed with an assertion error.
What is the expected correct behavior?
The host
command should produce a result, or timeout and fail gracefully.
Relevant logs and/or screenshots
Backtrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Error: raise.c was not found in source tree]
#1 0x00007fe590a44535 in __GI_abort () at abort.c:79
[Error: abort.c was not found in source tree]
#2 0x00007fe590c645ef in isc_assertion_failed (file=file@entry=0x7fe590cb769c "../../../lib/isc/timer.c", line=line@entry=392, type=type@entry=isc_assertiontype_require, cond=cond@entry=0x7fe590cb0103 "task != ((void *)0)") at ../../../lib/isc/assertions.c:52
47: void
48: isc_assertion_failed(const char *file, int line, isc_assertiontype_t type,
49: const char *cond)
50: {
51: isc_assertion_failed_cb(file, line, type, cond);
52: abort();
53: /* NOTREACHED */
54: }
55:
56: /*% Set callback. */
57: void
#3 0x00007fe590c9245a in isc__timer_create (manager0=0x7fe58d741010, type=<optimized out>, expires=<optimized out>, interval=<optimized out>, task=0x0, action=0x55bcf1af75c0 <connect_timeout>, arg=0x7fe58d74e018, timerp=0x7fe58d74e288) at ../../../lib/isc/timer.c:457
452: timer->index = 0;
453: result = isc_mutex_init(&timer->lock);
454: if (result != ISC_R_SUCCESS) {
455: isc_task_detach(&timer->task);
456: isc_mem_put(manager->mctx, timer, sizeof(*timer));
457: return (result);
458: }
459: ISC_LINK_INIT(timer, link);
460: timer->common.impmagic = TIMER_MAGIC;
461: timer->common.magic = ISCAPI_TIMER_MAGIC;
462: timer->common.methods = (isc_timermethods_t *)&timermethods;
#4 0x000055bcf1aef75a in bringup_timer (query=0x7fe58d74e018, default_timeout=<optimized out>) at ../../../bin/dig/dighost.c:2949
2944: }
2945: debug("have local timeout of %d", local_timeout);
2946: isc_interval_set(&l->interval, local_timeout, 0);
2947: if (query->timer != NULL)
2948: isc_timer_detach(&query->timer);
2949: result = isc_timer_create(timermgr, isc_timertype_once, NULL,
2950: &l->interval, global_task, connect_timeout,
2951: query, &query->timer);
2952: check_result(result, "isc_timer_create");
2953: }
2954:
#5 0x000055bcf1af6e22 in send_udp (query=0x7fe58d74e018) at ../../../bin/dig/dighost.c:3135
3130: dig_query_t *next;
3131:
3132: debug("send_udp(%p)", query);
3133:
3134: l = query->lookup;
3135: bringup_timer(query, UDP_TIMEOUT);
3136: l->current_query = query;
3137: debug("working on lookup %p, query %p", query->lookup, query);
3138: if (!query->recv_made) {
3139: /* XXX Check the sense of this, need assertion? */
3140: query->waiting_connect = ISC_FALSE;
#6 0x000055bcf1af76c5 in connect_timeout (task=<optimized out>, event=<optimized out>) at ../../../bin/dig/dighost.c:3265
3260:
3261: if (l->retries > 1) {
3262: if (!l->tcp_mode) {
3263: l->retries--;
3264: debug("resending UDP request to first server");
3265: send_udp(ISC_LIST_HEAD(l->q));
3266: } else {
3267: debug("making new TCP request, %d tries left",
3268: l->retries);
3269: l->retries--;
3270: requeue_lookup(l, ISC_TRUE);
#7 0x00007fe590c8c439 in dispatch (manager=0x7fe58d73f010) at ../../../lib/isc/task.c:1141
1136: ISC_MSGSET_TASK,
1137: ISC_MSG_EXECUTE,
1138: "execute action"));
1139: if (event->ev_action != NULL) {
1140: UNLOCK(&task->lock);
1141: (event->ev_action)(
1142: (isc_task_t *)task,
1143: event);
1144: LOCK(&task->lock);
1145: }
1146: dispatch_count++;
#8 run (uap=0x7fe58d73f010) at ../../../lib/isc/task.c:1313
1308: isc__taskmgr_t *manager = uap;
1309:
1310: XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
1311: ISC_MSG_STARTING, "starting"));
1312:
1313: dispatch(manager);
1314:
1315: XTHREADTRACE(isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
1316: ISC_MSG_EXITING, "exiting"));
1317:
1318: #ifdef OPENSSL_LEAKS
#9 0x00007fe590c14164 in start_thread (arg=<optimized out>) at pthread_create.c:486
[Error: pthread_create.c was not found in source tree]
#10 0x00007fe590b3cdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
[Error: clone.S was not found in source tree]
The host
call that triggered the assertion was most likely the same one from issue #520 (closed)