I ran a perfectly innocuous Perl one-liner in my xterm, and it printed
the correct output. But then, the xterm stopped responding to keyboard
input.

Here is my dmesg:

OpenBSD 6.0 (GENERIC.MP) #2319: Tue Jul 26 13:00:43 MDT 2016
    dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2130247680 (2031MB)
avail mem = 2061271040 (1965MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf0700 (45 entries)
bios0: vendor American Megatrends Inc. version "0316" date 09/09/2010
bios0: ASUSTeK Computer INC. AT5IONT-I
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET
acpi0: wakeup devices P0P1(S4) PS2K(S4) PS2M(S4) USB0(S4) USB1(S4)
USB2(S4) USB3(S4) EUSB(S4) P0PA(S4) P0P5(S4) LAN_(S4) P0P6(S4)
P0P7(S4) P0P8(S4) P0P9(S4) SLPB(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) Atom(TM) CPU D525 @ 1.80GHz, 1800.26 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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 200MHz
cpu0: mwait min=64, max=64, C-substates=0.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: smt 1, core 0, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU D525 @ 1.80GHz, 1800.00 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,DTES64,MWAIT,DS-CPL,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,NXE,LONG,LAHF,PERF,SENSOR
cpu3: 512KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
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 (P0P1)
acpiprt2 at acpi0: bus 5 (P0PA)
acpiprt3 at acpi0: bus 6 (EHUB)
acpiprt4 at acpi0: bus -1 (DPT2)
acpiprt5 at acpi0: bus 10 (DPT6)
acpiprt6 at acpi0: bus 4 (P0P5)
acpiprt7 at acpi0: bus 3 (P0P6)
acpiprt8 at acpi0: bus 2 (P0P7)
acpiprt9 at acpi0: bus -1 (P0P8)
acpiprt10 at acpi0: bus -1 (P0P9)
acpicpu0 at acpi0: C1(@1 halt!)
acpicpu1 at acpi0: C1(@1 halt!)
acpicpu2 at acpi0: C1(@1 halt!)
acpicpu3 at acpi0: C1(@1 halt!)
aibs0 at acpi0 RTMP RVLT RFAN GGRP GITM SITM
acpibtn0 at acpi0: PWRB
pci0 at mainbus0 bus 0
0:31:2: mem address conflict 0xfc00/0x400
pchb0 at pci0 dev 0 function 0 "Intel Pineview DMI" rev 0x02
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Realtek/0x0887
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 5
ppb1 at pci1 dev 0 function 0 vendor "PLX", unknown product 0x8608 rev 0xba
pci2 at ppb1 bus 6
ppb2 at pci2 dev 1 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci3 at ppb2 bus 13
ppb3 at pci2 dev 4 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci4 at ppb3 bus 12
ppb4 at pci2 dev 5 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci5 at ppb4 bus 11
ppb5 at pci2 dev 6 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci6 at ppb5 bus 10
jmb0 at pci6 dev 0 function 0 "JMicron JMB360 SATA" rev 0x02
ahci0 at jmb0: apic 4 int 18, AHCI 1.0
scsibus1 at ahci0: 32 targets
ppb6 at pci2 dev 7 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci7 at ppb6 bus 9
ppb7 at pci2 dev 8 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci8 at ppb7 bus 8
ppb8 at pci2 dev 9 function 0 vendor "PLX", unknown product 0x8608 rev 0xba: msi
pci9 at ppb8 bus 7
ppb9 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci10 at ppb9 bus 4
re0 at pci10 dev 0 function 0 "Realtek 8168" rev 0x03: RTL8168D/8111D
(0x2800), msi, address bc:ae:c5:9a:1a:de
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 PHY, rev. 2
ppb10 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: msi
pci11 at ppb10 bus 3
vga1 at pci11 dev 0 function 0 vendor "NVIDIA", unknown product 0x0a64 rev 0xa2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
azalia1 at pci11 dev 0 function 1 vendor "NVIDIA", unknown product
0x0be3 rev 0xa1: msi
azalia1: no supported codecs
ppb11 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: msi
pci12 at ppb11 bus 2
xhci0 at pci12 dev 0 function 0 "NEC xHCI" rev 0x03: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "NEC xHCI root hub" rev 3.00/1.00 addr 1
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 19
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
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb12 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci13 at ppb12 bus 1
pcib0 at pci0 dev 31 function 0 "Intel NM10 LPC" rev 0x02
pciide0 at pci0 dev 31 function 2 "Intel 82801GB SATA" rev 0x02: DMA,
channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 4 int 19 for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus2 at atapiscsi0: 2 targets
cd0 at scsibus2 targ 0 lun 0: <PIONEER, BD-RW BDR-207D, 1.10> ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
wd0 at pciide0 channel 1 drive 0: <Samsung SSD 850 EVO 250GB>
wd0: 1-sector PIO, LBA48, 238475MB, 488397168 sectors
wd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 4 int 19
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR3 SDRAM PC3-8500 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "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
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
it0 at isa0 port 0x2e/2: IT8721F rev 1, EC port 0x290
uhidev0 at uhub4 port 1 configuration 1 interface 0 "Logitech USB
Receiver" rev 2.00/12.01 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub4 port 1 configuration 1 interface 1 "Logitech USB
Receiver" rev 2.00/12.01 addr 2
uhidev1: iclass 3/1, 8 report ids
ums0 at uhidev1 reportid 2: 16 buttons, Z and W dir
wsmouse0 at ums0 mux 0
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 8: input=1, output=0, feature=0
uhidev2 at uhub4 port 1 configuration 1 interface 2 "Logitech USB
Receiver" rev 2.00/12.01 addr 2
uhidev2: iclass 3/0, 33 report ids
uhid3 at uhidev2 reportid 16: input=6, output=6, feature=0
uhid4 at uhidev2 reportid 17: input=19, output=19, feature=0
uhid5 at uhidev2 reportid 32: input=14, output=14, feature=0
uhid6 at uhidev2 reportid 33: input=31, output=31, feature=0
uhidev3 at uhub4 port 2 configuration 1 interface 0 "Logitech USB
Receiver" rev 2.00/12.01 addr 3
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 variable keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev4 at uhub4 port 2 configuration 1 interface 1 "Logitech USB
Receiver" rev 2.00/12.01 addr 3
uhidev4: iclass 3/1, 8 report ids
ums1 at uhidev4 reportid 2: 16 buttons, Z and W dir
wsmouse1 at ums1 mux 0
uhid7 at uhidev4 reportid 3: input=4, output=0, feature=0
uhid8 at uhidev4 reportid 4: input=1, output=0, feature=0
uhid9 at uhidev4 reportid 8: input=1, output=0, feature=0
uhidev5 at uhub4 port 2 configuration 1 interface 2 "Logitech USB
Receiver" rev 2.00/12.01 addr 3
uhidev5: iclass 3/0, 33 report ids
uhid10 at uhidev5 reportid 16: input=6, output=6, feature=0
uhid11 at uhidev5 reportid 17: input=19, output=19, feature=0
uhid12 at uhidev5 reportid 32: input=14, output=14, feature=0
uhid13 at uhidev5 reportid 33: input=31, output=31, feature=0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on wd0a (055f2dce3f856a5c.a) swap on wd0b dump on wd0b

And a sample 100 lines of ktrace output:

 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed6a0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed370,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  select(5,0x120066791d20,0x120066791ca0,0,0)
 82460 xterm    STRU  struct fd_set { 3,4 }
 82460 xterm    STRU  struct fd_set { }
 82460 xterm    STRU  struct fd_set { 3 }
 82460 xterm    STRU  struct fd_set { }
 82460 xterm    RET   select 1
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    GIO   fd 3 read 32 bytes
       "\b\^D   
\^W\M-/\M^U(\0]\^B\0\0\r\0@\^A\^[\0@\^A\M-e\0S\^A\M-^\0l\0\b\0\0\^C"
 82460 xterm    STRU  struct msghdr { name=0x0, namelen=0,
iov=0x7f7ffffed3f0, iovlen=1, control=0x7f7ffffed370, controllen=0,
flags=0x80<MSG_DONTWAIT> }
 82460 xterm    STRU  struct iovec { base=0x1202fd91104c, len=4064 }
 82460 xterm    RET   recvmsg 32/0x20
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed370,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  poll(0x7f7ffffed280,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed2d0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed2d0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed280,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed6a0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed370,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>,
revents=0x1<POLLIN> }
 82460 xterm    RET   poll 1
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed150,0)
 82460 xterm    GIO   fd 3 read 32 bytes
       "
        \^C     \^W\r\0@\^A\^C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
 82460 xterm    STRU  struct msghdr { name=0x0, namelen=0,
iov=0x7f7ffffed180, iovlen=1, control=0x7f7ffffed100, controllen=0,
flags=0x80<MSG_DONTWAIT> }
 82460 xterm    STRU  struct iovec { base=0x1202fd91104c, len=4064 }
 82460 xterm    RET   recvmsg 32/0x20
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed150,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  select(5,0x120066791d20,0x120066791ca0,0,0x120066791c80)
 82460 xterm    STRU  struct timeval { 0 }
 82460 xterm    STRU  struct fd_set { 3,4 }
 82460 xterm    STRU  struct fd_set { }
 82460 xterm    STRU  struct fd_set { }
 82460 xterm    STRU  struct fd_set { }
 82460 xterm    RET   select 0
 82460 xterm    CALL  poll(0x7f7ffffed370,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  poll(0x7f7ffffed280,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed2d0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed290,1,INFTIM)
 82460 xterm    STRU  struct pollfd { fd=3,
events=0x5<POLLIN|POLLOUT>, revents=0x4<POLLOUT> }
 82460 xterm    RET   poll 1
 82460 xterm    CALL  writev(3,0x7f7ffffed3a0,3)
 82460 xterm    STRU  struct iovec [3] { base=0x1202a0ec6000, len=136
} { base=0x0, len=0 } { base=0x1202c74d1820, len=0 }
 82460 xterm    GIO   fd 3 wrote 136 bytes
       
"\M^K\^Z\a\0\^A\0@\^A"\0@\^A\M^?\M^?\M^?\M^?\M^?\M^?\M^?\M^?'\0.\0\v\0\^V\0\M^K\^F\
        \^E\0"\0@\^A'\0.\0\0\0\0\0\v\0\^V\0\M^K\^W
        \0\^Cnt 
$\0@\^A"\0@\^A#\0\0\0\^S\0@\^A\0\0\0\0\^A\0\0\0'\0@\0\^C\0\^B\0\M^K\^E\^D\
        \0"\0@\^A@\0\0\0\0\0\0\0A\^A\b\0\^[\0@\^A!\0@\^A'\0.\0
        \0\0\0\0\0\^U\0\M-v\M^?\0\0\0\0\M-k\M^?"
 82460 xterm    RET   writev 136/0x88
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed2d0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed280,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed6a0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  recvmsg(3,0x7f7ffffed3c0,0)
 82460 xterm    RET   recvmsg -1 errno 35 Resource temporarily unavailable
 82460 xterm    CALL  poll(0x7f7ffffed370,1,0)
 82460 xterm    STRU  struct pollfd { fd=3, events=0x1<POLLIN>, revents=0<> }
 82460 xterm    RET   poll 0
 82460 xterm    CALL  select(5,0x120066791d20,0x120066791ca0,0,0)
 82460 xterm    STRU  struct fd_set { 3,4 }
 82460 xterm    STRU  struct fd_set { }

Can anybody help me figure out what is going on. It looks like there
are calls to select(2) and poll(2) mixed together, is this a problem?
Thanks.

Reply via email to