Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2022 08:20:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 266113] kvm_close tries to munmap NULL memory
Message-ID:  <bug-266113-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266113

            Bug ID: 266113
           Summary: kvm_close tries to munmap NULL memory
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: ashish@FreeBSD.org

Created attachment 236241
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D236241&action=
=3Dedit
Fix

While trying to investigate bug #266027, where munmap returns errno 22, e.g.

  1249 meilisearch RET   __sysctl -1 errno 2 No such file or directory
  1249 meilisearch CALL  close(0x9)
  1249 meilisearch RET   close 0
  1249 meilisearch CALL  close(0xa)
  1249 meilisearch RET   close 0
  1249 meilisearch CALL  munmap(0,0)
  1249 meilisearch RET   munmap -1 errno 22 Invalid argument
  1249 meilisearch CALL  ioctl(0x2,TIOCGETA,0x7fffffff3a50)
  1249 meilisearch RET   ioctl 0
  1249 meilisearch CALL  compat11.stat(0x80842a440,0x7fffffff31e0)
  1249 meilisearch NAMI  "./data.ms"
  1249 meilisearch STRU  struct stat {dev=3D96, ino=3D3848946, mode=3D04075=
5,
nlink=3D5, uid=3D80, gid=3D0, rdev=3D7714475, atime=3D1661368882.434254000,
mtime=3D1661369653.564538000, ctime=3D1661369653.564538000,
birthtime=3D1661368882.433964000, size=3D512, blksize=3D32768, blocks=3D8, =
flags=3D0x0 }
  1249 meilisearch RET   compat11.stat 0


I traced  it to kvm_close:


GNU gdb (GDB) 12.1 [GDB v12.1 for FreeBSD]
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.1".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from work/stage/usr/local/bin/meilisearch...
(gdb) break munmap
Breakpoint 1 at 0x652c330
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>bt
>cont
>end
(gdb) break kvm_close
Function "kvm_close" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (kvm_close) pending.
(gdb) commands
Type commands for breakpoint(s) 2, one per line.
End with a line saying just "end".
>bt
>print kd
>cont
>end
(gdb) set pagination off
(gdb) run --no-analytics
Starting program:
/usr/home/abbe/abbe-freebsd-ports/textproc/meilisearch/work/stage/usr/local=
/bin/meilisearch
--no-analytics

Breakpoint 1, munmap () at munmap.S:4
4       munmap.S: No such file or directory.
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e9088 "/usr/local/lib/liblmdb.so.0",
sb=3Dsb@entry=3D0x7fffffffd338) at /usr/src/libexec/rtld-elf/map_object.c:3=
34
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x102381c "liblmdb=
.so.0",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x102381c "liblmdb.so.0", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e5028,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e5188 "/lib/libkvm.so.7", sb=3Dsb@entry=3D0x7ffff=
fffd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x1023829 "libkvm.=
so.7",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x1023829 "libkvm.so.7", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e5048,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e91c8 "/usr/lib/libprocstat.so.1",
sb=3Dsb@entry=3D0x7fffffffd338) at /usr/src/libexec/rtld-elf/map_object.c:3=
34
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x102378d
"libprocstat.so.1", sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>=
) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x102378d "libprocstat.so.1", fd_u=3D<optimized out=
>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e5068,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e5268 "/lib/libthr.so.3", sb=3Dsb@entry=3D0x7ffff=
fffd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x10237a7 "libthr.=
so.3",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x10237a7 "libthr.so.3", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e5088,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e52a8 "/lib/libgcc_s.so.1", sb=3Dsb@entry=3D0x7ff=
fffffd338)
at /usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x10237bc "libgcc_=
s.so.1",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x10237bc "libgcc_s.so.1", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e50a8,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e52e8 "/lib/libc.so.7", sb=3Dsb@entry=3D0x7ffffff=
fd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x10237e4 "libc.so=
.7",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x10237e4 "libc.so.7", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e50c8,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e5308 "/lib/libm.so.5", sb=3Dsb@entry=3D0x7ffffff=
fd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x1023812 "libm.so=
.5",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x1023812 "libm.so.5", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8008, needed=3D0x807=
6e50e8,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e5348 "/lib/libelf.so.2", sb=3Dsb@entry=3D0x7ffff=
fffd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x807724891 "libel=
f.so.2",
sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x807724891 "libelf.so.2", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076e8c08,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076e8c08, needed=3D0x807=
6e51a8,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()

