Unlock the reaper

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

Unlock the reaper

Mark Kettenis
I'm looking for testers for this diff.  This should be safe to run on
amd64, i386 and sparc64.  But has been reported to lock up i386
machines.  I can't reproduce this on any of my own systems.  So I'm
looking for help.  I'm looking for people that are able to build a
kernel with this diff and the MP_LOCKDEBUG option enabled
(uncommented) in their GENERIC.MP kernel, run it on an MP machine and
put some load on it to see if it locks up and/or panics.

Being able to move forward with this would make OpenBSD run
significantly better on MP systems.

Thanks,

Mark


Index: uvm_addr.c
===================================================================
RCS file: /home/cvs/src/sys/uvm/uvm_addr.c,v
retrieving revision 1.13
diff -u -p -r1.13 uvm_addr.c
--- uvm_addr.c 30 Mar 2015 21:08:40 -0000 1.13
+++ uvm_addr.c 4 Apr 2015 11:08:49 -0000
@@ -287,14 +287,19 @@ uvm_addr_init(void)
 {
  pool_init(&uaddr_pool, sizeof(struct uvm_addr_state),
     0, 0, PR_WAITOK, "uaddr", NULL);
+ pool_setipl(&uaddr_pool, IPL_VM);
  pool_init(&uaddr_hint_pool, sizeof(struct uaddr_hint_state),
     0, 0, PR_WAITOK, "uaddrhint", NULL);
+ pool_setipl(&uaddr_hint_pool, IPL_VM);
  pool_init(&uaddr_bestfit_pool, sizeof(struct uaddr_bestfit_state),
     0, 0, PR_WAITOK, "uaddrbest", NULL);
+ pool_setipl(&uaddr_bestfit_pool, IPL_VM);
  pool_init(&uaddr_pivot_pool, sizeof(struct uaddr_pivot_state),
     0, 0, PR_WAITOK, "uaddrpivot", NULL);
+ pool_setipl(&uaddr_pivot_pool, IPL_VM);
  pool_init(&uaddr_rnd_pool, sizeof(struct uaddr_rnd_state),
     0, 0, PR_WAITOK, "uaddrrnd", NULL);
+ pool_setipl(&uaddr_rnd_pool, IPL_VM);
 
  uaddr_kbootstrap.uaddr_minaddr = PAGE_SIZE;
  uaddr_kbootstrap.uaddr_maxaddr = -(vaddr_t)PAGE_SIZE;
Index: uvm_map.c
===================================================================
RCS file: /home/cvs/src/sys/uvm/uvm_map.c,v
retrieving revision 1.191
diff -u -p -r1.191 uvm_map.c
--- uvm_map.c 23 Apr 2015 00:49:37 -0000 1.191
+++ uvm_map.c 28 Apr 2015 20:55:03 -0000
@@ -1842,8 +1842,10 @@ uvm_unmap_kill_entry(struct vm_map *map,
 {
  /* Unwire removed map entry. */
  if (VM_MAPENT_ISWIRED(entry)) {
+ KERNEL_LOCK();
  entry->wired_count = 0;
  uvm_fault_unwire_locked(map, entry->start, entry->end);
+ KERNEL_UNLOCK();
  }
 
  /* Entry-type specific code. */
@@ -2422,18 +2424,20 @@ void
 uvm_map_teardown(struct vm_map *map)
 {
  struct uvm_map_deadq dead_entries;
- int i, waitok = 0;
  struct vm_map_entry *entry, *tmp;
 #ifdef VMMAP_DEBUG
  size_t numq, numt;
 #endif
+ int i;
 
- if ((map->flags & VM_MAP_INTRSAFE) == 0)
- waitok = 1;
- if (waitok) {
- if (rw_enter(&map->lock, RW_NOSLEEP | RW_WRITE) != 0)
- panic("uvm_map_teardown: rw_enter failed on free map");
- }
+ KERNEL_ASSERT_LOCKED();
+ KERNEL_UNLOCK();
+ KERNEL_ASSERT_UNLOCKED();
+
+ KASSERT((map->flags & VM_MAP_INTRSAFE) == 0);
+
+ if (rw_enter(&map->lock, RW_NOSLEEP | RW_WRITE) != 0)
+ panic("uvm_map_teardown: rw_enter failed on free map");
 
  /* Remove address selectors. */
  uvm_addr_destroy(map->uaddr_exe);
@@ -2466,8 +2470,7 @@ uvm_map_teardown(struct vm_map *map)
  if ((entry = RB_ROOT(&map->addr)) != NULL)
  DEAD_ENTRY_PUSH(&dead_entries, entry);
  while (entry != NULL) {
- if (waitok)
- uvm_pause();
+ sched_pause();
  uvm_unmap_kill_entry(map, entry);
  if ((tmp = RB_LEFT(entry, daddrs.addr_entry)) != NULL)
  DEAD_ENTRY_PUSH(&dead_entries, tmp);
@@ -2477,8 +2480,7 @@ uvm_map_teardown(struct vm_map *map)
  entry = TAILQ_NEXT(entry, dfree.deadq);
  }
 
- if (waitok)
- rw_exit(&map->lock);
+ rw_exit(&map->lock);
 
 #ifdef VMMAP_DEBUG
  numt = numq = 0;
@@ -2488,7 +2490,10 @@ uvm_map_teardown(struct vm_map *map)
  numq++;
  KASSERT(numt == numq);
 #endif
- uvm_unmap_detach(&dead_entries, waitok ? UVM_PLA_WAITOK : 0);
+ uvm_unmap_detach(&dead_entries, UVM_PLA_WAITOK);
+
+ KERNEL_LOCK();
+
  pmap_destroy(map->pmap);
  map->pmap = NULL;
 }
@@ -3185,6 +3190,8 @@ void
 uvmspace_init(struct vmspace *vm, struct pmap *pmap, vaddr_t min, vaddr_t max,
     boolean_t pageable, boolean_t remove_holes)
 {
+ KASSERT(pmap == NULL || pmap == pmap_kernel());
+
  if (pmap)
  pmap_reference(pmap);
  else

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Stuart Henderson-6
On 2015/07/08 15:53, Mark Kettenis wrote:
> Index: uvm_map.c
..
> @@ -2466,8 +2470,7 @@ uvm_map_teardown(struct vm_map *map)
>   if ((entry = RB_ROOT(&map->addr)) != NULL)
>   DEAD_ENTRY_PUSH(&dead_entries, entry);
>   while (entry != NULL) {
> - if (waitok)
> - uvm_pause();
> + sched_pause();

ah, slightly different than the one I've tried before which
had uvm_pause instead of sched_pause here plus an extra change
in uvm_glue.c.

I'll give this a spin on i386 after my current build finishes.
FWIW I've been running the previous version on amd64 for ages with
very positive results.

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Mark Kettenis
> Date: Wed, 8 Jul 2015 15:17:46 +0100
> From: Stuart Henderson <[hidden email]>
>
> On 2015/07/08 15:53, Mark Kettenis wrote:
> > Index: uvm_map.c
> ..
> > @@ -2466,8 +2470,7 @@ uvm_map_teardown(struct vm_map *map)
> >   if ((entry = RB_ROOT(&map->addr)) != NULL)
> >   DEAD_ENTRY_PUSH(&dead_entries, entry);
> >   while (entry != NULL) {
> > - if (waitok)
> > - uvm_pause();
> > + sched_pause();
>
> ah, slightly different than the one I've tried before which
> had uvm_pause instead of sched_pause here plus an extra change
> in uvm_glue.c.

Just a bit of a cleanup though.  Not going to make a difference.

> I'll give this a spin on i386 after my current build finishes.
> FWIW I've been running the previous version on amd64 for ages with
> very positive results.

I won't stop you ;).  But my goal was to trick others into testing
this diff such that this doesn't hamper the i386 ports builds.

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Maximilian.Fillinger
In reply to this post by Mark Kettenis
On Wed, Jul 08, 2015 at 03:53:46PM +0200, Mark Kettenis wrote:

> I'm looking for testers for this diff.  This should be safe to run on
> amd64, i386 and sparc64.  But has been reported to lock up i386
> machines.  I can't reproduce this on any of my own systems.  So I'm
> looking for help.  I'm looking for people that are able to build a
> kernel with this diff and the MP_LOCKDEBUG option enabled
> (uncommented) in their GENERIC.MP kernel, run it on an MP machine and
> put some load on it to see if it locks up and/or panics.
>
> Being able to move forward with this would make OpenBSD run
> significantly better on MP systems.
>
> Thanks,
>
> Mark

I just finished compiling the kernel for amd64; I might test i386 later.
What kind of load would be required to give useful feedback? Would
building the userland or some of the bigger ports be a useful test?

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Timo Myyrä-4
In reply to this post by Mark Kettenis
Mark Kettenis <[hidden email]> writes:

> I'm looking for testers for this diff.  This should be safe to run on
> amd64, i386 and sparc64.  But has been reported to lock up i386
> machines.  I can't reproduce this on any of my own systems.  So I'm
> looking for help.  I'm looking for people that are able to build a
> kernel with this diff and the MP_LOCKDEBUG option enabled
> (uncommented) in their GENERIC.MP kernel, run it on an MP machine and
> put some load on it to see if it locks up and/or panics.
>
> Being able to move forward with this would make OpenBSD run
> significantly better on MP systems.
>
> Thanks,
>
> Mark
>
>
> Index: uvm_addr.c
> ===================================================================
> RCS file: /home/cvs/src/sys/uvm/uvm_addr.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 uvm_addr.c
> --- uvm_addr.c 30 Mar 2015 21:08:40 -0000 1.13
> +++ uvm_addr.c 4 Apr 2015 11:08:49 -0000
> @@ -287,14 +287,19 @@ uvm_addr_init(void)
>  {
>   pool_init(&uaddr_pool, sizeof(struct uvm_addr_state),
>      0, 0, PR_WAITOK, "uaddr", NULL);
> + pool_setipl(&uaddr_pool, IPL_VM);
>   pool_init(&uaddr_hint_pool, sizeof(struct uaddr_hint_state),
>      0, 0, PR_WAITOK, "uaddrhint", NULL);
> + pool_setipl(&uaddr_hint_pool, IPL_VM);
>   pool_init(&uaddr_bestfit_pool, sizeof(struct uaddr_bestfit_state),
>      0, 0, PR_WAITOK, "uaddrbest", NULL);
> + pool_setipl(&uaddr_bestfit_pool, IPL_VM);
>   pool_init(&uaddr_pivot_pool, sizeof(struct uaddr_pivot_state),
>      0, 0, PR_WAITOK, "uaddrpivot", NULL);
> + pool_setipl(&uaddr_pivot_pool, IPL_VM);
>   pool_init(&uaddr_rnd_pool, sizeof(struct uaddr_rnd_state),
>      0, 0, PR_WAITOK, "uaddrrnd", NULL);
> + pool_setipl(&uaddr_rnd_pool, IPL_VM);
>  
>   uaddr_kbootstrap.uaddr_minaddr = PAGE_SIZE;
>   uaddr_kbootstrap.uaddr_maxaddr = -(vaddr_t)PAGE_SIZE;
> Index: uvm_map.c
> ===================================================================
> RCS file: /home/cvs/src/sys/uvm/uvm_map.c,v
> retrieving revision 1.191
> diff -u -p -r1.191 uvm_map.c
> --- uvm_map.c 23 Apr 2015 00:49:37 -0000 1.191
> +++ uvm_map.c 28 Apr 2015 20:55:03 -0000
> @@ -1842,8 +1842,10 @@ uvm_unmap_kill_entry(struct vm_map *map,
>  {
>   /* Unwire removed map entry. */
>   if (VM_MAPENT_ISWIRED(entry)) {
> + KERNEL_LOCK();
>   entry->wired_count = 0;
>   uvm_fault_unwire_locked(map, entry->start, entry->end);
> + KERNEL_UNLOCK();
>   }
>  
>   /* Entry-type specific code. */
> @@ -2422,18 +2424,20 @@ void
>  uvm_map_teardown(struct vm_map *map)
>  {
>   struct uvm_map_deadq dead_entries;
> - int i, waitok = 0;
>   struct vm_map_entry *entry, *tmp;
>  #ifdef VMMAP_DEBUG
>   size_t numq, numt;
>  #endif
> + int i;
>  
> - if ((map->flags & VM_MAP_INTRSAFE) == 0)
> - waitok = 1;
> - if (waitok) {
> - if (rw_enter(&map->lock, RW_NOSLEEP | RW_WRITE) != 0)
> - panic("uvm_map_teardown: rw_enter failed on free map");
> - }
> + KERNEL_ASSERT_LOCKED();
> + KERNEL_UNLOCK();
> + KERNEL_ASSERT_UNLOCKED();
> +
> + KASSERT((map->flags & VM_MAP_INTRSAFE) == 0);
> +
> + if (rw_enter(&map->lock, RW_NOSLEEP | RW_WRITE) != 0)
> + panic("uvm_map_teardown: rw_enter failed on free map");
>  
>   /* Remove address selectors. */
>   uvm_addr_destroy(map->uaddr_exe);
> @@ -2466,8 +2470,7 @@ uvm_map_teardown(struct vm_map *map)
>   if ((entry = RB_ROOT(&map->addr)) != NULL)
>   DEAD_ENTRY_PUSH(&dead_entries, entry);
>   while (entry != NULL) {
> - if (waitok)
> - uvm_pause();
> + sched_pause();
>   uvm_unmap_kill_entry(map, entry);
>   if ((tmp = RB_LEFT(entry, daddrs.addr_entry)) != NULL)
>   DEAD_ENTRY_PUSH(&dead_entries, tmp);
> @@ -2477,8 +2480,7 @@ uvm_map_teardown(struct vm_map *map)
>   entry = TAILQ_NEXT(entry, dfree.deadq);
>   }
>  
> - if (waitok)
> - rw_exit(&map->lock);
> + rw_exit(&map->lock);
>  
>  #ifdef VMMAP_DEBUG
>   numt = numq = 0;
> @@ -2488,7 +2490,10 @@ uvm_map_teardown(struct vm_map *map)
>   numq++;
>   KASSERT(numt == numq);
>  #endif
> - uvm_unmap_detach(&dead_entries, waitok ? UVM_PLA_WAITOK : 0);
> + uvm_unmap_detach(&dead_entries, UVM_PLA_WAITOK);
> +
> + KERNEL_LOCK();
> +
>   pmap_destroy(map->pmap);
>   map->pmap = NULL;
>  }
> @@ -3185,6 +3190,8 @@ void
>  uvmspace_init(struct vmspace *vm, struct pmap *pmap, vaddr_t min, vaddr_t max,
>      boolean_t pageable, boolean_t remove_holes)
>  {
> + KASSERT(pmap == NULL || pmap == pmap_kernel());
> +
>   if (pmap)
>   pmap_reference(pmap);
>   else

Hi,

Compiled kernel with this on my Thinkpad X201 (amd64).
I run few compilations in parallel (kernel + few ports) in background with normal desktop use and
got load bumped to ~8.0.
So far no regressions spotted. I'll continue to with this.

Timo

OpenBSD 5.8-beta (GENERIC.MP) #27: Wed Jul  8 22:50:34 EEST 2015
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8357658624 (7970MB)
avail mem = 8100495360 (7725MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
bios0: vendor LENOVO version "6QET69WW (1.39 )" date 04/26/2012
bios0: LENOVO 32492EU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! SLIC BOOT SSDT TCPA DMAR SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.42 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 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 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 5 (application processor)
cpu3: Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2793.01 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,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 2, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 13 (EXP1)
acpiprt3 at acpi0: bus -1 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus 5 (EXP4)
acpiprt6 at acpi0: bus 2 (EXP5)
acpicpu0 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), C1(1000@3 mwait.1), PSS
acpicpu1 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), C1(1000@3 mwait.1), PSS
acpicpu2 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), C1(1000@3 mwait.1), PSS
acpicpu3 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10), C1(1000@3 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4650" serial  8908 type LION oem "Panasonic"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
cpu0: Enhanced SpeedStep 2793 MHz: speeds: 2534, 2533, 2399, 2266, 2133, 1999, 1866, 1733, 1599, 1466, 1333, 1199 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core Host" rev 0x02
vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x800
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 3400 MEI" rev 0x06 at pci0 dev 22 function 0 not configured
puc0 at pci0 dev 22 function 3 "Intel 3400 KT" rev 0x06: ports: 1 com
com4 at puc0 port 0 apic 1 int 17: ns16550a, 16 byte fifo
com4: probed fifo depth: 0 bytes
em0 at pci0 dev 25 function 0 "Intel 82577LM" rev 0x06: msi, address 00:26:2d:f1:da:75
ehci0 at pci0 dev 26 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 3400 HD Audio" rev 0x06: msi
azalia0: codecs: Conexant/0x5069, Intel/0x2804, using Conexant/0x5069
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 3400 PCIE" rev 0x06: msi
pci1 at ppb0 bus 13
ppb1 at pci0 dev 28 function 3 "Intel 3400 PCIE" rev 0x06: msi
pci2 at ppb1 bus 5
ppb2 at pci0 dev 28 function 4 "Intel 3400 PCIE" rev 0x06: msi
pci3 at ppb2 bus 2
iwn0 at pci3 dev 0 function 0 "Intel Centrino Advanced-N 6200" rev 0x35: msi, MIMO 2T2R, MoW, address 00:23:14:23:6e:18
ehci1 at pci0 dev 29 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 19
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xa6
pci4 at ppb3 bus 14
pcib0 at pci0 dev 31 function 0 "Intel QM57 LPC" rev 0x06
ahci0 at pci0 dev 31 function 2 "Intel 3400 AHCI" rev 0x06: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, INTEL SSDSA2M160, 2CV1> SCSI3 0/direct fixed naa.5001517959106b36
sd0: 152627MB, 512 bytes/sector, 312581808 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 3400 SMBus" rev 0x06: apic 1 int 23
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
itherm0 at pci0 dev 31 function 6 "Intel 3400 Thermal" rev 0x06
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
aps0 at isa0 port 0x1600/31
pci5 at mainbus0 bus 255
pchb1 at pci5 dev 0 function 0 "Intel QuickPath" rev 0x02
pchb2 at pci5 dev 0 function 1 "Intel QuickPath" rev 0x02
pchb3 at pci5 dev 2 function 0 "Intel QPI Link" rev 0x02
pchb4 at pci5 dev 2 function 1 "Intel QPI Physical" rev 0x02
pchb5 at pci5 dev 2 function 2 "Intel Reserved" rev 0x02
pchb6 at pci5 dev 2 function 3 "Intel Reserved" rev 0x02
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
ugen0 at uhub2 port 3 "UPEK Biometric Coprocessor" rev 1.01/0.02 addr 3
ugen1 at uhub2 port 4 "Broadcom Corp Broadcom Bluetooth Device" rev 2.00/3.60 addr 4
uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 152625MB, 512 bytes/sector, 312576113 sectors
root on sd1a (741cf65615793b8b.a) swap on sd1b dump on sd1b

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Stuart Henderson-6
In reply to this post by Maximilian.Fillinger
On 2015/07/08 20:00, Max Fillinger wrote:

> On Wed, Jul 08, 2015 at 03:53:46PM +0200, Mark Kettenis wrote:
> > I'm looking for testers for this diff.  This should be safe to run on
> > amd64, i386 and sparc64.  But has been reported to lock up i386
> > machines.  I can't reproduce this on any of my own systems.  So I'm
> > looking for help.  I'm looking for people that are able to build a
> > kernel with this diff and the MP_LOCKDEBUG option enabled
> > (uncommented) in their GENERIC.MP kernel, run it on an MP machine and
> > put some load on it to see if it locks up and/or panics.
> >
> > Being able to move forward with this would make OpenBSD run
> > significantly better on MP systems.
> >
> > Thanks,
> >
> > Mark
>
> I just finished compiling the kernel for amd64; I might test i386 later.
> What kind of load would be required to give useful feedback? Would
> building the userland or some of the bigger ports be a useful test?

Building base with the reaper unlock diff on i386 doesn't seem to
trigger problems, or at least I haven't run into them in a few attempts.

I do see problems when building ports on a dpb cluster, quite quickly
in some cases - I just did a run and one node locked after 261s, another
after 756s (dpb master stayed up FWIW).

If you're trying to reproduce, make sure you set ddb.console=1 and
check that you can break into ddb under normal conditions. If you
manage to trigger a hang, see if you can break into ddb and get
the usual things (backtrace, ps, sh reg, etc).

I've been unable to get into ddb after a hang, including on this
most recent run with MP_LOCKDEBUG.

Nothing particular special was being built during the last hang;
from dpb term-report, the last entry before "i386-2-" appeared
(indicating that the host is no longer contactable) showed these

archivers/libzip
audio/libogg
archivers/lzo2

Looking at build logs (which are streamed over ssh and logged
on the dpb master) lzo2 and libzip were compiling (cc from base)
and libogg was doing pkg_create/gzip when contact was lost.
So I don't think it's going to be triggered by any particular
ports, there is nothing out of the ordinary about these, and
no funny autoconf checks were occurring at the time.

The main other build-related active process would be sshd,
and since pkg_create was running it would also most likely
have been writing to nfs at the time.

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Adam Wolk-2
On Wed, 8 Jul 2015 22:20:49 +0100
Stuart Henderson <[hidden email]> wrote:

> On 2015/07/08 20:00, Max Fillinger wrote:
> > On Wed, Jul 08, 2015 at 03:53:46PM +0200, Mark Kettenis wrote:
> > > I'm looking for testers for this diff.  This should be safe to
> > > run on amd64, i386 and sparc64.  But has been reported to lock up
> > > i386 machines.  I can't reproduce this on any of my own systems.
> > > So I'm looking for help.  I'm looking for people that are able to
> > > build a kernel with this diff and the MP_LOCKDEBUG option enabled
> > > (uncommented) in their GENERIC.MP kernel, run it on an MP machine
> > > and put some load on it to see if it locks up and/or panics.
> > >
> > > Being able to move forward with this would make OpenBSD run
> > > significantly better on MP systems.
> > >
> > > Thanks,
> > >
> > > Mark
> >
> > I just finished compiling the kernel for amd64; I might test i386
> > later. What kind of load would be required to give useful feedback?
> > Would building the userland or some of the bigger ports be a useful
> > test?
>

I have been running with the patch for ~2h with a decent load on amd64
applied to a Jul 8 snapshot. No crashes, no panics and dmesg doesn't
show anything unusual.

> Building base with the reaper unlock diff on i386 doesn't seem to
> trigger problems, or at least I haven't run into them in a few
> attempts.
>
> I do see problems when building ports on a dpb cluster, quite quickly
> in some cases - I just did a run and one node locked after 261s,
> another after 756s (dpb master stayed up FWIW).
>

Stuart, do you think the issue could be memory related and more easily
triggered when the system is forced to swap?

My amd64 box has 8 gigs of ram though the i386 device I used before was
always a *lot* easier to memory starve to say the least. The patches
apply to the uvm which is responsible handling virtual memory &
swapping.

That could be a good reason for a hard to reproduce bug on a memory
starved i386 device wouldn't it?

I can slap a new snaphost on my old i386 box and try memory starving it
tomorrow. Will appreciate any debunking of this train thought of course
or pointers on what type of load to put on the system (cpu, memory,
io?).

> If you're trying to reproduce, make sure you set ddb.console=1 and
> check that you can break into ddb under normal conditions. If you
> manage to trigger a hang, see if you can break into ddb and get
> the usual things (backtrace, ps, sh reg, etc).
>
> I've been unable to get into ddb after a hang, including on this
> most recent run with MP_LOCKDEBUG.
>
> Nothing particular special was being built during the last hang;
> from dpb term-report, the last entry before "i386-2-" appeared
> (indicating that the host is no longer contactable) showed these
>
> archivers/libzip
> audio/libogg
> archivers/lzo2
>
> Looking at build logs (which are streamed over ssh and logged
> on the dpb master) lzo2 and libzip were compiling (cc from base)
> and libogg was doing pkg_create/gzip when contact was lost.
> So I don't think it's going to be triggered by any particular
> ports, there is nothing out of the ordinary about these, and
> no funny autoconf checks were occurring at the time.
>
> The main other build-related active process would be sshd,
> and since pkg_create was running it would also most likely
> have been writing to nfs at the time.

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Theo Buehler
In reply to this post by Mark Kettenis
A further success story on an amd64 Core2 laptop.  I built an entire
release with no complications.  Suspend/Hibernate/Resume work fine as well.


OpenBSD 5.8-beta (GENERIC.MP) #451: Wed Jul  8 16:33:38 CEST 2015
    [hidden email]:/sys/arch/amd64/compile/GENERIC.MP
real mem = 2634596352 (2512MB)
avail mem = 2550943744 (2432MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (37 entries)
bios0: vendor Apple Inc. version "MB21.88Z.00A5.B07.0706270922" date 06/27/07
bios0: Apple Inc. MacBook2,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT
acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB7(S3) EC__(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.35 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,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-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 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz, 1995.21 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,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-255
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP02)
acpiprt3 at acpi0: bus 3 (PCIB)
acpicpu0 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpicpu1 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 mwait), PSS
acpiac0 at acpi0: AC unit online
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "15253732082930497" type 15253732284385612 oem "15253732284387396"
acpivideo0 at acpi0: GFX0
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1833, 1667, 1500, 1333, 1000 MHz
memory map conflict 0x9ef00000/0x100000
memory map conflict 0x9f000000/0x1000000
memory map conflict 0xf00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xfffb0000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xa0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x800
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
vendor "Intel", unknown product 0x27a3 (class DASP subclass Time and Frequency, rev 0x03) at pci0 dev 7 function 0 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Sigmatel STAC9220/1
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x22, Yukon-2 EC rev. A3 (0x2): apic 1 int 16
msk0 at mskc0 port A: address 00:19:e3:38:6c:56
eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 1 int 17
athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 4, address 00:1b:63:02:1c:22
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 21
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 3
"AT&T/Lucent FW322 1394" rev 0x61 at pci3 dev 3 function 0 not configured
pcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <MATSHITA, DVD-R UJ-857D, KBVB> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 19 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 1: <HITACHI HTS725050A9A364>
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 19
iic0 at ichiic0
iic0: addr 0x48 00=44 01=00 02=4b 03=50 words 00=4380 01=00ff 02=4b00 03=5000 04=ffff 05=ffff 06=ffff 07=ffff
spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
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
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid0:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
uhub5 at uhub0 port 1 "Genesys Logic USB2.0 Hub" rev 2.00/32.98 addr 2
uhub6 at uhub5 port 1 "Apple, Inc. Keyboard Hub" rev 2.00/94.15 addr 3
uhidev0 at uhub6 port 2 configuration 1 interface 0 "Apple, Inc Apple Keyboard" rev 2.00/0.69 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub6 port 2 configuration 1 interface 1 "Apple, Inc Apple Keyboard" rev 2.00/0.69 addr 4
uhidev1: iclass 3/0
uhid0 at uhidev1: input=1, output=0, feature=0
uhidev2 at uhub6 port 3 configuration 1 interface 0 "Logitech USB Optical Mouse" rev 2.00/43.01 addr 5
uhidev2: iclass 3/1
ums0 at uhidev2: 8 buttons, Z dir
wsmouse0 at ums0 mux 0
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 6
video0 at uvideo0
uhidev3 at uhub1 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 variable keys, 5 key codes, country code 13
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev4 at uhub1 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev4: iclass 3/1, 5 report ids
ums1 at uhidev4 reportid 2: 3 buttons
wsmouse1 at ums1 mux 0
ums2 at uhidev4 reportid 5
ums2: mouse has no X report
uhidev5 at uhub1 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev5: iclass 3/0
uhid1 at uhidev5: input=1, output=0, feature=0
uhidev6 at uhub3 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev6: iclass 3/0, 38 report ids
uhid2 at uhidev6 reportid 36: input=4, output=0, feature=0
uhid3 at uhidev6 reportid 37: input=4, output=0, feature=0
uhid4 at uhidev6 reportid 38: input=4, output=0, feature=0
uhidev7 at uhub4 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev7: iclass 3/1
ukbd2 at uhidev7: 8 variable keys, 6 key codes
wskbd2 at ukbd2 mux 1
wskbd2: connecting to wsdisplay0
uhidev8 at uhub4 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev8: iclass 3/1
ums3 at uhidev8: 5 buttons
wsmouse2 at ums3 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd0 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd0: 476936MB, 512 bytes/sector, 976766528 sectors
root on sd0a (7966d4a5430aa607.a) swap on sd0b dump on sd0b
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
uhid0 detached
uhidev1 detached
wsmouse0 detached
ums0 detached
uhidev2 detached
uhub6 detached
uhub5 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev3 detached
wsmouse1 detached
ums1 detached
ums2 detached
uhidev4 detached
uhid1 detached
uhidev5 detached
uhub1 detached
uhub2 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhidev6 detached
uhub3 detached
wskbd2: disconnecting from wsdisplay0
wskbd2 detached
ukbd2 detached
uhidev7 detached
wsmouse2 detached
ums3 detached
uhidev8 detached
uhub4 detached
video0 detached
uvideo0 detached
uhub0 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
video0 at uvideo0
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
wsmouse0 detached
ums0 detached
ums1 detached
uhidev1 detached
uhid0 detached
uhidev2 detached
uhub0 detached
uhub1 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhidev3 detached
uhub2 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev4 detached
wsmouse1 detached
ums2 detached
uhidev5 detached
uhub3 detached
video0 detached
uvideo0 detached
uhub4 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
video0 at uvideo0
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
wsmouse0 detached
ums0 detached
ums1 detached
uhidev1 detached
uhid0 detached
uhidev2 detached
uhub0 detached
uhub1 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhidev3 detached
uhub2 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev4 detached
wsmouse1 detached
ums2 detached
uhidev5 detached
uhub3 detached
video0 detached
uvideo0 detached
uhub4 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
video0 at uvideo0
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
wsmouse0 detached
ums0 detached
ums1 detached
uhidev1 detached
uhid0 detached
uhidev2 detached
uhub0 detached
uhub1 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhidev3 detached
uhub2 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev4 detached
wsmouse1 detached
ums2 detached
uhidev5 detached
uhub3 detached
video0 detached
uvideo0 detached
uhub4 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid3484:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Apple Computer Bluetooth" rev 2.00/0.0c addr 2
uvideo0 detached
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
video0 at uvideo0
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
wsmouse0 detached
ums0 detached
ums1 detached
uhidev1 detached
uhid0 detached
uhidev2 detached
uhub0 detached
uhub1 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhidev3 detached
uhub2 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev4 detached
wsmouse1 detached
ums2 detached
uhidev5 detached
uhub3 detached
video0 detached
uvideo0 detached
uhub4 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
video0 at uvideo0
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
ukbd0: was console keyboard
wskbd0 detached
ukbd0 detached
uhidev0 detached
wsmouse0 detached
ums0 detached
ums1 detached
uhidev1 detached
uhid0 detached
uhidev2 detached
uhub0 detached
uhub1 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhidev3 detached
uhub2 detached
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd1 detached
uhidev4 detached
wsmouse1 detached
ums2 detached
uhidev5 detached
uhub3 detached
video0 detached
uvideo0 detached
uhub4 detached
uhub0 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub1 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub2 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub3 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
uhub4 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
uhub5 at uhub4 port 1 "Genesys Logic USB2.0 Hub" rev 2.00/32.98 addr 2
uhub6 at uhub5 port 1 "Apple, Inc. Keyboard Hub" rev 2.00/94.15 addr 3
uhidev0 at uhub6 port 2 configuration 1 interface 0 "Apple, Inc Apple Keyboard" rev 2.00/0.69 addr 4
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub6 port 2 configuration 1 interface 1 "Apple, Inc Apple Keyboard" rev 2.00/0.69 addr 4
uhidev1: iclass 3/0
uhid0 at uhidev1: input=1, output=0, feature=0
uhidev2 at uhub6 port 3 configuration 1 interface 0 "Logitech USB Optical Mouse" rev 2.00/43.01 addr 5
uhidev2: iclass 3/1
ums0 at uhidev2: 8 buttons, Z dir
wsmouse0 at ums0 mux 0
uvideo0 at uhub4 port 4 configuration 1 interface 0 "Micron Built-in iSight" rev 2.00/1.84 addr 6
video0 at uvideo0
uhidev3 at uhub0 port 2 configuration 1 interface 0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev3: iclass 3/1
ukbd1 at uhidev3: 8 variable keys, 5 key codes, country code 13
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev4 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev4: iclass 3/1, 5 report ids
ums1 at uhidev4 reportid 2: 3 buttons
wsmouse1 at ums1 mux 0
ums2 at uhidev4 reportid 5
ums2: mouse has no X report
uhidev5 at uhub0 port 2 configuration 1 interface 2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev5: iclass 3/0
uhid1 at uhidev5: input=1, output=0, feature=0
uhidev6 at uhub2 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
uhidev6: iclass 3/0, 38 report ids
uhid2 at uhidev6 reportid 36: input=4, output=0, feature=0
uhid3 at uhidev6 reportid 37: input=4, output=0, feature=0
uhid4 at uhidev6 reportid 38: input=4, output=0, feature=0
uhidev7 at uhub3 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev7: iclass 3/1
ukbd2 at uhidev7: 8 variable keys, 6 key codes
wskbd2 at ukbd2 mux 1
wskbd2: connecting to wsdisplay0
uhidev8 at uhub3 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
uhidev8: iclass 3/1
ums3 at uhidev8: 5 buttons
wsmouse2 at ums3 mux 0

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Mark Kettenis
In reply to this post by Mark Kettenis
> Date: Wed, 8 Jul 2015 16:35:09 +0200 (CEST)
> From: Mark Kettenis <[hidden email]>
>
> > Date: Wed, 8 Jul 2015 15:17:46 +0100
> > From: Stuart Henderson <[hidden email]>
> >
> > On 2015/07/08 15:53, Mark Kettenis wrote:
> > > Index: uvm_map.c
> > ..
> > > @@ -2466,8 +2470,7 @@ uvm_map_teardown(struct vm_map *map)
> > >   if ((entry = RB_ROOT(&map->addr)) != NULL)
> > >   DEAD_ENTRY_PUSH(&dead_entries, entry);
> > >   while (entry != NULL) {
> > > - if (waitok)
> > > - uvm_pause();
> > > + sched_pause();
> >
> > ah, slightly different than the one I've tried before which
> > had uvm_pause instead of sched_pause here plus an extra change
> > in uvm_glue.c.
>
> Just a bit of a cleanup though.  Not going to make a difference.
>
> > I'll give this a spin on i386 after my current build finishes.
> > FWIW I've been running the previous version on amd64 for ages with
> > very positive results.
>
> I won't stop you ;).  But my goal was to trick others into testing
> this diff such that this doesn't hamper the i386 ports builds.

And thanks to Stuart, we have found a (fairly straightforward) lock
order reversal.  I'm working on a fix.

Thanks for everybody who tested so far.  Feel free to continue
testing, although you might want to be a bit careful on i386 systems
as they are somewhat likely to lock up with this diff.

Reply | Threaded
Open this post in threaded view
|

Re: Unlock the reaper

Ian McWilliam-2
In reply to this post by Stuart Henderson-6
On 9/07/2015 7:20 AM, Stuart Henderson wrote:

> On 2015/07/08 20:00, Max Fillinger wrote:
>> On Wed, Jul 08, 2015 at 03:53:46PM +0200, Mark Kettenis wrote:
>>> I'm looking for testers for this diff.  This should be safe to run on
>>> amd64, i386 and sparc64.  But has been reported to lock up i386
>>> machines.  I can't reproduce this on any of my own systems.  So I'm
>>> looking for help.  I'm looking for people that are able to build a
>>> kernel with this diff and the MP_LOCKDEBUG option enabled
>>> (uncommented) in their GENERIC.MP kernel, run it on an MP machine and
>>> put some load on it to see if it locks up and/or panics.
>>>
>>> Being able to move forward with this would make OpenBSD run
>>> significantly better on MP systems.
>>>
>>> Thanks,
>>>
>>> Mark
>> I just finished compiling the kernel for amd64; I might test i386 later.
>> What kind of load would be required to give useful feedback? Would
>> building the userland or some of the bigger ports be a useful test?
> Building base with the reaper unlock diff on i386 doesn't seem to
> trigger problems, or at least I haven't run into them in a few attempts.
>
> I do see problems when building ports on a dpb cluster, quite quickly
> in some cases - I just did a run and one node locked after 261s, another
> after 756s (dpb master stayed up FWIW).
>
> If you're trying to reproduce, make sure you set ddb.console=1 and
> check that you can break into ddb under normal conditions. If you
> manage to trigger a hang, see if you can break into ddb and get
> the usual things (backtrace, ps, sh reg, etc).
>
> I've been unable to get into ddb after a hang, including on this
> most recent run with MP_LOCKDEBUG.
>
> Nothing particular special was being built during the last hang;
> from dpb term-report, the last entry before "i386-2-" appeared
> (indicating that the host is no longer contactable) showed these
>
> archivers/libzip
> audio/libogg
> archivers/lzo2
>
> Looking at build logs (which are streamed over ssh and logged
> on the dpb master) lzo2 and libzip were compiling (cc from base)
> and libogg was doing pkg_create/gzip when contact was lost.
> So I don't think it's going to be triggered by any particular
> ports, there is nothing out of the ordinary about these, and
> no funny autoconf checks were occurring at the time.
>
> The main other build-related active process would be sshd,
> and since pkg_create was running it would also most likely
> have been writing to nfs at the time.
>
>
My money is on -> nfs.

Ian McWilliam