Date: Sat, 08 Aug 2020 14:51:34 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248537] procstat -e/kvm_getenvv() fails for specific processes Message-ID: <bug-248537-227-S1eZXEgRNy@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-248537-227@https.bugs.freebsd.org/bugzilla/> References: <bug-248537-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248537 Konstantin Belousov <kib@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kib@FreeBSD.org --- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> --- Some possible reasons for ENOMEM from kern.proc.env are: - env vector corruption, e.g. if application filled env vector with invalid (or NULL) pointers - application made the env vector or env strings set larger that ARG_MAX. >From the kernel PoV, the environment strings exist only at the moment of the execve(2) calls, when strings for args and env are passed through kernel from previous program to the new one. Between execs, it is up to the usermode to maintain env strings in a way it finds most convenient. Sysctl kern.proc.env is a hack to satisfy the popular request assuming the application did not deviated much from the structure passed to the new program on exec. If it did deviate, kernel cannot do much. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248537-227-S1eZXEgRNy>
