Re: amd64 uvm_fault when unhibernating Stopped at if_detach

2021-02-17 Thread Grégoire Jadi
Stefan Sperling  writes:

> On Tue, Feb 16, 2021 at 11:24:31PM +0100, Grégoire Jadi wrote:
>
>> Hi,
>> 
>> Here is another uvm_fault related to iwn, but this time *not* when
>> unhibernating.  I just "grabbed" my laptop that was playing music.
>> 
>> uvm_fault(0x82169730, 0x80020738, 0, 2) -> e
>> kernel: page fault trap, code=0
>> Stopped at  idt_vec_free+0x28:  movq$0,0x8(%rax,%rdx,1)
>> ddb{2}> idt_vec_free(73) at idt_vec_free+0x28
>> intr_disestablish(800ffe80) at intr_disestablish+0xff
>> iwn_detach(80137000,1) at iwn_detach+0x53
>> config_detach(80137000,1) at config_detach+0x142
>> config_detach_children(80120100,1) at config_detach_children+0x61
>> pci_detach_devices(80120100,1) at pci_detach_devices+0x24
>> ppb_hotplug_remove(8011fc00) at ppb_hotplug_remove+0x32
>> taskq_thread(820fcd60) at taskq_thread+0x81
>> end trace frame: 0x0, count: -8
>> 
>> Tell me if there is more information that I can provide when this occur
>> and I drop into ddb (a `show what` command?).
>
> This device *should* not actually ever detach. The suspend/resume path
> for this device assumes that the device is powered down but will remain
> attached on the PCI bus.
>
> If the device is detaching unexpectedly then the underlying reason may
> well be hardware-related.
>
> Else I am not sure whether this problem would need a fix in iwn or in
> the PCI bus code. Perhaps the iwn detach code is broken but that's because
> virtually nobody is able to actually test it. I don't think iwn hardware
> exists in hot-pluggable configurations.

Thanks for your answers!

On my X201 I've a physical switch to turn the WiFi on and off.  When I
do it, I've this logs:

iwn0: RF switch: radio disabled
iwn0: RF switch: radio disabled
iwn0: RF switch: radio enabled

Would that work to test the iwn detach code?  Or is it the case you're
were referring to: "powered down but attached on the PCI bus"?


Moreover, when the device is "detached", I can't bring it back online
with that switch.  Is there a way to do it?

That being said, this is an old laptop and as you said this may be
hardware-related, thus not worth investigating.

Best,

-- 
gjadi
PGP : AF26 E9C2 A1C8 8D32 A868  4386 1373 5477 2B65 1894



Re: amd64 uvm_fault when unhibernating Stopped at if_detach

2021-02-17 Thread Grégoire Jadi
Mark Kettenis  writes:

>> Date: Wed, 17 Feb 2021 11:32:42 +0100
>> From: Stefan Sperling 
>> 
>> On Tue, Feb 16, 2021 at 11:24:31PM +0100, Grégoire Jadi wrote:
>> > Hi,
>> > 
>> > Here is another uvm_fault related to iwn, but this time *not* when
>> > unhibernating.  I just "grabbed" my laptop that was playing music.
>> > 
>> > uvm_fault(0x82169730, 0x80020738, 0, 2) -> e
>> > kernel: page fault trap, code=0
>> > Stopped at  idt_vec_free+0x28:  movq$0,0x8(%rax,%rdx,1)
>> > ddb{2}> idt_vec_free(73) at idt_vec_free+0x28
>> > intr_disestablish(800ffe80) at intr_disestablish+0xff
>> > iwn_detach(80137000,1) at iwn_detach+0x53
>> > config_detach(80137000,1) at config_detach+0x142
>> > config_detach_children(80120100,1) at config_detach_children+0x61
>> > pci_detach_devices(80120100,1) at pci_detach_devices+0x24
>> > ppb_hotplug_remove(8011fc00) at ppb_hotplug_remove+0x32
>> > taskq_thread(820fcd60) at taskq_thread+0x81
>> > end trace frame: 0x0, count: -8
>> > 
>> > Tell me if there is more information that I can provide when this occur
>> > and I drop into ddb (a `show what` command?).
>> 
>> This device *should* not actually ever detach. The suspend/resume path
>> for this device assumes that the device is powered down but will remain
>> attached on the PCI bus.
>> 
>> If the device is detaching unexpectedly then the underlying reason may
>> well be hardware-related.
>> 
>> Else I am not sure whether this problem would need a fix in iwn or in
>> the PCI bus code. Perhaps the iwn detach code is broken but that's because
>> virtually nobody is able to actually test it. I don't think iwn hardware
>> exists in hot-pluggable configurations.
>
> This could be related to ASPM.  So it might be worth trying to turn
> that off.  There are a few PCI drivers in the tree that do this.  It
> may also be possible to turn ASPM off in the BIOS.

Thanks, I'll check it.

-- 
gjadi
PGP : AF26 E9C2 A1C8 8D32 A868  4386 1373 5477 2B65 1894



amd64 uvm_fault when unhibernating Stopped at if_detach

