Date: Wed, 3 Nov 2021 17:13:03 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: imb@protected-networks.net Cc: Ed Maste <emaste@freebsd.org>, Cy Schubert <Cy.Schubert@cschubert.com>, Greg V <greg@unrelenting.technology>, "freebsd-emulation@freebsd.org" <freebsd-emulation@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: current now panics when starting VBox VM Message-ID: <YYKm/5rJz9JEdgVY@kib.kiev.ua> In-Reply-To: <d40fb2c8-020a-d66b-6b4a-1a5acb9937a6@protected-networks.net> References: <d4c79b85-2668-3fe8-7c4a-9304e7fd88d1@protected-networks.net> <36923A7F-23DE-490D-B1FA-A8B064740BD6@unrelenting.technology> <202111022148.1A2LmeHX004930@slippy.cwsent.com> <1ccb6ce3-2cb7-e325-79e3-cda5640f24df@protected-networks.net> <CAPyFy2ADpz-wrFgP_YgmDvnKjoRYaQf3nTEwBpjLU6kBBRmsuQ@mail.gmail.com> <d40fb2c8-020a-d66b-6b4a-1a5acb9937a6@protected-networks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 03, 2021 at 11:05:11AM -0400, Michael Butler via freebsd-emulation wrote: > On 11/3/21 10:36, Ed Maste wrote: > The kgdb back-trace isn't any more enlightening to me :-( > > __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > 55 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct > pcpu, > (kgdb) bt > #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > #1 doadump (textdump=<optimized out>) at > /usr/src/sys/kern/kern_shutdown.c:399 > #2 0xffffffff808cbac5 in kern_reboot (howto=260) at > /usr/src/sys/kern/kern_shutdown.c:487 > #3 0xffffffff808cbedb in vpanic (fmt=<optimized out>, > ap=0xfffffe0129a6a8d0) at /usr/src/sys/kern/kern_shutdown.c:920 > #4 0xffffffff808cbd33 in panic (fmt=<unavailable>) at > /usr/src/sys/kern/kern_shutdown.c:844 > #5 0xffffffff80ca920c in trap_fatal (frame=frame@entry=0xfffffe0129a6aac0, > eva=0) at /usr/src/sys/amd64/amd64/trap.c:946 > #6 0xffffffff80ca95af in trap_pfault (frame=frame@entry=0xfffffe0129a6aac0, > usermode=false, signo=<optimized out>, signo@entry=0x0, ucode=<optimized > out>, ucode@entry=0x0) > at /usr/src/sys/amd64/include/cpufunc.h:417 > #7 0xffffffff80ca89bc in trap (frame=0xfffffe0129a6aac0) at > /usr/src/sys/amd64/amd64/trap.c:443 > #8 <signal handler called> > #9 strlen () at /usr/src/sys/amd64/amd64/support.S:751 > #10 0xffffffff808b4d79 in sysctl_kern_proc_pathname (oidp=<optimized out>, > arg1=0xfffffe0129a6ad8c, arg2=<optimized out>, req=0xfffffe0129a6acc0) at > /usr/src/sys/kern/kern_proc.c:2330 > #11 0xffffffff808dc331 in sysctl_root_handler_locked > (oid=oid@entry=0xffffffff810cf0e0 <sysctl___kern_proc_pathname>, > arg1=arg1@entry=0xfffffe0129a6ad8c, arg2=arg2@entry=1, > req=0xfffffe0129a6acc0, tracker=tracker@entry=0xfffffe0129a6ac38) at > /usr/src/sys/kern/kern_sysctl.c:185 > #12 0xffffffff808db88b in sysctl_root (oidp=<optimized out>, > arg1=0xfffffe0129a6ad8c, arg1@entry=0xfffffe0129a6ad80, arg2=1, > arg2@entry=4, req=req@entry=0xfffffe0129a6acc0) > at /usr/src/sys/kern/kern_sysctl.c:2305 > #13 0xffffffff808dbdf3 in userland_sysctl (td=td@entry=0xfffffe012991a000, > name=name@entry=0xfffffe0129a6ad80, namelen=4, old=<optimized out>, > oldlenp=<optimized out>, > inkernel=<optimized out>, inkernel@entry=0, new=0x0, newlen=0, > retval=0xfffffe0129a6ade8, flags=0) at /usr/src/sys/kern/kern_sysctl.c:2462 > #14 0xffffffff808dbc3c in sys___sysctl (td=0xfffffe012991a000, > uap=0xfffffe012991a3f0) at /usr/src/sys/kern/kern_sysctl.c:2335 > #15 0xffffffff80ca9b5c in syscallenter (td=0xfffffe012991a000) at > /usr/src/sys/amd64/amd64/../../kern/subr_syscall.c:189 > #16 amd64_syscall (td=0xfffffe012991a000, traced=0) at > /usr/src/sys/amd64/amd64/trap.c:1191 > #17 <signal handler called> > #18 0x000000080315a71a in ?? () > Backtrace stopped: Cannot access memory at address 0x7fffffffc778 > (kgdb) > Try this commit 2d3f95bd1fd4f71769f60b8037c1ff27c75d8258 Author: Konstantin Belousov <kib@FreeBSD.org> Date: Wed Nov 3 17:11:33 2021 +0200 proc_get_binpath(): return empty string instead of NULL for strange case where process does not have text. Sponsored by: The FreeBSD Foundation MFC after: 3 days diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 2156c5c465ba..d11f651960c0 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2252,7 +2252,7 @@ proc_get_binpath(struct proc *p, char *binname, char **retbuf, vp = p->p_textvp; if (vp == NULL) { PROC_UNLOCK(p); - *retbuf = NULL; + *retbuf = ""; *freebuf = NULL; return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YYKm/5rJz9JEdgVY>