lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

Mac M1: Kernel Panic #586

Open awadell1 opened 3 years ago

awadell1 commented 3 years ago

I'm getting a kernel panic when running lpass sync from a Mac M1 chip

Steps to reproduce:

lpass login
lpass sync

Version Info: LastPass CLI v1.3.3.GIT I also have LassPassSafari Installed: Version 4.60.0 (1121)

Crash Report

Process:               LastPassSafari [4165]
Path:                  /Applications/LastPass.app/Contents/PlugIns/LastPassSafari.appex/Contents/MacOS/LastPassSafari
Identifier:            com.lastpass.lastpassmacdesktop.safariext
Version:               4.60.0 (1121)
Code Type:             X86-64 (Translated)
Parent Process:        ??? [1]
Responsible:           LastPassSafari [4165]
User ID:               501

Date/Time:             2020-12-14 18:36:06.415 -0800
OS Version:            macOS 11.0.1 (20B29)
Report Version:        12
Anonymous UUID:        Redacted

Sleep/Wake UUID:       Redacted

Time Awake Since Boot: 7600 seconds
Time Since Wake:       620 seconds

System Integrity Protection: enabled

Crashed Thread:        4  Dispatch queue: com.apple.CFMessagePort

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [4165]
...
rtoma commented 3 years ago

I have been observing similar issues on a MBP M1. Last crash occurred when I did an innocent lpass show <ID> --notes. Version info: LastPass CLI v1.3.3.GIT.

I have been using this M1 for a month now and lpass is the only tool that causes panics (few seconds of total freeze (screen stays unchanged, no mouse, no keyboard caps light), followed by a cold start).

@awadell1 Thanks for starting this issue. May I suggest you add M1 to the issue title and make it less about the sync?

panic report:

panic(cpu 4 caller 0xfffffe0019bc67dc): Kernel data abort. at pc 0xfffffe0019bdd7a4, lr 0xfffffe0019bdd788 (saved state: 0xfffffdf009ddcd40)
          x0: 0xfffffdf177e3e000  x1:  0x00007fa981011000  x2:  0x0000000000000000  x3:  0x0000000000000001
          x4: 0x0000000000000000  x5:  0xfffffe3094a1ba5c  x6:  0xfffffe3094a1ba50  x7:  0xfffffe3094a1ba48
          x8: 0x0000000000000000  x9:  0x00000000ffffffff  x10: 0x0000000000000018  x11: 0xfffffe001c360168
          x12: 0xfffffe001d108800 x13: 0x0000000000000001  x14: 0x2020a506f020f0e0  x15: 0x0000000000000007
          x16: 0xfffffdf116718000 x17: 0xfffffdf116718000  x18: 0x0000000000000000  x19: 0xffffffffffffffff
          x20: 0xfffffdf009d7c240 x21: 0x0000000000000000  x22: 0x0000000000000000  x23: 0x00007fa981011000
          x24: 0xfffffe001931fc80 x25: 0xfffffdf009d7c270  x26: 0x0000000000001000  x27: 0xfffffe0022ca9620
          x28: 0xfffffe001c2d63c0 fp:  0xfffffe001ee6ffe0  lr:  0xfffffe0019bdd788  sp:  0xfffffe001ee6ff70
          pc:  0xfffffe0019bdd7a4 cpsr: 0x00401208         esr: 0x96000005          far: 0x0000000000000000

Debugger message: panic
Memory ID: 0xff
OS release type: User
OS version: 20B29
Kernel version: Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:10 PDT 2020; root:xnu-7195.50.7~2/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 35A645C8D62619060673BEF751E6A7AA
Kernel UUID: D8523129-E878-38BA-A8E0-1D0E8D2470B7
iBoot version: iBoot-6723.50.2
secure boot?: YES
Paniclog version: 13
KernelCache slide: 0x00000000116a8000
KernelCache base:  0xfffffe00186ac000
Kernel slide:      0x0000000012314000
Kernel text base:  0xfffffe0019318000
Kernel text exec base:  0xfffffe00193e0000
mach_absolute_time: 0xb14a3617df
Epoch Time:        sec       usec
  Boot    : 0x5fd74885 0x0006d690
  Sleep   : 0x5fd8b68c 0x0002629b
  Wake    : 0x5fd8ba80 0x000a5c7e
  Calendar: 0x5fd8cabc 0x000b83ec