2021-02-04 Thread Grégoire Jadi
Hi,

I just encountered an uvm_fault when unhibernating.

This is the first time I see this.  It looks like iwn initialization
went wrong:

Feb  5 08:12:58 puffy /bsd: iwn0 at pci4 dev 0 function 0 "Intel Centrino 
Ultimate-N 6300" rev 0x35: msiiwn0: could not initialize OTPROM
Feb  5 08:12:58 puffy /bsd: : could not read EEPROM
...
Feb  5 08:12:58 puffy /bsd: unhibernating @ block 33557739 length 668752384 
bytes
Feb  5 08:12:58 puffy /bsd: uvm_fault(0x82237eb0, 0x0, 0, 2) -> e
Feb  5 08:12:58 puffy /bsd: kernel: page fault trap, code=0
Feb  5 08:12:58 puffy /bsd: Stopped at  if_detach+0x6d: movq%rcx,0(%rax)

Here is dmesg + bt + ps output:

Feb  5 08:12:58 puffy syslogd[6710]: start
Feb  5 08:12:58 puffy /bsd: OpenBSD 6.8-current (GENERIC.MP) #304: Tue Feb  2 
10:04:05 MST 2021
Feb  5 08:12:58 puffy /bsd: 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Feb  5 08:12:58 puffy /bsd: real mem = 8357658624 (7970MB)
Feb  5 08:12:58 puffy /bsd: avail mem = 8089051136 (7714MB)
Feb  5 08:12:58 puffy /bsd: random: good seed from bootblocks
Feb  5 08:12:58 puffy /bsd: mpath0 at root
Feb  5 08:12:58 puffy /bsd: scsibus0 at mpath0: 256 targets
Feb  5 08:12:58 puffy /bsd: mainbus0 at root
Feb  5 08:12:58 puffy /bsd: bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 
entries)
Feb  5 08:12:58 puffy /bsd: bios0: vendor LENOVO version "6QET47WW (1.17 )" 
date 07/14/2010
Feb  5 08:12:58 puffy /bsd: bios0: LENOVO 3680BA5
Feb  5 08:12:58 puffy /bsd: acpi0 at bios0: ACPI 4.0
Feb  5 08:12:58 puffy /bsd: acpi0: sleep states S0 S3 S4 S5
Feb  5 08:12:58 puffy /bsd: acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET 
ASF! SLIC BOOT SSDT TCPA DMAR SSDT SSDT SSDT
Feb  5 08:12:58 puffy /bsd: 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)
Feb  5 08:12:58 puffy /bsd: acpitimer0 at acpi0: 3579545 Hz, 24 bits
Feb  5 08:12:58 puffy /bsd: acpiec0 at acpi0
Feb  5 08:12:58 puffy /bsd: acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
Feb  5 08:12:58 puffy /bsd: cpu0 at mainbus0: apid 0 (boot processor)
Feb  5 08:12:58 puffy /bsd: cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 
1197.20 MHz, 06-25-05
Feb  5 08:12:58 puffy /bsd: 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
Feb  5 08:12:58 puffy /bsd: cpu0: 256KB 64b/line 8-way L2 cache
Feb  5 08:12:58 puffy /bsd: cpu0: smt 0, core 0, package 0
Feb  5 08:12:58 puffy /bsd: mtrr: Pentium Pro MTRR support, 8 var ranges, 88 
fixed ranges
Feb  5 08:12:58 puffy /bsd: cpu0: apic clock running at 132MHz
Feb  5 08:12:58 puffy /bsd: cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
Feb  5 08:12:58 puffy /bsd: cpu1 at mainbus0: apid 1 (application processor)
Feb  5 08:12:58 puffy /bsd: cpu1: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 
1197.01 MHz, 06-25-05
Feb  5 08:12:58 puffy /bsd: 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
Feb  5 08:12:58 puffy /bsd: cpu1: 256KB 64b/line 8-way L2 cache
Feb  5 08:12:58 puffy /bsd: cpu1: smt 1, core 0, package 0
Feb  5 08:12:58 puffy /bsd: cpu2 at mainbus0: apid 4 (application processor)
Feb  5 08:12:58 puffy /bsd: cpu2: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 
1197.01 MHz, 06-25-05
Feb  5 08:12:58 puffy /bsd: 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
Feb  5 08:12:58 puffy /bsd: cpu2: 256KB 64b/line 8-way L2 cache
Feb  5 08:12:58 puffy /bsd: cpu2: smt 0, core 2, package 0
Feb  5 08:12:58 puffy /bsd: cpu3 at mainbus0: apid 5 (application processor)
Feb  5 08:12:58 puffy /bsd: cpu3: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 
1197.01 MHz, 06-25-05
Feb  5 08:12:58 puffy /bsd: 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,MELTDOWN
Feb  5 08:12:58 puffy /bsd: cpu3: 256KB 64b/line 8-way L2 cache
Feb  5 08:12:58 puffy /bsd: cpu3: smt 1, core 2, package 0
Feb  5 08:12:58 puffy /bsd: ioapic0 at mainbus0: apid 1 pa 0xfec0, version 
20, 24 pins, remapped
Feb  5 08:12:58 puffy /bsd: acpimcfg0 at acpi0
Feb  5 08:12:58 puffy /bsd: acpimcfg0: addr 0xe000, bus 0

