hns - 日記自動生成システム - Version 2.19.9

先月 2017年07月 来月
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2017年07月02日() 旧暦 [n年日記] [更新:"2017/07/02 14:16:19"]

#1 [crash] reading crash dump with crash command

2017/04/23 に書いた話 の続きで、crash に表示されるのが、全く同じ(かな)という話

dmesg:

...
/: replaying log to disk
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
iwn0: scan request(1) while scanning(0) ignored
iwn0: scan request(1) while scanning(0) ignored
iwn0: scan request(1) while scanning(0) ignored
uhidev0 at uhub2 port 2 configuration 1 interface 0
uhidev0: ELECOM ELECOM USB mouse with wheel, rev 1.10/22.87, addr 3, iclass 3/1
ums0 at uhidev0: 3 buttons and Z dir
wsmouse1 at ums0 mux 0
acpi0: entering state S3
Flushing disk caches: 4 done
ioapic0 reenabling
fatal protection fault in supervisor mode
trap type 4 code 0 rip ffffffff8028270a cs 8 rflags 10046
cr2 7f7fffbffff8 ilevel 8
                   rsp fffffe804066aec8
curlwp 0xfffffe810a45b6c0 pid 3811.1 lowest kstack 0xfffffe80406682c0
panic: trap
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x13c
snprintf() at netbsd:snprintf
startlwp() at netbsd:startlwp
alltraps() at netbsd:alltraps+0x96
cpu0: End traceback...

preparing crash command:

CF-SX2@makoto 08:42:02/170702(/var/crash)% sudo -s
CF-SX2# gunzip netbsd.42.core.gz 
CF-SX2# gunzip netbsd.42.gz     

crash -M netbsd.42.core -N netbsd.42:

CF-SX2# crash -M netbsd.42.core -N netbsd.42
Crash version 7.1_RC2, image version 7.1_STABLE.
WARNING: versions differ, you may not be able to examine this image.
System panicked: trap
Backtrace from time of crash is available.
crash> bt
_KERNEL_OPT_NARCNET() at 0
_KERNEL_OPT_ACPI_SCANPCI() at _KERNEL_OPT_ACPI_SCANPCI+0x7
vpanic() at vpanic+0x145
snprintf() at snprintf
startlwp() at startlwp
calltrap() at calltrap+0x11
crash> 

show reg:

crash> show reg
ds          0
es          0
fs          0
gs          0
rdi         0
rsi         0
rbp         fffffe804069dc78
rbx         0
rdx         0
rcx         0
rax         0
r8          0
r9          0
r10         0
r11         0
r12         0
r13         0
r14         0
r15         0
rip         0
cs          0
rflags      0
rsp         fffffe804069dc38
ss          0
crash: kvm_read(0x0, 1): invalid translation (invalid PTE)
0:
crash> 

ps:

crash> ps
PID LID S CPU     FLAGS       STRUCT LWP *               NAME WAIT
895      1 2   0   8020000   fffffe811d0002c0             sysctl
826      1 8   3   8020000   fffffe8117f76060                 rm
304      1 3   3   8020080   fffffe8117f76480                 sh wait
793      1 3   0   8020080   fffffe811cf44300                 sh wait
981      1 3   3   8020080   fffffe811bd35860                 sh wait
196      1 3   0   8020080   fffffe811cd3b320                 sh wait
42       1 8   0   8020000   fffffe811d000b00                 sh
531      1 3   0   8020080   fffffe811a5d8000              getty ttyraw
620      1 3   0   8020080   fffffe811bd35440              getty ttyraw
613      1 3   0   8020080   fffffe810a4932a0              getty ttyraw
638      1 3   0   8020080   fffffe810813c6a0              login wait
631      1 8   0   8020000   fffffe811c064880               cron
596      1 3   0   8020080   fffffe811bd35020        dbus-daemon select
579      1 3   0   8020080   fffffe811cd3bb60              inetd kqueue
495  >   1 7   0   8020000   fffffe811a5d8420           sendmail
497  >   1 7   1         0   fffffe811b777ba0           sendmail
411      1 3   0   8020080   fffffe811b78a340               sshd select
430      1 3   0   8020080   fffffe811cd3b740             powerd kqueue
391      1 3   0   8020080   fffffe811cee8700           ifwatchd netio
214      1 3   3   8020080   fffffe811cf44b40            syslogd kqueue
184      1 3   0   8020080   fffffe811cee82e0             dhcpcd wait
157      1 3   0   8020080   fffffe811cf44720     wpa_supplicant select
1        1 3   0   8020080   fffffe8107f9a220               init wait
0       72 3   0       200   fffffe8108143aa0            physiod physiod
0       71 3   0       200   fffffe810813cac0           aiodoned aiodoned
0    >  70 7   2       200   fffffe8108143260            ioflush
0       69 3   0       200   fffffe8108143680           pgdaemon pgdaemon
0       66 3   0       200   fffffe810801c240          atapibus0 sccomp
0       63 3   0       200   fffffe8107f085e0               usb1 usbevt
0       62 3   0       200   fffffe810801c660               usb0 usbevt
0       61 3   0       200   fffffe8107f9e600          coretemp1 coretemp1
0       60 3   0       200   fffffe8107f9e1e0          coretemp0 coretemp0
0       59 3   0       200   fffffe8107fafa40            acpitz1 acpitz1
0       58 3   0       200   fffffe8107faf620            acpitz0 acpitz0
0       57 3   0       200   fffffe8107f9ea20           acpibat0 acpibat0
0       56 3   0       200   fffffe810801ca80          cryptoret crypto_w
0       55 3   0       200   fffffe8107f9a640              unpgc unpgc
0       54 2   2       200   fffffe8107faf200        vmem_rehash
0       53 3   0       200   fffffe8107f9aa60             sdmmc0 mmctaskq
0    >  44 7   3       200   fffffe8107f08a00               iic0
0       43 3   0       200   fffffe8107cf81a0            atabus1 atath
0       42 3   0       200   fffffe8107cf85c0            atabus0 atath
0       41 3   0       200   fffffe8107cf89e0         usbtask-dr usbtsk
0       40 3   0       200   fffffe810736e180         usbtask-hc usbtsk
0       39 3   0       200   fffffe810736e5a0            intelfb intelfb
0       38 3   2       200   fffffe810736e9c0               i915 i915
0       37 3   0       200   fffffe8107182160           lnxsyswq lnxsyswq
0       36 3   0       200   fffffe8107182580               pms0 pmsreset
0       35 3   3       200   fffffe81071829a0    acpiec sci thre ecsci
0       34 3   3       200   fffffe81070ed140            xcall/3 xcall
0       33 1   3       200   fffffe81070ed560          softser/3
0       32 1   3       200   fffffe81070ed980          softclk/3
0       31 1   3       200   fffffe81070e6120          softbio/3
0       30 1   3       200   fffffe81070e6540          softnet/3
0       29 1   3       201   fffffe81070e6960             idle/3
0       28 3   2       200   fffffe8107101100            xcall/2 xcall
0       27 1   2       200   fffffe8107101520          softser/2
0       26 1   2       200   fffffe8107101940          softclk/2
0       25 1   2       200   fffffe81070e80e0          softbio/2
0       24 1   2       200   fffffe81070e8500          softnet/2
0       23 1   2       201   fffffe81070e8920             idle/2
0       22 3   1       200   fffffe81070e10c0            xcall/1 xcall
0       21 1   1       200   fffffe81070e14e0          softser/1
0       20 1   1       200   fffffe81070e1900          softclk/1
0       19 1   1       200   fffffe81070ca0a0          softbio/1
0       18 1   1       200   fffffe81070ca4c0          softnet/1
0       17 1   1       201   fffffe81070ca8e0             idle/1
0       16 3   1       200   fffffe811d30d080             sysmon smtaskq
0       15 3   0       200   fffffe811d30d4a0         pmfsuspend pmfsuspend
0       14 3   0       200   fffffe811d30d8c0           pmfevent pmfevent
0       13 3   0       200   fffffe811db29060         sopendfree sopendfr
0       12 3   0       200   fffffe811db29480           nfssilly nfssilly
0       11 2   3       200   fffffe811db298a0            cachegc
0       10 3   1       200   fffffe811e12c040              vrele vrele
0        9 3   0       200   fffffe811e12c460             vdrain vdrain
0        8 3   0       200   fffffe811e12c880          modunload mod_unld
0        7 3   0       200   fffffe811e138020            xcall/0 xcall
0        6 1   0       200   fffffe811e138440          softser/0
0        5 1   0       200   fffffe811e138860          softclk/0
0        4 1   0       200   fffffe811e141000          softbio/0
0        3 1   0       200   fffffe811e141420          softnet/0
0        2 1   0       201   fffffe811e141840             idle/0
0        1 3   0       200   ffffffff810085e0            swapper uvm
crash> 

