sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Peter Nicolai Mathias Hansteen
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

After upgrading to the 2016-06-02 snapshot and running my customary
pkg_add -vui (first with sudo, which failed, then with doas), sudo
fails with a "Bad system call" message,

[Fri Jun 03 20:09:35] peter@elke:~$ sudo ls
Bad system call

For my immediate purposes doas will do just fine, but I imagine others
with more advanced use cases will appreciate may want their old
standby to work.

dmesg follows (note sudo related lines at the end):

OpenBSD 6.0-beta (GENERIC.MP) #2165: Thu Jun  2 08:37:59 MDT 2016
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17046183936 (16256MB)
avail mem = 16524943360 (15759MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xeb500 (35 entries)
bios0: vendor American Megatrends Inc. version "4.6.5" date 11/21/2013
bios0: Notebook W840SU Series
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT ASF! SSDT SSDT SSDT MCFG HPET SSDT
SSDT DMAR CSRT
acpi0: wakeup devices PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4)
RP03(S4) PXSX(S4) RP04(S4) RLAN(S4) PXSX(S4) RP05(S4) PXSX(S4)
RP06(S4) PXSX(S4) RP07(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz, 2793.99 MHz
cpu0:
FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,
DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,PO
PCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,I
TSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz, 2793.54 MHz
cpu1:
FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,
DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,PO
PCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,I
TSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz, 2793.54 MHz
cpu2:
FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,
DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,PO
PCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,I
TSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz, 2793.54 MHz
cpu3:
FPU,VME,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,SSE3,PCLMUL,DTES64,MWAIT,
DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,PO
PCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,I
TSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP03)
acpiprt3 at acpi0: bus 3 (RP04)
acpiprt4 at acpi0: bus -1 (P0P2)
acpiprt5 at acpi0: bus -1 (P0PA)
acpiprt6 at acpi0: bus -1 (P0PB)
acpiprt7 at acpi0: bus -1 (PEG0)
acpiprt8 at acpi0: bus -1 (PEG1)
acpiprt9 at acpi0: bus -1 (PEG2)
acpiec0 at acpi0
acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@148 mwait.1@0x33),
C1(1000@1 mwait.1), PSS
acpitz0 at acpi0: critical temperature is 120 degC
"INT3F0D" at acpi0 not configured
"MSFT0001" at acpi0 not configured
"ETD0403" at acpi0 not configured
"PNPC000" at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: LID0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "BAT" serial 0001 type LION oem "Notebook"
"PNP0C14" at acpi0 not configured
"INT340E" at acpi0 not configured
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD1F
cpu0: Enhanced SpeedStep 2793 MHz: speeds: 2601, 2600, 2500, 2300,
2200, 2000, 1900, 1800, 1600, 1500, 1400, 1200, 1100, 1000, 800, 754 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x0b
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x0b
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1920x1080
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x0b: msi
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: ms
i
azalia1: codecs: Realtek ALC282
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xe4: msi
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 2 "Intel 8 Series PCIE" rev 0xe4: msi
pci2 at ppb1 bus 2
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev
0x73, msi
ppb2 at pci0 dev 28 function 3 "Intel 8 Series PCIE" rev 0xe4: msi
pci3 at ppb2 bus 3
rtsx0 at pci3 dev 0 function 0 "Realtek RTL8411B Card Reader" rev
0x01: msi
sdmmc0 at rtsx0: 4-bit
re0 at pci3 dev 0 function 1 "Realtek 8168" rev 0x12: RTL8411B
(0x5c80), msi, address 80:fa:5b:06:1f:f7
rgephy0 at re0 phy 7: RTL8251 PHY, rev. 0
ehci0 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2
int 23
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel 8 Series LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi,
AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 1: 6.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, WDC WD10SPCX-22H, 01.0> SCSI3
0/direct fixed naa.50014ee659ea420c
sd0: 953869MB, 512 bytes/sector, 1953525168 sectors
sd1 at scsibus1 targ 1 lun 0: <ATA, Crucial_CT240M50, MU05> SCSI3
0/direct fixed naa.500a07510c250249
sd1: 228936MB, 512 bytes/sector, 468862128 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 8 Series SMBus" rev 0x04:
apic 2 int 18
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
spdmem1 at iic0 addr 0x52: 8GB DDR3 SDRAM PC3-12800 SO-DIMM
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
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
error: [drm:pid0:intel_uncore_check_errors] *ERROR* Unclaimed register
before interrupt
uhidev0 at uhub0 port 4 configuration 1 interface 0 "eGalax Inc.
eGalaxTouch EXC7910-1057-13.00.00" rev 2.00/57.01 addr 2
uhidev0: iclass 3/1, 7 report ids
uhid0 at uhidev0 reportid 3: input=63, output=63, feature=0
uhid1 at uhidev0 reportid 5: input=0, output=0, feature=2
ums0 at uhidev0 reportid 6: 1 button, tip
wsmouse1 at ums0 mux 0
ums1 at uhidev0 reportid 7
ums1: mouse has no X report
ugen0 at uhub0 port 5 "Intel product 0x07dc" rev 2.00/0.01 addr 3
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Generic BisonCam,
NB Pro" rev 2.00/6.07 addr 4
video0 at uvideo0
uhub2 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (80f765a902e5ca12.a) swap on sd1b dump on sd1b
iwm0: hw rev 0x140, fw ver 16.242414.0, address a0:a8:cd:63:ab:b9
iwm0: begin active scan
iwm0: received beacon from 00:11:95:bb:49:5f rssi 35 mode auto
iwm0: received beacon from 00:11:95:bb:49:5f rssi 34 mode auto
iwm0: received beacon from e0:3f:49:23:bb:28 rssi 34 mode auto
iwm0: received beacon from 08:60:6e:cc:53:78 rssi 16 mode auto
iwm0: received beacon from e0:3f:49:23:bb:28 rssi 38 mode auto
iwm0: received beacon from e0:3f:49:23:bb:28 rssi 35 mode auto
iwm0: received beacon from 70:85:c6:ee:5a:af rssi 63 mode auto
iwm0: received beacon from 70:85:c6:ee:5a:af rssi 66 mode auto
iwm0: received beacon from e0:3f:49:23:bb:2c rssi 42 mode auto
iwm0: received beacon from 70:85:c6:ee:5a:ae rssi 58 mode auto
iwm0: end active scan
iwm0: sending auth to e0:3f:49:23:bb:2c on channel 36 mode 11a
iwm0: received auth from e0:3f:49:23:bb:2c rssi 46 mode 11a
iwm0: sending assoc_req to e0:3f:49:23:bb:2c on channel 36 mode 11a
iwm0: received assoc_resp from e0:3f:49:23:bb:2c rssi 46 mode 11a
iwm0: sending action to e0:3f:49:23:bb:2c on channel 36 mode 11n
iwm0: received msg 1/4 of the 4-way handshake from e0:3f:49:23:bb:2c
iwm0: sending msg 2/4 of the 4-way handshake to e0:3f:49:23:bb:2c
iwm0: received action from e0:3f:49:23:bb:2c rssi 46 mode 11n
iwm0: associated with e0:3f:49:23:bb:2c ssid
"we_see_all_your_naughty_bits" channel 36 start MCS 0 long preamble
long slot time HT enabled
iwm0: received msg 3/4 of the 4-way handshake from e0:3f:49:23:bb:2c
iwm0: sending msg 4/4 of the 4-way handshake to e0:3f:49:23:bb:2c
iwm0: sending action to e0:3f:49:23:bb:2c on channel 36 mode 11n
iwm0: received action from e0:3f:49:23:bb:2c rssi 45 mode 11n
thunderbird(8131): mmap W^X violation
crash of sudo(97672) signal 12
crash of sudo(50205) signal 12