Reboot (dounmount) crash with latest kernel on amd64

2017-12-12 Thread Grégoire Jadi
>Synopsis:  Reboot (dounmount) crash with latest kernel on amd64
>Category:  kernel amd64
>Environment:
System  : OpenBSD 6.2
Details : OpenBSD 6.2-current (GENERIC.MP) #1: Tue Dec 12 15:51:42 
CET 2017
 
daimrod@puffy:/home/daimrod/src/openbsd/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
I compiled the latest version of the kernel from CVS to try stsp@ patch on 
ieee80211_node_checkrssi and rebooted several times.
Everytime I rebooted my computer dounmount crashed.

Sorry I was a bit tired of copying the addresses so I replaced them with
"...". Since it happens everytime I can provide them if needed.

Here is the trace/ps/show reg :

syncing disks... done
kernel: protection fault trap, code=0
Stopped at  dounmount+0x35: movq0x28(%r13), %rax

ddb{0}> trace
dounmount(800032c77890,ff0118c43190,400) at dounmount+0x35
vop_generic_revoke(1f) at vop_generic_revoke+0x65
VOP_REVOKE(2e2303f764c92ff3,1) at VOP_REVOKE+0x31
vdevgone(...,10,4,1f) at vdevgone+0x8a
disk_gone(...,...) at disk_gone+0x53
sddetach(1,...) at sddetach+0x2a
config_detach(...,...) at config_detach+0x14c
scsi_detach_lun(0,...,...,...) at scsi_detach_lun+0xa8
sr_discipline_shutdown(370,...) at sr_discipline_shutdown+0x10e
sr_shutdown() at sr_shutdown+0x2a
boot(2) at boot+0x59
reboot(...) at reboot+0x4f
sys_reboot(...,...,...) at sys_reboot+0x5c
syscall() at syscall+0x279
--- syscall (number 55) ---
end of kernel
end trace frame: 0x7f7c5980, count: -15
0x10922110151a:
ddb{0}> ps
FLAGS   WAITCOMMAND
0x3 reboot
[skipped]

ddb{0}> show reg
rdi 0x8034e000
rsi 0x808   __kernel_end_phys+0x648
rbp 0x800032c83810
rbx 0x800032c77890
rdx 0x800032c77890
rcx 0
rax 0
r8  0x818addd0  rw_ops+0x10
r9  0x8034e040
r10 0x21
r11 0x2
r12 0x808   __kernel_end_phys+0x648
r13 0xdead4110
r14 0x8034e000
r15 0x800032c77890
rip 0x8113fe75  dounmount+0x35
cs  0x8
rflags  0x10286 __ALIGN_SIZE+0xf286
rsp 0x800032c837e0
ss  0x10
dounmount+0x35: movq0x28(%r13),%rax
ddb{0}> 


>How-To-Repeat:
# reboot

>Fix:
No idea


dmesg:
OpenBSD 6.2-current (GENERIC.MP) #1: Tue Dec 12 15:51:42 CET 2017

daimrod@puffy:/home/daimrod/src/openbsd/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4062691328 (3874MB)
avail mem = 3932639232 (3750MB)
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 "6QET47WW (1.17 )" date 07/14/2010
bios0: LENOVO 3680BA5
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 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.49 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
acpitimer0: recalibrated TSC frequency 2393996550 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 132MHz
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 520 @ 2.40GHz, 2660.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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,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 520 @ 2.40GHz, 2660.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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 

Re: Crash at ieee80211_node_checkrssi followed by boot dump crash

2017-12-12 Thread Grégoire Jadi
Stefan Sperling  writes:

> On Tue, Dec 12, 2017 at 02:45:51PM +0100, Stefan Sperling wrote:
>> On Tue, Dec 12, 2017 at 02:38:14PM +0100, Stefan Sperling wrote:
>> > On Tue, Dec 12, 2017 at 02:17:03PM +0100, Grégoire Jadi wrote:
>> > > I tried a simple reboot, and I also repeated the upgrade but it didn't
>> > > crash.
>> > > 
>> > > Is there anything else I can try?
>> > 
>> > Nothing so far, apart from trying over and over again.
>> > 
>> > This looks like a race where the device receives a frame before things
>> > are fully initialized. Still trying to put my finger on it though, it's
>> > still unclear how this can happen exactly.
>> > 
>> 
>> Grégoire, what does your hostname.iwn0 file look like (without any wifi
>> passwords of course)? I'd like to know if there's something about it that
>> would cause the kernel to put the driver up/down multiple times, which
>> could increase the likelyhood of such races. 
>> 
>
> Nevermind. I have figured it out.

I've applied/compiled & rebooted 10 times without crashes (during the
boot).

Thank you!

