Subject: bug#43002: 27.1; emacsclient does not like owner of socket on NetBSD

From: Thomas Klausner <[email-masked]>
Date: Sun, 23 Aug 2020 22:08:15 +0200

Start emacs, run 'start-server', start emacsclient <file> and see
emacsclient: Invalid socket owner

Digging deeper, in lib-src/emacsclient.c after
    if (fstat (s, &connect_stat) != 0)
    connect_stat.st_uid is 0 but uid is 1000

In GNU Emacs 27.1 (build 1, x86_64--netbsd, GTK+ Version 3.24.22)
 of 2020-08-23 built on yt.nih.at
System Description: NetBSD 9.99.69/amd64

Recent messages:
Loading company...done
Loading flycheck...done
Loading helm-mode...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --srcdir=/scratch/editors/emacs27/work/emacs-27.1
 --localstatedir=/var --disable-autodepend --without-ns --without-rsvg
 --without-imagemagick --x-includes=/usr/X11R7/include
 --x-libraries=/usr/X11R7/lib --with-x-toolkit=gtk3 --prefix=/usr/pkg
 --build=x86_64--netbsd --host=x86_64--netbsd --infodir=/usr/pkg/info
 --mandir=/usr/pkg/man --enable-option-checking=yes 'CFLAGS=-O2 -g
 -D_FORTIFY_SOURCE=2 -fstack-check -I/usr/pkg/include -I/usr/include
 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0
 -I/usr/pkg/lib/glib-2.0/include -I/usr/X11R7/include
 -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include/libdrm'
 'CPPFLAGS=-g -DTERMINFO -I/usr/pkg/include -I/usr/include
 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0
 -I/usr/pkg/lib/glib-2.0/include -I/usr/X11R7/include
 -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include/libdrm'
 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -L/usr/pkg/lib -L/usr/lib
 -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib
 -Wl,-R/usr/X11R7/lib''

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY KQUEUE ACL GNUTLS
LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER GMP

Important settings:
  value of $LC_CTYPE: de_AT.UTF-8
  value of $LC_TIME: de_AT.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  helm-ff-cache-mode: t
  shell-dirtrack-mode: t
  global-flycheck-mode: t
  global-company-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/wiz/.emacs.d/elpa/cmake-mode-20190710.1319/cmake-mode hides /usr/pkg/share/emacs/site-lisp/cmake-mode

Features:
(shadow sort mail-extr emacsbug message dired dired-loaddefs rfc822 mml
mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils term/screen term/xterm xterm advice
lsp-mode lsp-protocol yasnippet url-util tree-widget wid-edit spinner
network-stream puny nsm rmc markdown-mode color thingatpt noutline
outline lv inline imenu ht filenotify f s ewoc em-glob esh-util
dash-functional compile bindat company-oddmuse company-keywords
company-etags etags fileloop generator xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-bbdb tsdh-light-theme helm-mode helm-files
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete comint ring parse-time iso8601 time-date ls-lisp
helm-buffers helm-occur helm-tags helm-locate helm-grep helm-regexp
format-spec helm-utils helm-help helm-types helm easy-mmode helm-source
eieio-compat helm-multi-match helm-lib async flycheck ansi-color
find-func help-mode rx dash company edmacro kmacro pcase cus-start
cus-load finder-inf warnings server info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind kqueue dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 204469 13154)
 (symbols 48 23619 1)
 (strings 32 73234 2189)
 (string-bytes 1 2345870)
 (vectors 16 36165)
 (vector-slots 8 357511 9630)
 (floats 8 274 295)
 (intervals 56 334 56)
 (buffers 1000 13))