- --
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXUckiAAoJELJiGF9h4DyeRCcQAJ0b7GbjAzgXYT97nHtoj2G9
IO8Y4vWhcFk5T5VPSno6UOgeLGke0WRYQjgw1S5XekPOh2lr2ST9bdrAU9lwmM2O
FL/6S6FQo7Bd6204ZG0sJqM9YzDzdT0+9DIqhIRN6tR7fvFKgDfmBQBPXjMsxnj4
ObSHrsSJ9UFa3ijKJ61c8YjZc0HiEU97E9PsogquRccXGwgeQ8Qld/Q6U8wueEzK
V9fBInoug5LSQhQKNmfgnA28l6wv3ycHwgbLWBVh2TEDczKH2VhWb9toAnFB5Ndf
f+UW8kZYjsFwlXrLKhklni7kD/HTbLeG+b2QeWLJFbVv0tF4+ksDedbnjVI/OUig
yTANJ17PDpXNFUD7+JLltL+5sE4y1RmCSxRUQ2fDO8ci69oL2TQhg7hAEBGN+Epj
lxjVPAPtWek/Rqh/u5MNFyjDHECMA579931KTd6SSwYAFnoy8Nxej6tawZOyJnJC
lR9dgejnoCswuwpMrmYIQ5BNLKdmrv+SFTLbueBP52NBKuX3V3NyGYJ7yhDqa9vV
1jZqo+kHiInd05/8EhYFg5hOAcI6BlF4BHV98knxWZWqhAlnH856Kiw+VOiNLFIH
FzV0zR8UOcTiX9S51/tM4Qesnq//gR8FSNxAkXntrlhZ3dWAxKgMjFdupYOh1WQg
s4x9hHmRTJAjDGHyH91Z
=rjiW
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Todd C. Miller
Perhaps your sudo binary is linked with an old libc that used
sys_osendsyslog?

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Peter Nicolai Mathias Hansteen
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/03/16 20:26, Todd C. Miller wrote:
> Perhaps your sudo binary is linked with an old libc that used
> sys_osendsyslog?