rip ffffffff8028270a:

とあるので、その辺の命令か ? だが、多分、bt が必要
ffffffff80282700 <xrstor>:
ffffffff80282700:       48 89 f0                mov    %rsi,%rax
ffffffff80282703:       48 89 f2                mov    %rsi,%rdx
ffffffff80282706:       48 c1 ea 20             shr    $0x20,%rdx
ffffffff8028270a:       0f ae 2f                xrstor (%rdi)
ffffffff8028270d:       c3                      retq   
ffffffff8028270e:       66 90                   xchg   %ax,%ax
ffffffff8034dc4c <fpudna>:
ffffffff8034dc4c:       55                      push   %rbp
....
ffffffff8034dd2c:       e8 9f 49 f3 ff          callq  ffffffff802826d0 <fxrstor>
ffffffff8034dd31:       44 89 f7                mov    %r14d,%edi
ffffffff8034dd34:       5b                      pop    %rbx
ffffffff8034dd35:       41 5c                   pop    %r12
ffffffff8034dd37:       41 5d                   pop    %r13
ffffffff8034dd39:       41 5e                   pop    %r14
ffffffff8034dd3b:       5d                      pop    %rbp
ffffffff8034dd3c:       e9 bf 63 dc ff          jmpq   ffffffff80114100 <spllower>
ffffffff8034dd41:       49 8d bd 80 00 00 00    lea    0x80(%r13),%rdi
ffffffff8034dd48:       e8 b3 49 f3 ff          callq  ffffffff80282700 <xrstor>
ffffffff8034dd4d:       44 89 f7                mov    %r14d,%edi
ffffffff8034dd50:       5b                      pop    %rbx
ffffffff8034dd51:       41 5c                   pop    %r12
ffffffff8034dd53:       41 5d                   pop    %r13
ffffffff8034dd55:       41 5e                   pop    %r14
ffffffff8034dd57:       5d                      pop    %rbp
ffffffff8034dd58:       e9 a3 63 dc ff          jmpq   ffffffff80114100 <spllower>

ffffffff80100a70 <Xtrap07>:
ffffffff80100a70:       6a 00                   pushq  $0x0
ffffffff80100a72:       6a 0c                   pushq  $0xc
...

ffffffff80100af8:       48 89 e7                mov    %rsp,%rdi
ffffffff80100afb:       e8 4c d1 24 00          callq  ffffffff8034dc4c <fpudna>
ffffffff80100b00:       e9 41 04 00 00          jmpq   ffffffff80100f46 <calltrap+0x11>
ffffffff80100b05:       66 66 2e 0f 1f 84 00    data32 nopw %cs:0x0(%rax,%rax,1)
ffffffff80100b0c:       00 00 00 00 
trap 後のように見えて、ここまで「結局、情報なし」

#2 [crash] part 2 (NetBSD/amd64 8.99.1) panic after wake up