> The stupid nasty 'any channel' token bites again:
>
> #define   IEEE80211_CHAN_MAX  255
> #define   IEEE80211_CHAN_ANY  0x  /* token for ``any 
> channel'' */
> #define   IEEE80211_CHAN_ANYC \
>   ((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
>
> Whoever thought that was a good idea already owes me some of their lifetime...
>
> Index: ieee80211_node.c
> ===
> RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
> retrieving revision 1.123
> diff -u -p -r1.123 ieee80211_node.c
> --- ieee80211_node.c  12 Dec 2017 00:24:21 -  1.123
> +++ ieee80211_node.c  12 Dec 2017 13:51:19 -
> @@ -994,6 +994,9 @@ ieee80211_node_checkrssi(struct ieee8021
>  {
>   uint8_t thres;
>
> + if (ni->ni_chan == IEEE80211_CHAN_ANYC)
> + return 0;
> +
>   if (ic->ic_max_rssi) {
>   thres = (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) ?
>   IEEE80211_RSSI_THRES_RATIO_2GHZ :



Re: Crash at ieee80211_node_checkrssi followed by boot dump crash

2017-12-12 Thread Grégoire Jadi
Stefan Sperling  writes:

> On Tue, Dec 12, 2017 at 09:38:15AM +0100, Grégoire Jadi wrote:
>> uvm_fault (0x81b34848, 0x10001, 0, 1) -> e
>> kernel: page fault trap, code=0
>> Stopped at   ieee80211_node_checkrssi+0x12:  movb0x2(%rax), %cl
>> ddb{0}> trace
>> ieee80211_node_checkrssi(801ed530, 10) at 
>> ieee80211_node_checkrssi+0x12
>> ieee80211_input(8001eda64, 8001af048,ffbb, 
>> ff000840c00c) at ieee80211_input+0x324
>
> Can you trigger this reliably?

No sorry :(

I tried a simple reboot, and I also repeated the upgrade but it didn't
crash.

Is there anything else I can try?

> Are the arguments ffbb and 10 in the above 2 lines the same every time?
>
> Can you run 'show reg' in ddb as well please? I'd like to confirm the
> exact value of the %rax register.

Damn, sorry, I forgot to run this command. :/

> Thanks.



Re: Crash at ieee80211_node_checkrssi followed by boot dump crash

2017-12-12 Thread Grégoire Jadi
Stefan Sperling  writes:

> On Tue, Dec 12, 2017 at 02:38:14PM +0100, Stefan Sperling wrote:
>> On Tue, Dec 12, 2017 at 02:17:03PM +0100, Grégoire Jadi wrote:
>> > I tried a simple reboot, and I also repeated the upgrade but it didn't
>> > crash.
>> > 
>> > Is there anything else I can try?
>> 
>> Nothing so far, apart from trying over and over again.

Ok, I'll try to reboot it several times.

>> This looks like a race where the device receives a frame before things
>> are fully initialized. Still trying to put my finger on it though, it's
>> still unclear how this can happen exactly.
>> 
>
> Grégoire, what does your hostname.iwn0 file look like (without any wifi
> passwords of course)? I'd like to know if there's something about it that
> would cause the kernel to put the driver up/down multiple times, which
> could increase the likelyhood of such races.

Eh, that's possible given my hostname.iwn0.

Here it is :
## /etc/hostname.iwn0

up
-wpa
-wpakey
-nwkey
-nwid
-bssid
!/etc/rc.d/wpa_supplicant stop
!route -n flush -iface iwn0
lladdr random

nwid ID wpakey PASSPHRASE

dhcp
##



Crash at ieee80211_node_checkrssi followed by boot dump crash

2017-12-12 Thread Grégoire Jadi
>Synopsis:  Crash at ieee80211_node_checkrssi followed by "boot dump" crash
>Category:  kernel amd64
>Environment:
System  : OpenBSD 6.2
Details : OpenBSD 6.2-current (GENERIC.MP) #275: Mon Dec 11 
20:31:14 MST 2017
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The first reboot after upgrading to the latest snapshot failed during network 
initialization.
After getting some information with "ps" and "trace" in ddb, I ran "boot dump" 
which failed.

Here is the output (possibly with some errors in the transcript).

uvm_fault (0x81b34848, 0x10001, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at  ieee80211_node_checkrssi+0x12:  movb0x2(%rax), %cl
ddb{0}> trace
ieee80211_node_checkrssi(801ed530, 10) at ieee80211_node_checkrssi+0x12
ieee80211_input(8001eda64, 8001af048,ffbb, 
ff000840c00c) at ieee80211_input+0x324
iwn_rx_done(8000, 8001af000,d) at iwn_rx_done+0x4ed
iwn_notif_intr(8) at iwn_notif_intr+0x1c6
iwn_intr(8001af000) at iwn_intr+0x33e
intr_handler(20, 800ee680) at intr_handler+0x63
Xintr_ioapic_edge23() at Xintr_ioapic_edge23+0xcc
--- interrupt ---
end of kernel
end trace frame: 0xa546f905c700, count: -7
0x4c48246c894c5024
ddb{0}> ps
FLAGS   WAITCOMMAND
0x83iwncmd  ifconfig
0x10008bpause   sh
0x100092kread   slaacd
0x100092kread   slaacd
0x80kread   slaacd
0x100083nanosleep   sleep
0x100089pause   sh
0x10008bpause   sh
0x14200 pgzero  zerothread
0x14200 aiodonedaiodoned
0x14200 syncerr update
0x14200 cleaner cleaner
0x14200 reaper  reaper
0x14200 pgdaemonpagedaemon
0x14200 bored   srdis
0x14200 bored   crynlk
0x14200 bored   crypto
0x14200 usbtk   usbtask
0x14200 usbatsk usbatsk
0x14200 bored   i915-hangcheck
0x14200 bored   i915-db
0x14200 bored   i915
0x40014200  acpi0   acpi0
0x40014200  idle3
0x40014200  idle2
0x40014200  idle1
0x14200 bored   sensors
0x14200 bored   softnet
0x14200 bored   systqmp
0x14200 bored   systq
0x40014200  netlock softclock
0x40014200  idle0
0x14200 bored   sbar
0x82waitinit
0x10200 scheduler   swapper

 At this point I want to reboot and type "boot dump"
ddb{0}> boot dump

### The console is flooded with errors, I can't read them all, it's too fast
splassert: ...
uvm_map ...
assertwaitock: want 0 have 7
pool_do_get: want 6 have 7
buf...

### After a while, it drops in DDB again
splassert: pool_do_get: want 6 have 7
splassert: assertwaitok: want 0 have 7
splassert: assertwaitok: want 0 have 7
splassert: pool_do_put: want 6 have 7
splassert: assertwaitok: want 0 have 7
splassert: pool_do_get: want 0 have 7
WARNING: not updating battery clock
splassert: assertwaitok: want 0 have 7
splassert: assertwaitok: want 0 have 7
panic: kernel diagnostic assertion "p->p_stat == SRUN" failed: file 
"/usr/src/sys/kern/kern_sched.c", line 312
Stopped at  db_enter+0x5:   popq%rbp
TID PID UID PRFLAGS PFLAGS  CPU 
COMMAND
db_enter() at db_enter+0x5
panic() at panic+0x129
__assert(814f85b4, 800032ad0870, 81aa0730, 800032a84470 
at __assert+0x24
sched_chooseproc() at sched_chooseproc+0x233
mi_switch() at mi_switch+0x199
sleep_finish(800032ad0938, 20) at sleep_finish+0x70
tsleep(78,8000d2000,1,78) at tsleep+0xc4
acpiec_read_1(800032ad0ae0, 8000d2000) at acpiec_read_1+0x167
acpi_gasio(80f77e20,0,0,800032ad0b00,1,64fe70c3214b8490) at 
acpi_gasio+0x424
aml_opreg_ec_handler(50,800032ad0ae0,fff815c6719,800032ad0a60,fff800f77e20)
 at aml_opreg_ec_handler+0x29
aml_rwgen(8000f77e08,80071b08,8,0,3c0,64fe70c3214b8490) at 
aml_rwgen+0x657

Re: locate(1) segfault with pkg_locate(1)

2017-12-08 Thread Grégoire Jadi
"Todd C. Miller"  writes:

> On Fri, 08 Dec 2017 08:58:17 -0700, "Todd C. Miller" wrote:
>
>> This adds some missing length checks and fixes the crash.
>> It may just be hiding the source of the actual bug, however.
>
> Updated diff that adds another missing length check.

Runs fine too.

>
>  - todd
>
> Index: usr.bin/locate/locate/fastfind.c
> ===
> RCS file: /cvs/src/usr.bin/locate/locate/fastfind.c,v
> retrieving revision 1.13
> diff -u -p -u -r1.13 fastfind.c
> --- usr.bin/locate/locate/fastfind.c  23 Oct 2015 07:57:03 -  1.13
> +++ usr.bin/locate/locate/fastfind.c  8 Dec 2017 16:16:37 -
> @@ -173,6 +173,8 @@ fastfind_mmap
>
>   /* go forward or backward */
>   if (c == SWITCH) { /* big step, an integer */
> + if (len < INTSIZE)
> + break;
>   count += getwm(paddr) - OFFSET;
>   len -= INTSIZE; paddr += INTSIZE;
>   } else {   /* slow step, =< 14 chars */
> @@ -184,7 +186,7 @@ fastfind_mmap
>   p = path + count;
>   foundchar = p - 1;
>
> - for (;;) {
> + for (; len > 0; ) {
>   c = (u_char)*paddr++;
>   len--;
>   /*
> @@ -197,7 +199,7 @@ fastfind_mmap
>*/
>   if (c < PARITY) {
>   if (c <= UMLAUT) {
> - if (c == UMLAUT) {
> + if (c == UMLAUT && len > 0) {
>   c = (u_char)*paddr++;
>   len--;



Re: locate(1) segfault with pkg_locate(1)

2017-12-08 Thread Grégoire Jadi
"Todd C. Miller"  writes:

> This adds some missing length checks and fixes the crash.
> It may just be hiding the source of the actual bug, however.

I confirm, it does fix the crash.
Thanks.

>  - todd
>
> Index: usr.bin/locate/locate/fastfind.c
> ===
> RCS file: /cvs/src/usr.bin/locate/locate/fastfind.c,v
> retrieving revision 1.13
> diff -u -p -u -r1.13 fastfind.c
> --- usr.bin/locate/locate/fastfind.c  23 Oct 2015 07:57:03 -  1.13
> +++ usr.bin/locate/locate/fastfind.c  8 Dec 2017 15:57:22 -
> @@ -184,7 +184,7 @@ fastfind_mmap
>   p = path + count;
>   foundchar = p - 1;
>
> - for (;;) {
> + for (; len > 0; ) {
>   c = (u_char)*paddr++;
>   len--;
>   /*
> @@ -197,7 +197,7 @@ fastfind_mmap
>*/
>   if (c < PARITY) {
>   if (c <= UMLAUT) {
> - if (c == UMLAUT) {
> + if (c == UMLAUT && len > 0) {
>   c = (u_char)*paddr++;
>   len--;



locate(1) segfault with pkg_locate(1)

2017-12-08 Thread Grégoire Jadi
>Synopsis:  locate segfault when called from pkg_locate
>Environment:
System  : OpenBSD 6.2
Details : OpenBSD 6.2-current (GENERIC.MP) #259: Thu Dec  7 
13:09:59 MST 2017
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description
locate(1) segfault when called from pkg_locate(1).
It only occurs since yesterday's snapshot.

>How-To-Repeat:
$ pkg_locate qwertyuiop
Segmentation fault (core dumped)
$ gdb /usr/bin/locate locate.core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd6.2"...
Core was generated by `locate'.
Program terminated with signal 11, Segmentation fault.
Loaded symbols for /usr/bin/locate
Reading symbols from /usr/lib/libc.so.92.1...done.
Loaded symbols for /usr/lib/libc.so.92.1
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  fastfind_mmap (pathpart=Variable "pathpart" is not available.
) at fastfind.c:188
188 c = (u_char)*paddr++;
(gdb) bt
#0  fastfind_mmap (pathpart=Variable "pathpart" is not available.
) at fastfind.c:188
#1  0x021ef7001005 in search_mmap (db=Variable "db" is not available.
) at /data/daimrod/src/openbsd/src/usr.bin/locate/locate/locate.c:236
#2  0x021ef7000e08 in main (argc=Variable "argc" is not available.
) at /data/daimrod/src/openbsd/src/usr.bin/locate/locate/locate.c:182
Current language:  auto; currently minimal
(gdb) info registers
rax0x69 105
rbx0x70 112
rcx0x7f7db677   140187732391543
rdx0x7f7db683   140187732391555
rsi0x221e481b0002344590880768
rdi0x0  0
rbp0x7f7dbb80   0x7f7dbb80
rsp0x7f7db620   0x7f7db620
r8 0x7f7db678   140187732391544
r9 0x28 40
r100x0  0
r110x0  0
r120x221e481b0012344590880769
r130x21ef720406a2332018360426
r140x33 51
r150x0  0
rip0x21ef7001a440x21ef7001a44 
eflags 0x10203  66051
cs 0x2b 43
ss 0x23 35
ds 0x23 35
es 0x23 35
fs 0x23 35
gs 0x23 35

Is there any additional information I can provide to help you?

Best,

dmesg:
OpenBSD 6.2-current (GENERIC.MP) #259: Thu Dec  7 13:09:59 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4062691328 (3874MB)
avail mem = 3932659712 (3750MB)
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 "6QET47WW (1.17 )" date 07/14/2010
bios0: LENOVO 3680BA5
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 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 1197.20 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
acpitimer0: recalibrated TSC frequency 2394006338 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 132MHz
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 520 @ 2.40GHz, 1197.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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,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 520 @ 2.40GHz, 1197.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,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSO

Crash when shutting down because the system overheat

2017-11-21 Thread Grégoire Jadi
>Synopsis:  The system crashed when the system was shutting down because 
>the CPU was overheating
>Category:  ???
>Environment:
System  : OpenBSD 6.2
Details : OpenBSD 6.2-current (GENERIC.MP) #220: Fri Nov 17 
11:47:01 MST 2017
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
I was compiling a port (tor-browser) when the system decided to stop
because the CPU was overheating.

Here is the result of the show panic, show registers, trace, and ps
commands :

error: [drm:pid34966:intel_pipe_update_start] *ERROR* Potential atomic update 
failure on pipe A
acpitz0: critical temperature exceeded 100C, shutting down
acpitz0: critical temperature exceeded 101C, shutting down
acpitz0: critical temperature exceeded 101C, shutting down
acpitz0: critical temperature exceeded 128C, shutting down
--- stopping package daemons: tor ---
acpitz0: critical temperature exceeded 128C, shutting down

syncing disks... uvm_fault(0xff01367e4000, 0x18, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at handle_workitem_freeblocks+0x39: cmpq $0x1, 0x18(%rax)

ddb{0}> show panic
the kernel did not panic
ddb{0}> show registers
rdi 0xff011e2f7958
rsi  0
rbp 0x800032a83090
rbx 0xff0118c34d90
rdx 0xfe0003ff1a02
rcx0x1
rax  0
r8   0
r9  0x800032b05920
r100x1
r12  0
r11 0x80bc0600
r12  0
r13 0x80bc0600
r14 0xff011e2f7958
r15 0x80351000
rip 0x813aa4d9  handle_workitem_freeblocks+0x39
cs 0x8
rflags 0x10286  __ALIGN_SIZE+0xf286
rsp 0x800032a82e50
ss0x10
handle_workitem_freeblocks+0x39:cmpq$0x1,0x18(%rax)
ddb{0}> trace
handle_workitem_freeblocks(80351000) at handle_workitem_freeblocks+0x39
process_worklist_item(800032a84000,800351000) at 
process_worklist_item+0x1e9
softdep_process_worklist(800032a8331c) at softdep_process_worklist+0xea
softdep_flushworklist(800032a84000,1,8bc0600) at 
softdep_flushworklist+0x93
ffs_sync(8,80351000,0,800032a84000) at ffs_sync+0xb3
doumount_leaf(800351040,0,0) at doumount_leaf+0x68
doumount(80351040,80351000,800350800) at doumount+0xea

vfs_umountall() at vfs_unmountall+0x9d
vfs_shutdown() at vfs_shuftdown+0x3e
boot(0) at boot+0x49
reboot(832a834c0) at reboot+0x4f
sys_reboot(800032a84000,81a9b180,815fa7ec) at 
sys_reboot+0x5c
syscall() at syscall+0x279
--- syscall (number 55) ---
end of kernel
end trace frame: 0x7f7c18b0, count: -13
0x1a887050b0aa:
ddb{0}> ps
FLAGS   WAITCOMMAND
0x14200 zerothread
0x14200 aiodonedaiodoned
0x14200 syncer  update
0x14200 cleaner cleaner
0x14200 reaper  reaper
0x14200 pgdaemonpagedaemon
0x14200 bored   srdis
0x14200 bored   crynlk
0x14200 bored   crypto
0x14200 usbtsk  usbtalk
0x14200 usbatsk usbtask
0x14200 bored   i915-hangcheck
0x14200 bored   i915-dp
0x14200 bored   i915
0x40014200  acpi0   acpi0
0x40014200  idle3
0x40014200  idle2
0x40014200  idle1
0x14200 bored   sensors
0x14200 softnet
0x14200 bored   systqmp
0x14200 bored   systq
0x40014200  bored   softclock
0x40014200  idle0
0x14200 bored   sbar
0x2 init
0x10200 scheduler   swapper

After that I typed :
ddb{0}> boot dump
dumping to dev 4,17 off 492583
dump

But the system froze and I had to reboot it manually.

Though it isn't the first time my computer had to reboot because it was
overheating (I was testing the stress(1) package), it is the first time
it crashed like this.

Is there anything I can do to help debug this? Is it debugable? It is
worth spending time to debug it?

Best,

dmesg:
OpenBSD 6.2-current (GENERIC.MP) #220: Fri Nov 17 11:47:01 MST 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4062691328 (3874MB)
avail mem = 3932659712 (3750MB)
mpath0 at root
scsibus0 at

Re: SSH ~& command crash with a coredump

2017-06-22 Thread Grégoire Jadi
n 06/21/17 12:16, Ricardo Mestre wrote:
> Hi,
> 
> I can confirm this issue, and the diff below seems to solve it for me.
> 
> Could you please test it and let us know if it works on your side?

It does fix the issue. Thanks you.

> 
> Reason: In clientloop.c during client_loop() this function calls
> client_simple_escape_filter() which then calls process_escapes() which in turn
> fork()s the process. That being said, the pledge inside client_loop which
> applies to this code path lacks the proc promise and therefore aborts ssh.
> 
> Index: clientloop.c
> ===
> RCS file: /cvs/src/usr.bin/ssh/clientloop.c,v
> retrieving revision 1.299
> diff -u -p -u -r1.299 clientloop.c
> --- clientloop.c  31 May 2017 09:15:42 -  1.299
> +++ clientloop.c  21 Jun 2017 10:14:26 -
> @@ -1246,7 +1246,7 @@ client_loop(int have_pty, int escape_cha
>  
>   } else {
>   debug("pledge: network");
> - if (pledge("stdio unix inet dns tty", NULL) == -1)
> + if (pledge("stdio unix inet dns proc tty", NULL) == -1)
>   fatal("%s pledge(): %s", __func__, strerror(errno));
>   }
> 
> 



SSH ~& command crash with a coredump

2017-06-21 Thread Grégoire Jadi
>Synopsis:  The ~& SSH command crash with a coredump.
>Category:  system amd64
>Environment:
System  : OpenBSD 6.1
Details : OpenBSD 6.1-current (GENERIC.MP) #20: Mon Jun 19 08:05:02
MDT 2017
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The ~& command is used to put SSH in background at logout when  waiting
for forwarded connection / X11 sessions to terminate.

The problem occurs in the 2017-06-19 snapshot and in stable (tested in
a kvm VM).

>How-To-Repeat:

$ ssh somehost
somehost$ ~&
Abort trap (core dumped)
$ dmesg | tail
ssh(36167): syscall 2 "proc"<3>ssh(84227): syscall 2 "proc"
<3>ssh(82010): syscall 2 "proc"

$ gdb -c ssh.core
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "amd64-unknown-openbsd6.1".
Core was generated by `ssh'.
Program terminated with signal 6, Aborted.
#0  0x028597d43eca in ?? ()
(gdb) bt
#0  0x028597d43eca in ?? ()
#1  0x028597d8cd45 in ?? ()
#2  0x in ?? ()
(gdb) info reg
rax0x1  1
rbx0x0  0
rcx0x28597d43eca2772801175242
rdx0x0  0
rsi0x7f7ed2e0   140187732464352
rdi0x285baf3d7002773390448384
rbp0x26 0x26
rsp0x7f7ecdf8   0x7f7ecdf8
r8 0x285baf3d7102773390448400
r9 0x7f7ed2e2   140187732464354
r100x0  0
r110x246582
r120x7f7ed770   140187732465520
r130x28535285c402771145743424
r140x285c013d8002773476431872
r150x7f7ed770   140187732465520
rip0x28597d43eca0x28597d43eca
eflags 0x247583
cs 0x2b 43
ss 0x23 35
ds 0x23 35
es 0x23 35
fs 0x23 35
gs 0x23 35


I'd be happy to provide additional information if needed.

dmesg:
OpenBSD 6.1-current (GENERIC.MP) #20: Mon Jun 19 08:05:02 MDT 2017
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4062691328 (3874MB)
avail mem = 3933769728 (3751MB)
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 "6QET47WW (1.17 )" date 07/14/2010
bios0: LENOVO 3680BA5
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 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2394.48 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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2394476640 Hz
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 520 @ 2.40GHz, 2394.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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,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 520 @ 2.40GHz, 2394.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,PCID,SSE4.1,SSE4.2,POPCNT,AES,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu

Re: gpg-agent core dump

2016-11-19 Thread Grégoire Jadi
On 11/19/16 00:44, Antoine Jacoutot wrote:
> On Fri, Nov 18, 2016 at 07:07:37PM +0100, Grégoire Jadi wrote:
>>> Synopsis:   gpg-agent generate a coredump
>>> Category:   user amd64
>>> Environment:
>>  System  : OpenBSD 6.0
>>  Details : OpenBSD 6.0-current (GENERIC.MP) #0: Thu Nov 17 15:57:16 
>> MST
>> 2016
>>   
>> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>>
>>  Architecture: OpenBSD.amd64
>>  Machine : amd64
>>
>>> Description:
>>  gpg-agent produces a coredump when invoked. It happens without any
>> configuration (empty ~/.gnupg). It worked fine with a snapshot from
>> 2016-11-12.
>> Since gpg-agent can't be started, neither gpg2 and enigmail work.
>> Is there anymore information I can provide to help you?
> 
> Update gnupg2.
>

Done, it works.

Thank you!



gpg-agent core dump

2016-11-18 Thread Grégoire Jadi

Synopsis:   gpg-agent generate a coredump
Category:   user amd64
Environment:

System  : OpenBSD 6.0
	Details : OpenBSD 6.0-current (GENERIC.MP) #0: Thu Nov 17 15:57:16 
MST 2016

 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64


Description:
	gpg-agent produces a coredump when invoked. It happens without any 
configuration (empty ~/.gnupg). It worked fine with a snapshot from 
2016-11-12.

Since gpg-agent can't be started, neither gpg2 and enigmail work.
Is there anymore information I can provide to help you?


How-To-Repeat:

$ gpg-agent
assertion "res == 0" failed: file "npth.c", line 123, function 
"enter_npth"
Abort trap (core dumped)
	$ gpg-agent -h  assertion "res == 0" failed: file "npth.c", line 123, 
function "enter_npth"

Abort trap (core dumped)

dmesg:
OpenBSD 6.0-current (GENERIC.MP) #0: Thu Nov 17 15:57:16 MST 2016
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4062691328 (3874MB)
avail mem = 3934986240 (3752MB)
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 "6QET47WW (1.17 )" date 07/14/2010
bios0: LENOVO 3680BA5
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 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 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.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,PCID,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 520 @ 2.40GHz, 2660.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,PCID,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 520 @ 2.40GHz, 2660.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,PCID,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 520 @ 2.40GHz, 2660.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,PCID,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 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xe000, 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
"PNP0303" at acpi0 not configured
"LEN0018" at acpi0 not configured
"SMO1200" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "42T4837" serial 50934 type LION oem "LGC"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
"PNP0C14" at acpi0 not configured
acpidock0 at acpi0: GDCK not docked (0)
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD0
acpivideo1 at acpi0: VID_
cpu0: Enhanced SpeedStep 2660 MHz: speeds: 2400, 2399, 2266, 2133, 1999, 
1866, 173