Breakpoint 1, munmap () at munmap.S:4
4       in munmap.S
#0  munmap () at munmap.S:4
#1  0x00000008076dad20 in map_object (fd=3Dfd@entry=3D3,
path=3Dpath@entry=3D0x8076e5388 "/lib/libutil.so.9", sb=3Dsb@entry=3D0x7fff=
ffffd338) at
/usr/src/libexec/rtld-elf/map_object.c:334
#2  0x00000008076d512e in do_load_object (fd=3D3, name=3D0x807739622
"libutil.so.9", sbp=3D0x7fffffffd338, flags=3D0, path=3D<optimized out>) at
/usr/src/libexec/rtld-elf/rtld.c:2821
#3  load_object (name=3D0x807739622 "libutil.so.9", fd_u=3D<optimized out>,
fd_u@entry=3D-1, refobj=3D<optimized out>, refobj@entry=3D0x8076ec008,
flags=3D<optimized out>, flags@entry=3D0) at /usr/src/libexec/rtld-elf/rtld=
.c:2793
#4  0x00000008076cdbf3 in process_needed (obj=3D0x8076ec008, needed=3D0x807=
6e5228,
flags=3D0) at /usr/src/libexec/rtld-elf/rtld.c:2626
#5  load_needed_objects (first=3D<optimized out>, flags=3D0) at
/usr/src/libexec/rtld-elf/rtld.c:2647
#6  _rtld (sp=3D<optimized out>, exit_proc=3D0x7fffffffe900, objp=3D0x7ffff=
fffe908)
at /usr/src/libexec/rtld-elf/rtld.c:849
#7  0x00000008076cbf89 in rtld_start () at
/usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#8  0x0000000000000000 in ?? ()
warning: Could not load shared library symbols for [vdso].
Do you need "set solib-search-path" or "set sysroot"?
CLOSIN' KVM

Breakpoint 2, kvm_close (kd=3D0x80801b000) at /usr/src/lib/libkvm/kvm.c:280
280             if (kd =3D=3D NULL) {
#0  kvm_close (kd=3D0x80801b000) at /usr/src/lib/libkvm/kvm.c:280
#1  0x00000000070712c1 in
core::ptr::drop_in_place<sysinfo::freebsd::system::SystemInfo> ()
#2  0x000000000705e70f in core::ops::function::FnOnce::call_once ()
#3  0x00000000070f21c0 in once_cell::imp::OnceCell<T>::initialize::{{closur=
e}}
()
#4  0x000000000726453e in once_cell::imp::initialize_or_wait ()
#5  0x00000000070f1d02 in once_cell::imp::OnceCell<T>::initialize ()
#6  0x000000000711f3cd in <meilisearch_lib::options::IndexerOpts as
clap::derive::Args>::augment_args ()
#7  0x00000000070365f2 in <meilisearch_http::option::Opt as
clap::derive::Args>::augment_args ()
#8  0x0000000006d2d393 in meilisearch::main::{{closure}} ()
#9  0x0000000006d1cf86 in <core::future::from_generator::GenFuture<T> as
core::future::future::Future>::poll ()
#10 0x0000000006d2c268 in meilisearch::main ()
#11 0x0000000006c90043 in
std::sys_common::backtrace::__rust_begin_short_backtrace ()
#12 0x0000000006c91ed1 in std::rt::lang_start::{{closure}} ()
#13 0x000000000746cf51 in std::rt::lang_start_internal ()
#14 0x0000000006d33762 in main ()
$1 =3D (kvm_t *) 0x80801b000

Breakpoint 1, munmap () at munmap.S:4
4       munmap.S: No such file or directory.
#0  munmap () at munmap.S:4
#1  0x000000080772a877 in kvm_close (kd=3D0x80801b000) at
/usr/src/lib/libkvm/kvm.c:307
#2  0x00000000070712c1 in
core::ptr::drop_in_place<sysinfo::freebsd::system::SystemInfo> ()
#3  0x000000000705e70f in core::ops::function::FnOnce::call_once ()
#4  0x00000000070f21c0 in once_cell::imp::OnceCell<T>::initialize::{{closur=
e}}
()
#5  0x000000000726453e in once_cell::imp::initialize_or_wait ()
#6  0x00000000070f1d02 in once_cell::imp::OnceCell<T>::initialize ()
#7  0x000000000711f3cd in <meilisearch_lib::options::IndexerOpts as
clap::derive::Args>::augment_args ()
#8  0x00000000070365f2 in <meilisearch_http::option::Opt as
clap::derive::Args>::augment_args ()
#9  0x0000000006d2d393 in meilisearch::main::{{closure}} ()
#10 0x0000000006d1cf86 in <core::future::from_generator::GenFuture<T> as
core::future::future::Future>::poll ()
#11 0x0000000006d2c268 in meilisearch::main ()
#12 0x0000000006c90043 in
std::sys_common::backtrace::__rust_begin_short_backtrace ()
#13 0x0000000006c91ed1 in std::rt::lang_start::{{closure}} ()
#14 0x000000000746cf51 in std::rt::lang_start_internal ()
#15 0x0000000006d33762 in main ()
CLOSED KVM
New LWP 502834 of process 36294]
[New LWP 502835 of process 36294]
[New LWP 502836 of process 36294]
[New LWP 502837 of process 36294]