少し 変更を加えて 見た。 Small changes applied.
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
/export: replaying log to disk
acpi0: entering state S3
Flushing disk caches: 1 done
ioapic0 reenabling
ioapic0 reenabling done ..
uvm_fault(0xffffe4011ba652f0, 0x0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip 0xffffffff80642fd8 cs 0x8 rflags 0x10202 cr2 0 ilevel 0 rsp 0xffffe40040b05aa0
curlwp 0xffffe4011a52c500 pid 168.1 lowest kstack 0xffffe40040b022c0
panic: trap
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
trap() at netbsd:trap+0xc6b
--- trap (number 6) ---
drm_pci_irq_install() at netbsd:drm_pci_irq_install+0x90
drm_irq_install() at netbsd:drm_irq_install+0xb7
__i915_drm_thaw() at netbsd:__i915_drm_thaw+0xc9
i915drmkms_resume() at netbsd:i915drmkms_resume+0x34
device_pmf_driver_resume() at netbsd:device_pmf_driver_resume+0x46
pmf_device_resume_locked() at netbsd:pmf_device_resume_locked+0xd3
pmf_device_resume() at netbsd:pmf_device_resume+0x41
pmf_system_resume() at netbsd:pmf_system_resume+0xc7
acpi_enter_sleep_state() at netbsd:acpi_enter_sleep_state+0x182
sysctl_hw_acpi_sleepstate() at netbsd:sysctl_hw_acpi_sleepstate+0xfe
sysctl_dispatch() at netbsd:sysctl_dispatch+0xc1
sys___sysctl() at netbsd:sys___sysctl+0xd8
syscall() at netbsd:syscall+0x1d8
--- syscall (number 202) ---
7480ca71b75a:
cpu0: End traceback...
CF-N10$ pwd
/export/git-work/netbsd-src/sys/external/bsd/drm2
CF-N10$ cat -n ./i915drm/i915_pci.c |less
   235  static bool
   236  i915drmkms_resume(device_t self, const pmf_qual_t *qual)
   237  {
   238          struct i915drmkms_softc *const sc = device_private(self);
   239          struct drm_device *const dev = sc->sc_drm_dev;
   240          int ret;
   241  
   242          if (dev == NULL)
   243                  return true;
   244  
   245          ret = i915_drm_thaw_early(dev);
   246          if (ret)
   247                  return false;
   248          ret = i915_drm_thaw(dev);
   249          if (ret)
   250                  return false;
   251  
   252          return true;
   253  }
    577 static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
    578 {
    579         struct drm_i915_private *dev_priv = dev->dev_private;
    580         int error = 0;
    581 
    582         if (drm_core_check_feature(dev, DRIVER_MODESET) &&
    583             restore_gtt_mappings) {
    584                 mutex_lock(&dev->struct_mutex);
    585                 i915_gem_restore_gtt_mappings(dev); 
    586                 mutex_unlock(&dev->struct_mutex);
    587         } 
    588          
    589         i915_restore_state(dev);
    590         intel_opregion_setup(dev);
    591          
    592         /* KMS EnterVT equivalent */
    593         if (drm_core_check_feature(dev, DRIVER_MODESET)) {
    594                 intel_init_pch_refclk(dev);
    595                 drm_mode_config_reset(dev);
    596
    597                 mutex_lock(&dev->struct_mutex);  
    598
    599         }       error = i915_gem_init_hw(dev);
    600                 mutex_unlock(&dev->struct_mutex);
    601                 
    602                 /* We need working interrupts for modeset enabling ... */
    603                 drm_irq_install(dev);
    604
    605                 intel_modeset_init_hw(dev);
    606                 
    607                 drm_modeset_lock_all(dev);
    608                 intel_modeset_setup_hw_state(dev, true);
    609			drm_modeset_unlock_all(dev); 
    610                 
    611                 /*      
    612                  * ... but also need to make sure that hotplug processing
    613                  * doesn't cause havoc. Like in the driver load code we don't
    614                  * bother with the tiny race here where we might loose hotplug
    615                  * notifications.
    616                  * */
    617                 intel_hpd_init(dev);
    618                 dev_priv->enable_hotplug_processing = true;
    619                 /* Config may have changed between suspend and resume */
    620                 intel_resume_hotplug(dev);
    621         }
    622  
    623         intel_opregion_init(dev);
    624 
    625 #ifndef __NetBSD__              /* XXX fb */
    626         /*
    627          * The console lock can be pretty contented on resume due
    628          * to all the printk activity.  Try to keep it out of the hot
    629          * path of resume if possible.
    630          */     
    631         if (console_trylock()) {
    632                 intel_fbdev_set_suspend(dev, FBINFO_STATE_RUNNING);
    633                 console_unlock();
    634         } else {
    635                 schedule_work(&dev_priv->console_resume_work);
    636         }
    637 #endif
    638 
    639         mutex_lock(&dev_priv->modeset_restore_lock);
    640         dev_priv->modeset_restore = MODESET_DONE;
    641         mutex_unlock(&dev_priv->modeset_restore_lock);
    642 
    643         intel_runtime_pm_put(dev_priv);
    644         return error;
    645 }