CORE 0 recently retired instr at 0xfffffe001954a4d0
CORE 1 recently retired instr at 0xfffffe001954a4d0
CORE 2 recently retired instr at 0xfffffe001954a4d0
CORE 3 recently retired instr at 0xfffffe001954a4d0
CORE 4 recently retired instr at 0xfffffe001954900c
CORE 5 recently retired instr at 0xfffffe001954a4d4
CORE 6 recently retired instr at 0xfffffe001954a4d4
CORE 7 recently retired instr at 0xfffffe001954a4d4
Panicked task 0xfffffe167054c000: 489 pages, 1 threads: pid 36998: lpass <---------
Panicked thread: 0xfffffe1674901960, backtrace: 0xfffffe3094a1b160, tid: 439127
                  lr: 0xfffffe001942df7c  fp: 0xfffffe3094a1b1d0
                  lr: 0xfffffe001942dd48  fp: 0xfffffe3094a1b240
                  lr: 0xfffffe001954f7d0  fp: 0xfffffe3094a1b260
...
rtoma commented 3 years ago

My only crashes with Mac M1 are caused by the lastpass cli. Today it crashed again. 1st crash with MacOS 11.1, so the cause wasn't fixed in the 2nd big sur release.

Posting this here not really expecting much, except informing other users that it is not them.

panic(cpu 4 caller 0xfffffe002cc84de8): Kernel data abort. at pc 0xfffffe002cc9d7cc, lr 0xfffffe002cc9d7b0 (saved state: 0xfffffdf040fe8d40)
      x0: 0xfffffdf0e1a52000  x1:  0x00007fe5c080b000  x2:  0x0000000000000000  x3:  0x0000000000000001
      x4: 0x0000000000000000  x5:  0xfffffe3f531fba5c  x6:  0xfffffe3f531fba50  x7:  0xfffffe3f531fba48
      x8: 0x0000000000000000  x9:  0x00000000ffffffff  x10: 0x0000000000000018  x11: 0xfffffe002f448168
      x12: 0xfffffe0030218800 x13: 0x0000000000000001  x14: 0x2020a506f020f0e0  x15: 0x0000000000000007
      x16: 0xfffffdf1785f4000 x17: 0xfffffdf1785f4000  x18: 0x0000000000000000  x19: 0xffffffffffffffff
      x20: 0xfffffdf040f70828 x21: 0x0000000000000000  x22: 0x0000000000000000  x23: 0x00007fe5c080b000
      x24: 0xfffffe002c3db860 x25: 0xfffffdf040f70858  x26: 0x0000000000001000  x27: 0xfffffe00341df0a0
      x28: 0xfffffe002f3be3e0 fp:  0xfffffe0031fb7fe0  lr:  0xfffffe002cc9d7b0  sp:  0xfffffe0031fb7f70
      pc:  0xfffffe002cc9d7cc cpsr: 0x00401208         esr: 0x96000005          far: 0x0000000000000000

Debugger message: panic
Memory ID: 0xff
OS release type: User
OS version: 20C69
Kernel version: Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 3E6AA74DF723BCB886499A5AAB34FA34
Kernel UUID: 48F71DB3-6C91-3E62-9576-3A1DCEF2B536
iBoot version: iBoot-6723.61.3
secure boot?: YES
Paniclog version: 13
KernelCache slide: 0x0000000024890000
KernelCache base:  0xfffffe002b894000
Kernel slide:      0x00000000253d0000
Kernel text base:  0xfffffe002c3d4000
Kernel text exec base:  0xfffffe002c49c000
mach_absolute_time: 0x1e48eeb168
Epoch Time:        sec       usec
  Boot    : 0x5fde2dfc 0x00050bef
  Sleep   : 0x5fdf4cfa 0x0003bfe3
  Wake    : 0x5fdf4d77 0x00050734
  Calendar: 0x5fdf5499 0x00059ec8