888b     d888          d8b 888 d8b=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
888
8888b   d8888          Y8P 888 Y8P=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
888
88888b.d88888              888=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
888
888Y88888P888  .d88b.  888 888 888 .d8888b   .d88b.   8888b.  888d888 .d888=
8b
88888b.
888 Y888P 888 d8P  Y8b 888 888 888 88K      d8P  Y8b     "88b 888P"  d88P"=
=20=20=20
888 "88b
888  Y8P  888 88888888 888 888 888 "Y8888b. 88888888 .d888888 888    888=20=
=20=20=20=20
888  888
888   "   888 Y8b.     888 888 888      X88 Y8b.     888  888 888    Y88b.=
=20=20=20
888  888
888       888  "Y8888  888 888 888  88888P'  "Y8888  "Y888888 888     "Y888=
8P
888  888



And then to narrow down it to munmap in it:


GNU gdb (GDB) 12.1 [GDB v12.1 for FreeBSD]
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.1".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from work/stage/usr/local/bin/meilisearch...
(gdb) break kvm_close
Function "kvm_close" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (kvm_close) pending.
(gdb) commands
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>print kd
>print kd->sparse_map
>print kd->pt_sparse_size
>bt
>cont
>end
(gdb) set pagination off
(gdb) run --no-analytics
Starting program:
/usr/home/abbe/abbe-freebsd-ports/textproc/meilisearch/work/stage/usr/local=
/bin/meilisearch
--no-analytics
warning: Could not load shared library symbols for [vdso].
Do you need "set solib-search-path" or "set sysroot"?
CLOSIN' KVM

Breakpoint 1, kvm_close (kd=3D0x80801b000) at /usr/src/lib/libkvm/kvm.c:280
280             if (kd =3D=3D NULL) {
$1 =3D (kvm_t *) 0x80801b000
$2 =3D (void *) 0x0
$3 =3D 0
#0  kvm_close (kd=3D0x80801b000) at /usr/src/lib/libkvm/kvm.c:280
#1  0x00000000070712c1 in
core::ptr::drop_in_place<sysinfo::freebsd::system::SystemInfo> ()
#2  0x000000000705e70f in core::ops::function::FnOnce::call_once ()
#3  0x00000000070f21c0 in once_cell::imp::OnceCell<T>::initialize::{{closur=
e}}
()
#4  0x000000000726453e in once_cell::imp::initialize_or_wait ()
#5  0x00000000070f1d02 in once_cell::imp::OnceCell<T>::initialize ()
#6  0x000000000711f3cd in <meilisearch_lib::options::IndexerOpts as
clap::derive::Args>::augment_args ()
#7  0x00000000070365f2 in <meilisearch_http::option::Opt as
clap::derive::Args>::augment_args ()
#8  0x0000000006d2d393 in meilisearch::main::{{closure}} ()
#9  0x0000000006d1cf86 in <core::future::from_generator::GenFuture<T> as
core::future::future::Future>::poll ()
#10 0x0000000006d2c268 in meilisearch::main ()
#11 0x0000000006c90043 in
std::sys_common::backtrace::__rust_begin_short_backtrace ()
#12 0x0000000006c91ed1 in std::rt::lang_start::{{closure}} ()
#13 0x000000000746cf51 in std::rt::lang_start_internal ()
#14 0x0000000006d33762 in main ()
CLOSED KVM
[New LWP 502865 of process 76791]
[New LWP 502866 of process 76791]
[New LWP 502867 of process 76791]
[New LWP 502868 of process 76791]

888b     d888          d8b 888 d8b=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
888
8888b   d8888          Y8P 888 Y8P=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
888
88888b.d88888              888=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
888
888Y88888P888  .d88b.  888 888 888 .d8888b   .d88b.   8888b.  888d888 .d888=
8b
88888b.
888 Y888P 888 d8P  Y8b 888 888 888 88K      d8P  Y8b     "88b 888P"  d88P"=
=20=20=20
888 "88b
888  Y8P  888 88888888 888 888 888 "Y8888b. 88888888 .d888888 888    888=20=
=20=20=20=20
888  888
888   "   888 Y8b.     888 888 888      X88 Y8b.     888  888 888    Y88b.=
=20=20=20
888  888
888       888  "Y8888  888 888 888  88888P'  "Y8888  "Y888888 888     "Y888=
8P
888  888




Attached patch adds additional check to prevent this

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266113-227>