That's it exactly.

It looks like on this machine, I had an old /usr/bin/sudo lying around

[Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
- -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo

in addition to the one that came out of the more recent package

[Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
- -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo

and with a PATH like this

[Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
cal/bin:/usr/local/sbin:/usr/games:.

it's actually quite obvious.

$ doas rm -f /usr/bin/sudo*
$ doas rm -f /usr/bins/*sudo*

made sudo work again.

Note to self: upgrade notes are for reading

Thanks!

- --
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXUc7eAAoJELJiGF9h4Dye+s8QAKOyJEIvUhPcAVtcfdXOCEMH
MlZXmdDDbo2KlVsUthlnz4jBGNmX6DeQXbGlOlKm6VdbxedvpNtqeJ5RqxGe9ktv
X7lEw6KrBX/mJvDHJ80xPfxlGHZhl53NEkK3RPJ4BnTjFUOOn3EhPWkBRRHuB8lJ
atVurmj4JtN6R8hMog16CkHxCgZQaA4mdzYNEss0zmPaEU8l4bDn7MXdTlJhiaxm
jJAxUUhFDLMBpF7GMtjKYN4rITzB0eAlknNvJTcJ0FJV0h+HD7ipiqZADAtSn2Gt
udexhNn6c71xt6YbE7RmkNjk7obocWwciBm4xBEKNux9zT3bXGkQn477blc0mk30
bw0A8W5KFvIyXqHbr8w8oRFYx3teJQA1Ofhx5RhnGfpku+kgttfmhzjT4kunb5Du
lE6cv639thsKcNozfujTRfr5RxMeJI/mbOJj3Szui7Atk4MxTYyfoS1zdbmuafTc
U9kO0zOXn1tZf7Kr8hldgJohM400cIWeffZTR/Opo4Sz7k7px9ayHjnfYon0dOk2
IS0AiE+UOqB0nnFIxnobvQzkJLiIaBSulgb39OJ+Xe2kPaORiC1WOY2WGBC0Kb3n
v7KQdm5rfadgsl0bpIPsev7OnFDUNgpESmLclnpL/mNvxswiMDgzYQBEHOAYEO60
0HPAn0dBJdcQUAGykfuD
=7KIe
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Raf Czlonka-2
On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:

> On 06/03/16 20:26, Todd C. Miller wrote:
> > Perhaps your sudo binary is linked with an old libc that used
> > sys_osendsyslog?
>
> That's it exactly.
>
> It looks like on this machine, I had an old /usr/bin/sudo lying around
>
> [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
>
> in addition to the one that came out of the more recent package
>
> [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
>
> and with a PATH like this
>
> [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> cal/bin:/usr/local/sbin:/usr/games:.
>
> it's actually quite obvious.
>
> $ doas rm -f /usr/bin/sudo*
> $ doas rm -f /usr/bins/*sudo*
>
> made sudo work again.
>
> Note to self: upgrade notes are for reading

Also, 'sysclean' from ports is a very handy utility if one "forgets"
to read the notes[0] :^)

Regards,

Raf

[0] Even if one *does* read the notes, it is still very useful as it
    helps to clean-up files and directories not mentioned in the notes

> Thanks!
>
> --
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
>

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Amit Kulkarni-5
On Fri, Jun 3, 2016 at 4:45 PM, Raf Czlonka <[hidden email]> wrote:

> On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:
> > On 06/03/16 20:26, Todd C. Miller wrote:
> > > Perhaps your sudo binary is linked with an old libc that used
> > > sys_osendsyslog?
> >
> > That's it exactly.
> >
> > It looks like on this machine, I had an old /usr/bin/sudo lying around
> >
> > [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> > -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
> >
> > in addition to the one that came out of the more recent package
> >
> > [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> > -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
> >
> > and with a PATH like this
> >
> > [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> > /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> > bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> > cal/bin:/usr/local/sbin:/usr/games:.
> >
> > it's actually quite obvious.
> >
> > $ doas rm -f /usr/bin/sudo*
> > $ doas rm -f /usr/bins/*sudo*
> >
> > made sudo work again.
> >
> > Note to self: upgrade notes are for reading
>
> Also, 'sysclean' from ports is a very handy utility if one "forgets"
> to read the notes[0] :^)
>
> Regards,
>
> Raf
>
> [0] Even if one *does* read the notes, it is still very useful as it
>     helps to clean-up files and directories not mentioned in the notes
>
>

+1 for sysclean to check for obsolete packages. sysclean reminds you which
files are obsolete. but be careful deleting the files. I deleted a current
libc.so by mistake.... open a root shell somewhere and then start deleting
carefully, very carefully.
Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Raf Czlonka-2
On Sat, Jun 04, 2016 at 04:19:35AM BST, Amit Kulkarni wrote:

> On Fri, Jun 3, 2016 at 4:45 PM, Raf Czlonka <[hidden email]> wrote:
>
> > On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:
> > > On 06/03/16 20:26, Todd C. Miller wrote:
> > > > Perhaps your sudo binary is linked with an old libc that used
> > > > sys_osendsyslog?
> > >
> > > That's it exactly.
> > >
> > > It looks like on this machine, I had an old /usr/bin/sudo lying around
> > >
> > > [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> > > -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
> > >
> > > in addition to the one that came out of the more recent package
> > >
> > > [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> > > -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
> > >
> > > and with a PATH like this
> > >
> > > [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> > > /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> > > bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> > > cal/bin:/usr/local/sbin:/usr/games:.
> > >
> > > it's actually quite obvious.
> > >
> > > $ doas rm -f /usr/bin/sudo*
> > > $ doas rm -f /usr/bins/*sudo*
> > >
> > > made sudo work again.
> > >
> > > Note to self: upgrade notes are for reading
> >
> > Also, 'sysclean' from ports is a very handy utility if one "forgets"
> > to read the notes[0] :^)
> >
> > Regards,
> >
> > Raf
> >
> > [0] Even if one *does* read the notes, it is still very useful as it
> >     helps to clean-up files and directories not mentioned in the notes
> >
> >
>
> +1 for sysclean to check for obsolete packages. sysclean reminds you which
> files are obsolete. but be careful deleting the files. I deleted a current
> libc.so by mistake.... open a root shell somewhere and then start deleting
> carefully, very carefully.

Not sure how you managed to do that ;^)

The only time this might be dangerous is when new packages haven't yet
been cut for the new version of, i.e. libc, etc. and they still require
the old one.

Otherwise, create a /etc/sysclean.ignore *first* with something like:

@include "/etc/changelist"
/bsd.up
/etc/apm
/etc/hotplug/attach
/etc/iked.conf
/etc/kbdtype
/etc/mixerctl.conf
/etc/rebound.conf
/etc/ssl/private/private.csr
/etc/ssl/private/private.key
/etc/vi.exrc
/etc/wifi
/etc/wifi.nwid
/snapshots
/etc/sysclean.ignore # BTW, given that one can't specify another file,
                        # shouldn't this be implied and thus redundant?
...

Inspect if there's nothing which you had missed:

        doas sysclean

then simply:

        doas sysclean | while read $file ; do doas rm -fr "$file" ; done

and Bob's your uncle.

Regards,

Raf

Reply | Threaded
Open this post in threaded view
|

sysclean (Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call)

Sebastien Marie-2
On Sat, Jun 04, 2016 at 07:28:58AM +0100, Raf Czlonka wrote:
> >
> > +1 for sysclean to check for obsolete packages. sysclean reminds you which
> > files are obsolete. but be careful deleting the files. I deleted a current
> > libc.so by mistake.... open a root shell somewhere and then start deleting
> > carefully, very carefully.
>
> Not sure how you managed to do that ;^)

one possible scenario is manual installing libc.so (make install from
/usr/lib/libc), so without using make build or snapshot.

> The only time this might be dangerous is when new packages haven't yet
> been cut for the new version of, i.e. libc, etc. and they still require
> the old one.

with default mode (files mode), sysclean will *not* show libraries that
depend of installed packages (even if these libraries are old and
doesn't come from new system).

it is a key difference between sysclean -f (or just sysclean as it is
the default mode) and sysclean -a.

> Otherwise, create a /etc/sysclean.ignore *first* with something like:
>
> @include "/etc/changelist"
> /bsd.up
> /etc/apm
> /etc/hotplug/attach
> /etc/iked.conf
> /etc/kbdtype
> /etc/mixerctl.conf
> /etc/rebound.conf
> /etc/ssl/private/private.csr
> /etc/ssl/private/private.key
> /etc/vi.exrc
> /etc/wifi
> /etc/wifi.nwid
> /snapshots
> /etc/sysclean.ignore # BTW, given that one can't specify another file,
> # shouldn't this be implied and thus redundant?
> ...

sysclean follows strictly (or try to) the definition: show every files
not present on a default install. As "/etc/sysclean.ignore" isn't
present on a default install, it is showed.

--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Amit Kulkarni-5
In reply to this post by Raf Czlonka-2
On Sat, Jun 4, 2016 at 1:28 AM, Raf Czlonka <[hidden email]> wrote:

> On Sat, Jun 04, 2016 at 04:19:35AM BST, Amit Kulkarni wrote:
> > On Fri, Jun 3, 2016 at 4:45 PM, Raf Czlonka <[hidden email]> wrote:
> >
> > > On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:
> > > > On 06/03/16 20:26, Todd C. Miller wrote:
> > > > > Perhaps your sudo binary is linked with an old libc that used
> > > > > sys_osendsyslog?
> > > >
> > > > That's it exactly.
> > > >
> > > > It looks like on this machine, I had an old /usr/bin/sudo lying
> around
> > > >
> > > > [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> > > > -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
> > > >
> > > > in addition to the one that came out of the more recent package
> > > >
> > > > [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> > > > -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
> > > >
> > > > and with a PATH like this
> > > >
> > > > [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> > > >
> /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> > > >
> bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> > > > cal/bin:/usr/local/sbin:/usr/games:.
> > > >
> > > > it's actually quite obvious.
> > > >
> > > > $ doas rm -f /usr/bin/sudo*
> > > > $ doas rm -f /usr/bins/*sudo*
> > > >
> > > > made sudo work again.
> > > >
> > > > Note to self: upgrade notes are for reading
> > >
> > > Also, 'sysclean' from ports is a very handy utility if one "forgets"
> > > to read the notes[0] :^)
> > >
> > > Regards,
> > >
> > > Raf
> > >
> > > [0] Even if one *does* read the notes, it is still very useful as it
> > >     helps to clean-up files and directories not mentioned in the notes
> > >
> > >
> >
> > +1 for sysclean to check for obsolete packages. sysclean reminds you
> which
> > files are obsolete. but be careful deleting the files. I deleted a
> current
> > libc.so by mistake.... open a root shell somewhere and then start
> deleting
> > carefully, very carefully.
>
> Not sure how you managed to do that ;^)
>

Let us call it my thinking bug :)


>
> The only time this might be dangerous is when new packages haven't yet
> been cut for the new version of, i.e. libc, etc. and they still require
> the old one.
>

When I see those bad system major messages I usually Ctrl + C pkg_add and
then wait a day or two (sometimes during release a week or two) for the
next set of packages. Once all system is updated then only I think it makes
sense to run sysclean.


>
> Otherwise, create a /etc/sysclean.ignore *first* with something like:
>
> @include "/etc/changelist"
> /bsd.up
> /etc/apm
> /etc/hotplug/attach
> /etc/iked.conf
> /etc/kbdtype
> /etc/mixerctl.conf
> /etc/rebound.conf
> /etc/ssl/private/private.csr
> /etc/ssl/private/private.key
> /etc/vi.exrc
> /etc/wifi
> /etc/wifi.nwid
> /snapshots
> /etc/sysclean.ignore    # BTW, given that one can't specify another file,
>                         # shouldn't this be implied and thus redundant?
> ...
>
> Inspect if there's nothing which you had missed:
>
>         doas sysclean
>
> then simply:
>
>         doas sysclean | while read $file ; do doas rm -fr "$file" ; done
>

Raf, you are brave!
Reply | Threaded
Open this post in threaded view
|

Re: sysclean (Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call)

Raf Czlonka-2
In reply to this post by Sebastien Marie-2
On Sat, Jun 04, 2016 at 07:52:28AM BST, Sebastien Marie wrote:

> On Sat, Jun 04, 2016 at 07:28:58AM +0100, Raf Czlonka wrote:
> > >
> > > +1 for sysclean to check for obsolete packages. sysclean reminds you which
> > > files are obsolete. but be careful deleting the files. I deleted a current
> > > libc.so by mistake.... open a root shell somewhere and then start deleting
> > > carefully, very carefully.
> >
> > Not sure how you managed to do that ;^)
>
> one possible scenario is manual installing libc.so (make install from
> /usr/lib/libc), so without using make build or snapshot.

Ah, yes - I mainly use snapshots :^)

> > The only time this might be dangerous is when new packages haven't yet
> > been cut for the new version of, i.e. libc, etc. and they still require
> > the old one.
>
> with default mode (files mode), sysclean will *not* show libraries that
> depend of installed packages (even if these libraries are old and
> doesn't come from new system).
>
> it is a key difference between sysclean -f (or just sysclean as it is
> the default mode) and sysclean -a.

Running 'sysclean -a' is exactly what I had in mind.

> > Otherwise, create a /etc/sysclean.ignore *first* with something like:
> >
> > @include "/etc/changelist"
> > /bsd.up
> > /etc/apm
> > /etc/hotplug/attach
> > /etc/iked.conf
> > /etc/kbdtype
> > /etc/mixerctl.conf
> > /etc/rebound.conf
> > /etc/ssl/private/private.csr
> > /etc/ssl/private/private.key
> > /etc/vi.exrc
> > /etc/wifi
> > /etc/wifi.nwid
> > /snapshots
> > /etc/sysclean.ignore # BTW, given that one can't specify another file,
> > # shouldn't this be implied and thus redundant?
> > ...
>
> sysclean follows strictly (or try to) the definition: show every files
> not present on a default install. As "/etc/sysclean.ignore" isn't
> present on a default install, it is showed.

Sure, I know how it works :^)

The very existence of /etc/sysclean.ignore should imply the file
itself being ignored as it is neither obvious from the man page
(this is what I actually expected to happen) nor is there a way to
use a different .ignore file. Otherwise users will simply loose the
.ignore file - I must've done that at least several times but good ol'
Puppet manages it for me ;^)

This all is of course IMVHO and I don't expect everyone to agree :^)

Sebastien, thank you for writing 'sysclean' - it made the task of
keeping the system tidy, much more pleasurable.

Regards,

Raf

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Stuart Henderson
In reply to this post by Amit Kulkarni-5
On 2016/06/04 07:32, Amit Kulkarni wrote:
> When I see those bad system major messages I usually Ctrl + C pkg_add and
> then wait a day or two

A safer way is to keep an eye on source-changes (or the odc/owc lists,
or tail CVSROOT/ChangeLog) if you're running -current, and watch out for
library bumps.

> > Inspect if there's nothing which you had missed:
> >
> >         doas sysclean
> >
> > then simply:
> >
> >         doas sysclean | while read $file ; do doas rm -fr "$file" ; done
> >
>
> Raf, you are brave!

I think so too. I normally write this out to a file and edit it.

With moreutils installed, "sysclean | vidir -" is quite convenient
(delete the lines in your editor and exit, then it deletes the
files matching the lines you deleted).

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Raf Czlonka-2
In reply to this post by Amit Kulkarni-5
On Sat, Jun 04, 2016 at 01:32:23PM BST, Amit Kulkarni wrote:

> On Sat, Jun 4, 2016 at 1:28 AM, Raf Czlonka <[hidden email]> wrote:
>
> > On Sat, Jun 04, 2016 at 04:19:35AM BST, Amit Kulkarni wrote:
> > > On Fri, Jun 3, 2016 at 4:45 PM, Raf Czlonka <[hidden email]> wrote:
> > >
> > > > On Fri, Jun 03, 2016 at 07:39:31PM BST, Peter N. M. Hansteen wrote:
> > > > > On 06/03/16 20:26, Todd C. Miller wrote:
> > > > > > Perhaps your sudo binary is linked with an old libc that used
> > > > > > sys_osendsyslog?
> > > > >
> > > > > That's it exactly.
> > > > >
> > > > > It looks like on this machine, I had an old /usr/bin/sudo lying
> > around
> > > > >
> > > > > [Fri Jun 03 20:32:59] peter@elke:~$ ls -l `which sudo`
> > > > > -r-sr-xr-x  2 root  bin  157480 Jun 30  2015 /usr/bin/sudo
> > > > >
> > > > > in addition to the one that came out of the more recent package
> > > > >
> > > > > [Fri Jun 03 20:33:20] peter@elke:~$ ls -l /usr/local/bin/sudo
> > > > > -r-sr-xr-x  1 root  bin  134023 May 23 19:21 /usr/local/bin/sudo
> > > > >
> > > > > and with a PATH like this
> > > > >
> > > > > [Fri Jun 03 20:34:20] peter@elke:~$ echo $PATH
> > > > >
> > /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/s
> > > > >
> > bin:/usr/X11R6/bin:/home/peter/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
> > > > > cal/bin:/usr/local/sbin:/usr/games:.
> > > > >
> > > > > it's actually quite obvious.
> > > > >
> > > > > $ doas rm -f /usr/bin/sudo*
> > > > > $ doas rm -f /usr/bins/*sudo*
> > > > >
> > > > > made sudo work again.
> > > > >
> > > > > Note to self: upgrade notes are for reading
> > > >
> > > > Also, 'sysclean' from ports is a very handy utility if one "forgets"
> > > > to read the notes[0] :^)
> > > >
> > > > Regards,
> > > >
> > > > Raf
> > > >
> > > > [0] Even if one *does* read the notes, it is still very useful as it
> > > >     helps to clean-up files and directories not mentioned in the notes
> > > >
> > > >
> > >
> > > +1 for sysclean to check for obsolete packages. sysclean reminds you
> > which
> > > files are obsolete. but be careful deleting the files. I deleted a
> > current
> > > libc.so by mistake.... open a root shell somewhere and then start
> > deleting
> > > carefully, very carefully.
> >
> > Not sure how you managed to do that ;^)
> >
>
> Let us call it my thinking bug :)
>

:^)

Anyway, Sebastien provided a real life scenario when that might happen.

> >
> > The only time this might be dangerous is when new packages haven't yet
> > been cut for the new version of, i.e. libc, etc. and they still require
> > the old one.
> >
>
> When I see those bad system major messages I usually Ctrl + C pkg_add and
> then wait a day or two (sometimes during release a week or two) for the
> next set of packages. Once all system is updated then only I think it makes
> sense to run sysclean.
>

I always let it finish without any ill effects - there's plenty of
packages which update just fine (shell, Perl, etc.).

> >
> > Otherwise, create a /etc/sysclean.ignore *first* with something like:
> >
> > @include "/etc/changelist"
> > /bsd.up
> > /etc/apm
> > /etc/hotplug/attach
> > /etc/iked.conf
> > /etc/kbdtype
> > /etc/mixerctl.conf
> > /etc/rebound.conf
> > /etc/ssl/private/private.csr
> > /etc/ssl/private/private.key
> > /etc/vi.exrc
> > /etc/wifi
> > /etc/wifi.nwid
> > /snapshots
> > /etc/sysclean.ignore    # BTW, given that one can't specify another file,
> >                         # shouldn't this be implied and thus redundant?
> > ...
> >
> > Inspect if there's nothing which you had missed:
> >
> >         doas sysclean
> >
> > then simply:
> >
> >         doas sysclean | while read $file ; do doas rm -fr "$file" ; done
> >
>
> Raf, you are brave!

If the output of 'sysclean' differs between two subsequent runs,
then there's a reason to worry.

Sure, static list (i.e. 'cat file | ...') would have been much safer,
and copy-pasting one of the worst ideas.

Raf

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Raf Czlonka-2
In reply to this post by Stuart Henderson
On Sat, Jun 04, 2016 at 02:06:14PM BST, Stuart Henderson wrote:

> On 2016/06/04 07:32, Amit Kulkarni wrote:
> > > Inspect if there's nothing which you had missed:
> > >
> > >         doas sysclean
> > >
> > > then simply:
> > >
> > >         doas sysclean | while read $file ; do doas rm -fr "$file" ; done
> > >
> >
> > Raf, you are brave!
>
> I think so too. I normally write this out to a file and edit it.

;^)

Please see my earlier reply.

Reply | Threaded
Open this post in threaded view
|

Re: sysclean (Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call)

Sebastien Marie-2
In reply to this post by Sebastien Marie-2
On Sat, Jun 04, 2016 at 08:52:28AM +0200, Sebastien Marie wrote:

> On Sat, Jun 04, 2016 at 07:28:58AM +0100, Raf Czlonka wrote:
> > >
> > > +1 for sysclean to check for obsolete packages. sysclean reminds you which
> > > files are obsolete. but be careful deleting the files. I deleted a current
> > > libc.so by mistake.... open a root shell somewhere and then start deleting
> > > carefully, very carefully.
> >
> > Not sure how you managed to do that ;^)
>
> one possible scenario is manual installing libc.so (make install from
> /usr/lib/libc), so without using make build or snapshot.
>

just to be complete: this scenario isn't possible with a recent version
of sysclean (since 1.6).

If a base library comes with a more recent version of the expected one,
a warning (on stderr) will be echoed, but the filename won't be present
on the final list.

--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: sudo-1.8.16p0 on 2016-06-02 snapshot: Bad system call

Stuart Henderson
In reply to this post by Raf Czlonka-2
On 2016/06/04 14:12, Raf Czlonka wrote:
> I always let it finish without any ill effects - there's plenty of
> packages which update just fine (shell, Perl, etc.).

The problem comes when you have some libraries updated and others
not updated. When there are inter-library dependencies, in some cases
you can now have two incompatible versions of the library loaded
at once which can cause crashes and other damage.