CORE 0 recently retired instr at 0xfffffe002c606c5c
CORE 1 recently retired instr at 0xfffffe002c606c5c
CORE 2 recently retired instr at 0xfffffe002c606c5c
CORE 3 recently retired instr at 0xfffffe002c606c5c
CORE 4 recently retired instr at 0xfffffe002c605798
CORE 5 recently retired instr at 0xfffffe002c606c60
CORE 6 recently retired instr at 0xfffffe002c606c60
CORE 7 recently retired instr at 0xfffffe002c606c60
Panicked task 0xfffffe1681f20c70: 212 pages, 1 threads: pid 7579: lpass
Panicked thread: 0xfffffe16734dd308, backtrace: 0xfffffe3f531fb160, tid: 94794
          lr: 0xfffffe002c4e9f8c  fp: 0xfffffe3f531fb1d0
          lr: 0xfffffe002c4e9d58  fp: 0xfffffe3f531fb240
          lr: 0xfffffe002c60bf5c  fp: 0xfffffe3f531fb260
          lr: 0xfffffe002c5fd914  fp: 0xfffffe3f531fb310
          lr: 0xfffffe002c4a37e8  fp: 0xfffffe3f531fb320
          lr: 0xfffffe002c4e99e8  fp: 0xfffffe3f531fb6b0
          lr: 0xfffffe002c4e99e8  fp: 0xfffffe3f531fb720
          lr: 0xfffffe002cc843f8  fp: 0xfffffe3f531fb740
          lr: 0xfffffe002cc84de8  fp: 0xfffffe3f531fb8b0
          lr: 0xfffffe002c5ff7c4  fp: 0xfffffe3f531fb920
          lr: 0xfffffe002c5fd840  fp: 0xfffffe3f531fb9d0
          lr: 0xfffffe002c4a37e8  fp: 0xfffffe3f531fb9e0
          lr: 0xfffffe002cc9d7b0  fp: 0xfffffe0031fb7fe0
          lr: 0xfffffe002c4a3ff4  fp: 0xfffffe3f531fba00
          lr: 0xfffffe002c579528  fp: 0xfffffe3f531fbae0
          lr: 0xfffffe002c583fd8  fp: 0xfffffe3f531fbc90
          lr: 0xfffffe002c58797c  fp: 0xfffffe3f531fbcd0
          lr: 0xfffffe002c51abbc  fp: 0xfffffe3f531fbd10
          lr: 0xfffffe002c9d2cac  fp: 0xfffffe3f531fbda0
          lr: 0xfffffe002c9d2a90  fp: 0xfffffe3f531fbdb0
          lr: 0xfffffe002cae65a8  fp: 0xfffffe3f531fbe40
          lr: 0xfffffe002c5fd5f8  fp: 0xfffffe3f531fbef0
          lr: 0xfffffe002c4a37e8  fp: 0xfffffe3f531fbf00
razmashat commented 3 years ago

Hey! I might be able to help/understand why that happens... Is that still happens to you?

rtoma commented 3 years ago

It has ~1.5 week since last crash. Pretty sure it will happen again. Do you have a theory?

razmashat commented 3 years ago

yes. i think its a problem in the system maybe... can you tell me if you can reproduce the crash?

rtoma commented 3 years ago

No, can't trigger it. Crashes happen when doing lpass show, but rarely. Have tried doing it in a loop, but no luck.

May be unrelated, but I have tried compiling lpass for arm64. That binary has memory errors (malloc: pointer being freed was not allocated). I wonder if Rosetta simply can't coop with these issues resulting in panics. Just a hunch.

Cyberbeni commented 3 years ago

1.3.3 crashing on macOS is a known issue, try compiling the latest commit ( 8767b5e53192ad4e72d1352db4aa9218e928cbe1 ) Haven't yet tried on M1 yet. Guide for compiling for anyone who needs it: https://github.com/lastpass/lastpass-cli/issues/513#issuecomment-749505122