(dmesg)
i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product 0126 (rev. 0x09)
drm: Memory usable by graphics device = 2048M
drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
drm: Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at msi0 vec 0 (i915)
drm: Wrong MCH_SSKPD value: 0x17050407
drm: This can cause pipe underruns and display issues.
drm: Please upgrade your BIOS to fix this.
intelfb0 at i915drmkms0
i915drmkms0: info: registered panic notifier
the changes so far
234 static int
235 drm_pci_irq_install(struct drm_device *dev, irqreturn_t (*handler)(void *),
236     int flags, const char *name, void *arg, struct drm_bus_irq_cookie **cookiep)
237 {
238         const struct pci_attach_args *const pa = drm_pci_attach_args(dev);
239         const char *intrstr;
240         char intrbuf[PCI_INTRSTR_LEN];
241         struct drm_bus_irq_cookie *irq_cookie;
242         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
243  
244         irq_cookie = kmem_alloc(sizeof(*irq_cookie), KM_SLEEP);
245         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
246  
247         if (dev->pdev->msi_enabled) {
248         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
249                 irq_cookie->intr_handles = dev->pdev->intr_handles;
250                 dev->pdev->intr_handles = NULL;
251         } else {
252         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
253                 if (pci_intx_alloc(pa, &irq_cookie->intr_handles))
254                         return -ENOENT;
255         }
256         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
257
258         intrstr = pci_intr_string(pa->pa_pc, irq_cookie->intr_handles[0],
259             intrbuf, sizeof(intrbuf));
260         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
261         irq_cookie->ih_cookie = pci_intr_establish_xname(pa->pa_pc,
262             irq_cookie->intr_handles[0], IPL_DRM, handler, arg, name);
263         aprint_error_dev(dev->dev, "%s: %04d: %s\n", __FILE__, __LINE__, __FUNCTION__);
264         if (irq_cookie->ih_cookie == NULL) {
265                 aprint_error_dev(dev->dev,
266                     "couldn't establish interrupt at %s (%s)\n", intrstr, name);
267                 return -ENOENT;
268         }
269 
270         aprint_normal_dev(dev->dev, "interrupting at %s (%s)\n", intrstr, name);
271         *cookiep = irq_cookie;
272         return 0;
273 }                   

calling pci_intr_string(pa->pa_pc, irq_cookie->intr_handles[0], is the point of panic:

dmesg again
i915drmkms0: /export/git-work/netbsd-src/sys/external/bsd/drm2/pci/drm_pci.c: 0242: drm_pci_irq_install
i915drmkms0: /export/git-work/netbsd-src/sys/external/bsd/drm2/pci/drm_pci.c: 0245: drm_pci_irq_install
i915drmkms0: /export/git-work/netbsd-src/sys/external/bsd/drm2/pci/drm_pci.c: 0248: drm_pci_irq_install
i915drmkms0: /export/git-work/netbsd-src/sys/external/bsd/drm2/pci/drm_pci.c: 0256: drm_pci_irq_install
uvm_fault(0xffffe4011a933188, 0x0, 1) -> e
fatal page fault in supervisor mode
trap type 6 code 0 rip 0xffffffff806430c0 cs 0x8 rflags 0x10286 cr2 0 ilevel 0 rsp 0xffffe40040b21aa0
curlwp 0xffffe40119ee8120 pid 1078.1 lowest kstack 0xffffe40040b1e2c0
panic: trap
cpu0: Begin traceback...
vpanic() at netbsd:vpanic+0x140
snprintf() at netbsd:snprintf
trap() at netbsd:trap+0xc6b
--- trap (number 6) ---
drm_pci_irq_install() at netbsd:drm_pci_irq_install+0x128
drm_irq_install() at netbsd:drm_irq_install+0x13e
__i915_drm_thaw() at netbsd:__i915_drm_thaw+0xc9
i915drmkms_resume() at netbsd:i915drmkms_resume+0x34
device_pmf_driver_resume() at netbsd:device_pmf_driver_resume+0x46
pmf_device_resume_locked() at netbsd:pmf_device_resume_locked+0xd3
pmf_device_resume() at netbsd:pmf_device_resume+0x41
pmf_system_resume() at netbsd:pmf_system_resume+0xc7
acpi_enter_sleep_state() at netbsd:acpi_enter_sleep_state+0x182
sysctl_hw_acpi_sleepstate() at netbsd:sysctl_hw_acpi_sleepstate+0xfe
sysctl_dispatch() at netbsd:sysctl_dispatch+0xc1
sys___sysctl() at netbsd:sys___sysctl+0xd8
syscall() at netbsd:syscall+0x1d8
--- syscall (number 202) ---
7368a391b75a:
cpu0: End traceback...



最近の日記
2017年10月15日
wip/rust
2017年10月14日
オイル交換
2017年10月09日
散髪
2017年10月06日
wip/emacs-w3m-cvs
2017年09月30日
紫蘇の実の収穫
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)