delv isc_app_ctxsuspend ctx->running ASSERTION

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

delv isc_app_ctxsuspend ctx->running ASSERTION

Steve Egbert
Assertion in `delv` utility.

Had an assertion error for `delv` utility in trying to perform suspend
thread.

Doesn't seem specific to any thing, argument-wise.

Environment:
Linux 4.19
Debian 10.3
Custom built Bind v9.17.1


bind9/lib/isc/app.c:422
void
isc_app_ctxsuspend(isc_appctx_t *ctx) {
        REQUIRE(VALID_APPCTX(ctx));

        REQUIRE(atomic_load(&ctx->running));

        /*
         * Don't send the reload signal if we're shutting down.
         */
        if (atomic_load_acquire(&ctx->shutdown_requested) == false) {


Traceback:

# delv -v
delv 9.17.1-dev

# delv @ns1.egbert.net _imap._tcp.egbert.net srv
app.c:422: REQUIRE(__extension__ ({ __auto_type __atomic_load_ptr =
(&ctx->running); __typeof__ (*__atomic_load_ptr) __atomic_load_tmp;
__atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (5));
__atomic_load_tmp; })) failed, back trace
/usr/local/lib/libisc.so.1701(+0x2e5f3) [0x7f06d633d5f3]
/usr/local/lib/libisc.so.1701(isc_assertion_failed+0xa) [0x7f06d633d55a]
/usr/local/lib/libisc.so.1701(+0x2e12a) [0x7f06d633d12a]
/usr/local/lib/libirs.so.1700(+0x5099) [0x7f06d60bb099]
/usr/local/lib/libisc.so.1701(+0x4cb3b) [0x7f06d635bb3b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f06d609cfa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f06d5fcd4cf]
Aborted
#
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: delv isc_app_ctxsuspend ctx->running ASSERTION

Steve Egbert
> Had an assertion error for `delv` utility in trying to perform suspend
> thread.
>
> Doesn't seem specific to any thing, argument-wise.
>
> Environment:
> Linux 4.19
> Debian 10.3
> Custom built Bind v9.17.1
>
>
> bind9/lib/isc/app.c:422
> void
> isc_app_ctxsuspend(isc_appctx_t *ctx) {
>      REQUIRE(VALID_APPCTX(ctx));
>
>      REQUIRE(atomic_load(&ctx->running));
>
>      /*
>       * Don't send the reload signal if we're shutting down.
>       */
>      if (atomic_load_acquire(&ctx->shutdown_requested) == false) {
>
>
> Traceback:
>
> # delv -v
> delv 9.17.1-dev
>
Gdb reported:

root@ns1:~/admin/bind9/bind9/lib# exit
exit
(gdb) b isc_app_ctxsuspend
Breakpoint 1 at 0x7ffff7f7e020: isc_app_ctxsuspend. (2 locations)
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/bin/delv @ns1.egbert.net
_pop3s._tcp.mx1.egbert.net. srv
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff752f700 (LWP 14643)]
[New Thread 0x7ffff6d04700 (LWP 14644)]
[New Thread 0x7ffff6503700 (LWP 14645)]
[New Thread 0x7ffff5517700 (LWP 14646)]
[New Thread 0x7ffff4cec700 (LWP 14647)]
[New Thread 0x7ffff44eb700 (LWP 14648)]
[Switching to Thread 0x7ffff5517700 (LWP 14646)]

Thread 5 "isc-worker0000" hit Breakpoint 1, isc_app_ctxsuspend (
     ctx=0x7ffff5518010) at app.c:420
420 REQUIRE(VALID_APPCTX(ctx));
(gdb) bt
#0  isc_app_ctxsuspend (ctx=0x7ffff5518010) at app.c:420
#1  0x00007ffff7cfc099 in process_answer (task=<optimized out>,
     event=<optimized out>) at getaddrinfo.c:908
#2  0x00007ffff7f9cb3b in dispatch (threadid=<optimized out>,
     manager=0x7ffff5519010) at task.c:1152
#3  run (queuep=<optimized out>) at task.c:1344
#4  0x00007ffff7cddfa3 in start_thread (arg=<optimized out>)
     at pthread_create.c:486
#5  0x00007ffff7c0e4cf in clone ()
     at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Who should I contact about this utility?  Github history shows two
contributors to the lib/isc/app.c file:

* Ondřej Surý
* Evan Hunt


_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: delv isc_app_ctxsuspend ctx->running ASSERTION

Steve Egbert
>> Had an assertion error for `delv` utility in trying to perform suspend
>> thread.
>>
>> Doesn't seem specific to any thing, argument-wise.
>>

This is weird.

`*ctx->running` is set to `true`.

It would have continued on normally to suspending the thread, if it
weren't for that `REQUIRE(VALID_APPCTX(ctx));` logic.

Using:
* gcc 8.3.0
* ld (GNU Binutils 2.31.1)
* ISC library 1701
* ISCCFG library 1700
* ISCCC library 1700
* IRC library 1700


Full GNU gcc version output:
```console
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++
--prefix=/usr --with-gcc-major-version-only --program-suffix=-8
--program-prefix=x86_64-linux-gnu- --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin
--enable-default-pie --with-system-zlib --with-target-system-zlib
--enable-objc-gc=auto --enable-multiarch --disable-werror
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)
```
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users