I have strange issues. I installed go port and figured out that go compiler and executables produced by it require 770 MB of datasize. I bumped datasize-max and datasize-cur of login class `default' to 771 MB. Then programs being run as another user stopped working with `cannot allocate memory' error, while there's clearly plenty of memory. E.g. useradd -m a7sl4 ; doas -u a7sl4 mpv "$x". Then reboot, cannot login as usual user to xdm. Login(1)s on ttys didn't even run. Logged in as root to xdm, changed login class of user to `staff', and then only relogged as usual user. I don't really know what is going on and appreciate any help.
ps auxw USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND _x11 2566 21.8 1.5 13536 15856 ?? Rs 2:51AM 1:39.99 /usr/X11R6/bin/X :0 vt05 -auth /etc/X11/xdm/authdir/authfiles/A:0 root 1 0.0 0.0 480 480 ?? Ss 2:51AM 0:01.15 /sbin/init root 3899 0.0 0.0 628 396 ?? Is 2:51AM 0:00.04 dhclient: alc0 [priv] (dhclient) _dhcp 14600 0.0 0.0 744 484 ?? Is 2:51AM 0:00.01 dhclient: alc0 (dhclient) _syslogd 28193 0.0 0.1 944 1296 ?? S 2:51AM 0:00.05 /usr/sbin/syslogd root 15932 0.0 0.1 944 1160 ?? Is 2:51AM 0:00.02 syslogd: [priv] (syslogd) root 20610 0.0 0.1 624 552 ?? Is 2:51AM 0:00.04 pflogd: [priv] (pflogd) _pflogd 31696 0.0 0.0 688 364 ?? S 2:51AM 0:00.05 pflogd: [running] -s 160 -i pflog0 -f /var/log/pflog (pflogd) root 2681 0.0 0.1 660 1316 ?? I<s 2:51AM 0:00.01 ntpd: [priv] (ntpd) _ntp 1120 0.0 0.2 1380 2512 ?? S< 2:51AM 0:00.15 ntpd: ntp engine (ntpd) _ntp 5306 0.0 0.1 928 1320 ?? I 2:51AM 0:00.02 ntpd: dns engine (ntpd) _smtpq 30513 0.0 0.2 1444 1992 ?? I 2:51AM 0:00.02 smtpd: queue (smtpd) root 30736 0.0 0.2 1460 1904 ?? Is 2:51AM 0:00.03 smtpd: [priv] (smtpd) _smtpd 17934 0.0 0.2 1320 1888 ?? I 2:51AM 0:00.02 smtpd: lookup (smtpd) _smtpd 16021 0.0 0.2 1380 2280 ?? I 2:51AM 0:00.01 smtpd: pony express (smtpd) _smtpd 12548 0.0 0.2 1244 1748 ?? I 2:51AM 0:00.01 smtpd: klondike (smtpd) _smtpd 8725 0.0 0.2 1176 1736 ?? I 2:51AM 0:00.02 smtpd: scheduler (smtpd) _smtpd 31670 0.0 0.2 1448 1988 ?? I 2:51AM 0:00.02 smtpd: control (smtpd) _sndio 15485 0.0 0.1 368 524 ?? I<s 2:51AM 0:00.05 /usr/bin/sndiod -c 0:3 _transmission 7888 0.0 0.2 1544 2364 ?? Ss 2:51AM 0:00.58 /usr/local/bin/transmission-daemon (transmission-dae) root 8430 0.0 0.1 356 776 ?? Ss 2:51AM 0:00.04 /usr/sbin/apmd -A root 398 0.0 0.1 356 784 ?? Is 2:51AM 0:00.03 /usr/sbin/hotplugd root 14252 0.0 0.1 660 1084 ?? Is 2:51AM 0:00.02 /usr/sbin/cron root 24072 0.0 0.2 548 1660 ?? Is 2:51AM 0:00.23 /usr/X11R6/bin/xdm root 3450 0.0 0.1 2320 1188 ?? I 2:51AM 0:00.31 X: [priv] (Xorg) root 16612 0.0 0.5 1332 5516 ?? Is 2:51AM 0:00.60 xdm: :0 (xdm) u 3291 0.0 0.1 644 632 ?? Is 2:51AM 0:00.02 /bin/sh /etc/X11/xdm/Xsession u 65 0.0 0.1 644 624 ?? I 2:51AM 0:00.03 /bin/sh /home/u/.xsession u 10190 0.0 0.5 1096 4828 ?? S 2:51AM 0:00.31 cwm u 15624 0.0 0.5 1584 5300 ?? Ss 2:52AM 0:01.46 st u 6913 0.1 0.2 1160 2160 ?? Ss 2:52AM 0:02.80 tmux: server (/tmp/tmux-1000/default) (tmux) root 15233 0.0 0.0 632 504 ?? S 2:59AM 0:00.00 /sbin/init root 9263 0.0 0.0 620 500 ?? S 2:59AM 0:00.00 /sbin/init root 3639 0.0 0.0 620 496 ?? S 2:59AM 0:00.00 /sbin/init root 30257 0.0 0.0 620 496 ?? S 2:59AM 0:00.00 /sbin/init root 6873 0.0 0.0 632 504 ?? S 2:59AM 0:00.00 /sbin/init u 1482 0.0 0.1 648 672 p0 Is 2:52AM 0:00.13 /bin/ksh u 17821 0.0 0.2 744 1588 p0 I+ 2:52AM 0:00.04 tmux: client (/tmp/tmux-1000/default) (tmux) u 23676 0.0 0.1 652 688 p1 Ss 2:59AM 0:00.05 -ksh (ksh) u 1353 0.0 0.0 392 376 p1 R+ 2:59AM 0:00.00 ps -auxw u 28398 0.0 0.1 652 696 p2 Is 2:53AM 0:00.03 -ksh (ksh) u 20896 0.0 0.5 2256 5272 p2 I+ 2:53AM 0:00.34 mutt u 24336 0.0 0.1 628 624 p2 I+ 2:54AM 0:00.02 sh -c vi '/tmp/mutt-f-1000-20896-2086274160382066302' u 22876 0.0 0.3 1408 2692 p2 S+ 2:54AM 0:00.18 vi /tmp/mutt-f-1000-20896-2086274160382066302 vmstat procs memory page disk traps cpu r b w avm fre flt re pi po fr sr sd0 int sys cs us sy id 2 1 0 45560 887980 471 0 0 0 0 0 8 83 2196 170 5 1 94 systat 0 users Load 0.58 0.50 0.29 Sat Mar 19 03:03:43 2016 memory totals (in KB) PAGING SWAPPING Interrupts real virtual free in out in out 405 total Active 47052 47052 885948 ops 401 clock All 117236 117236 2183340 pages 2 ipi acpi0 Proc:r d s w Csw Trp Sys Int Sof Flt 1 forks azalia0 1 18 59 103 304 2 102 123 fkppw 1 alc0 fksvm ehci0 0.0%Int 0.6%Sys 1.2%Usr 0.0%Nic 98.2%Idle pwait 1 ahci0 | | | | | | | | | | | relck pckbc0 > rlkok pckbc0 noram Namei Sys-cache Proc-cache No-cache 42 ndcpy Calls hits % hits % miss % fltcp 256 256 100 15 zfod 29 cow Disks sd0 8359 fmin seeks 11145 ftarg xfers 1 itarg speed 10K 49 wired sec 0.1 pdfre pdscn pzidle 26 kmapent IPKTS OPKTS dmesg OpenBSD 5.8 (GENERIC.MP) #1: Wed Mar 16 10:05:46 CET 2016 r...@stable-58-i386.mtier.org:/binpatchng/work-binpatch58-i386/src/sys/arch/i386/compile/GENERIC.MP cpu0: Intel(R) Atom(TM) CPU N2600 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC real mem = 1060052992 (1010MB) avail mem = 1026433024 (978MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: date 03/15/11, SMBIOS rev. 2.7 @ 0xe96d0 (31 entries) bios0: vendor American Megatrends Inc. version "X101CH.1203" date 07/30/2012 bios0: ASUSTeK COMPUTER INC. X101CH acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC MCFG RTCF HPET SSDT SLIC BGRT acpi0: wakeup devices P0P8(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=22785, max=32960 cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Atom(TM) CPU N2600 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC cpu2 at mainbus0: apid 2 (application processor) cpu2: Intel(R) Atom(TM) CPU N2600 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu2: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Atom(TM) CPU N2600 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz cpu3: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF,ITSC ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (RP01) acpiprt2 at acpi0: bus 2 (RP02) acpiprt3 at acpi0: bus 3 (RP03) acpiprt4 at acpi0: bus 4 (RP04) acpiec0 at acpi0 acpicpu0 at acpi0 C2: state 2: substate 0 >= num 0: C1(1000@1 mwait.1), PSS acpicpu1 at acpi0 C2: state 2: substate 0 >= num 0: C1(1000@1 mwait.1), PSS acpicpu2 at acpi0 C2: state 2: substate 0 >= num 0: C1(1000@1 mwait.1), PSS acpicpu3 at acpi0 C2: state 2: substate 0 >= num 0: C1(1000@1 mwait.1), PSS acpitz0 at acpi0: critical temperature is 255 degC acpibat0 at acpi0: BAT0 model "X101CH" serial type LION oem "ASUS" acpiac0 at acpi0: AC unit online acpibtn0 at acpi0: PWRB acpibtn1 at acpi0: SLPB acpibtn2 at acpi0: LID_ acpivideo0 at acpi0: GFX0 acpivout0 at acpivideo0: DD02 bios0: ROM list: 0xc0000/0xf400! cpu0: Enhanced SpeedStep 1597 MHz: speeds: 1600, 1400, 1200, 1000, 800, 600 MHz pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel Atom D2000/N2000 Host" rev 0x03 vga1 at pci0 dev 2 function 0 "Intel Atom D2000/N2000 Video" rev 0x09 intagp at vga1 not configured wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi azalia0: codecs: Realtek ALC269, Intel/0x2880, using Realtek ALC269 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 4 int 16 pci1 at ppb0 bus 1 ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 4 int 17 pci2 at ppb1 bus 2 "Atheros AR9485" rev 0x01 at pci2 dev 0 function 0 not configured ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 4 int 18 pci3 at ppb2 bus 3 ppb3 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 4 int 19 pci4 at ppb3 bus 4 alc0 at pci4 dev 0 function 0 "Attansic Technology L2C" rev 0xc1: msi, address 10:bf:48:6e:2f:02 atphy0 at alc0 phy 0: F2 10/100 PHY, rev. 5 uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 4 int 23 uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 4 int 21 uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 4 int 18 uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 4 int 16 ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 4 int 23 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2 pci5 at ppb4 bus 5 pcib0 at pci0 dev 31 function 0 "Intel NM10 LPC" rev 0x02 ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x02: msi, AHCI 1.1 ahci0: port 0: 3.0Gb/s ahci0: PHY offline on port 1 scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HTS54323, ES2O> SCSI3 0/direct fixed naa.5000cca706c23c49 sd0: 305245MB, 512 bytes/sector, 625142448 sectors ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 4 int 20 iic0 at ichiic0 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 pms0: Synaptics touchpad, firmware 7.5 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 uvideo0 at uhub0 port 4 configuration 1 interface 0 "Chicony Electronics Co., Ltd. USB2.0 0.3M UVC WebCam" rev 2.00/62.53 addr 2 video0 at uvideo0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (471274ddab6c1945.a) swap on sd0b dump on sd0b cat /etc/login.conf # $OpenBSD: login.conf,v 1.4 2015/07/20 18:53:19 sthen Exp $ # # Sample login.conf file. See login.conf(5) for details. # # # Standard authentication styles: # # passwd Use only the local password file # chpass Do not authenticate, but change users password (change # the YP password if the user has one, else change the # local password) # lchpass Do not login; change user's local password instead # radius Use radius authentication # reject Use rejected authentication # skey Use S/Key authentication # activ ActivCard X9.9 token authentication # crypto CRYPTOCard X9.9 token authentication # snk Digital Pathways SecureNet Key authentication # tis TIS Firewall Toolkit authentication # token Generic X9.9 token authentication # yubikey YubiKey authentication # # Default allowed authentication styles auth-defaults:auth=passwd,skey: # Default allowed authentication styles for authentication type ftp auth-ftp-defaults:auth-ftp=passwd: # # The default values # To alter the default authentication types change the line: # :tc=auth-defaults:\ # to be read something like: (enables passwd, "myauth", and activ) # :auth=passwd,myauth,activ:\ # Any value changed in the daemon class should be reset in default # class. # default:\ :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\ :umask=022:\ :datasize-max=512:\ :datasize-cur=512:\ :maxproc-max=256:\ :maxproc-cur=128:\ :openfiles-cur=512:\ :stacksize-cur=4M:\ :localcipher=blowfish,8:\ :ypcipher=old:\ :tc=auth-defaults:\ :tc=auth-ftp-defaults: # # Settings used by /etc/rc and root # This must be set properly for daemons started as root by inetd as well. # Be sure reset these values back to system defaults in the default class! # daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=128:\ :stacksize-cur=8M:\ :localcipher=blowfish,9:\ :tc=default: # # Staff have fewer restrictions and can login even when nologins are set. # staff:\ :datasize-cur=512M:\ :datasize-max=infinity:\ :maxproc-max=512:\ :maxproc-cur=128:\ :ignorenologin:\ :requirehome@:\ :tc=default: # # Authpf accounts get a special motd and shell # authpf:\ :welcome=/etc/motd.authpf:\ :shell=/usr/sbin/authpf:\ :tc=default: # # Building ports with DPB uses raised limits # pbuild:\ :datasize-max=infinity:\ :datasize-cur=2048M:\ :maxproc-max=1024:\ :maxproc-cur=256:\ :tc=default: # # Override resource limits for certain daemons started by rc.d(8) # bgpd:\ :openfiles-cur=512:\ :tc=daemon: unbound:\ :openfiles-cur=512:\ :tc=daemon: