-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when accessing an Android device right after clicking "accept" on the Android device #3474
Comments
Similar issue here, but slightly different symptoms. When I first plug in my phone (a Samsung Galaxy A15, though I've seen this happen on many other phones), a nemo window auto-opens with the path If I press Allow or Deny, nemo segfaults, and I also get a dialog popping up that says, "Unable to open a folder for SAMSUNG Android. Object does not exist at path "/org/gtk/vfs/mount/1"." (Same error message that people are getting in #2663, but I agree that this seems to be a different bug than that one as nobody in that thread is reporting a segfault). When I re-run nemo, the phone is there, mounted and ready to access data. However, if I first eject the device in nemo, without unplugging it, and then press Allow on the phone notification, I bypass the segfaulting code. The "SAMSUNG Android" entry under Devices briefly disappears, then it reappears mounted and ready to access data, with no error messages or segfaults. Here are my dmesg logs from the nemo crash (I unplugged and re-plugged the phone twice in a row, so you'll see two crashes):[133232.439390] usb 1-4: new high-speed USB device number 16 using xhci_hcd [133232.566838] usb 1-4: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 2.23 [133232.566842] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [133232.566844] usb 1-4: Product: SAMSUNG_Android [133232.566845] usb 1-4: Manufacturer: SAMSUNG [133232.566847] usb 1-4: SerialNumber: R5CX60B36EX [133232.572014] cdc_acm 1-4:1.1: ttyACM0: USB ACM device [133233.141909] pci 0000:3b:00.0: enabling device (0000 -> 0002) [133233.142682] xhci_hcd 0000:3b:00.0: xHCI Host Controller [133233.142688] xhci_hcd 0000:3b:00.0: new USB bus registered, assigned bus number 3 [133233.143951] xhci_hcd 0000:3b:00.0: hcc params 0x200077c1 hci version 0x110 quirks 0x0000000200009810 [133233.144669] xhci_hcd 0000:3b:00.0: xHCI Host Controller [133233.144674] xhci_hcd 0000:3b:00.0: new USB bus registered, assigned bus number 4 [133233.144678] xhci_hcd 0000:3b:00.0: Host supports USB 3.1 Enhanced SuperSpeed [133233.144732] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.08 [133233.144735] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [133233.144738] usb usb3: Product: xHCI Host Controller [133233.144740] usb usb3: Manufacturer: Linux 6.8.0-48-generic xhci-hcd [133233.144742] usb usb3: SerialNumber: 0000:3b:00.0 [133233.145128] hub 3-0:1.0: USB hub found [133233.145146] hub 3-0:1.0: 2 ports detected [133233.146609] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.08 [133233.146613] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [133233.146615] usb usb4: Product: xHCI Host Controller [133233.146616] usb usb4: Manufacturer: Linux 6.8.0-48-generic xhci-hcd [133233.146618] usb usb4: SerialNumber: 0000:3b:00.0 [133233.146808] hub 4-0:1.0: USB hub found [133233.146823] hub 4-0:1.0: 2 ports detected [133234.389662] pci_bus 0000:06: Allocating resources [133234.389684] pci_bus 0000:3b: Allocating resources [133242.680988] usb 1-4: USB disconnect, device number 16 [133242.805511] nemo[1313138]: segfault at 18 ip 00005ca47caea1e8 sp 00007ffd26567f70 error 4 in nemo[5ca47ca6a000+10b000] likely on CPU 3 (core 3, socket 0) [133242.805523] Code: ac 00 00 00 41 89 c5 e8 b6 36 04 00 85 c0 75 12 45 85 ed 0f 84 41 01 00 00 45 85 f6 0f 85 38 01 00 00 4c 89 e7 e8 e8 a9 03 00 <48> 8b 78 18 49 89 c5 e8 dc 48 08 00 4c 89 ef 41 89 c6 e8 d1 a6 03 [133243.038360] usb 1-4: new high-speed USB device number 17 using xhci_hcd [133243.165360] usb 1-4: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 2.23 [133243.165396] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [133243.165398] usb 1-4: Product: SAMSUNG_Android [133243.165400] usb 1-4: Manufacturer: SAMSUNG [133243.165401] usb 1-4: SerialNumber: R5CX60B36EX [133243.170517] cdc_acm 1-4:1.1: ttyACM0: USB ACM device [133309.183745] usb 1-4: USB disconnect, device number 17 [133312.475548] usb 1-4: new high-speed USB device number 18 using xhci_hcd [133312.604043] usb 1-4: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 2.23 [133312.604050] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [133312.604053] usb 1-4: Product: SAMSUNG_Android [133312.604055] usb 1-4: Manufacturer: SAMSUNG [133312.604057] usb 1-4: SerialNumber: R5CX60B36EX [133312.608129] cdc_acm 1-4:1.1: ttyACM0: USB ACM device [133314.403046] usb 1-4: USB disconnect, device number 18 [133314.520178] nemo[3519750]: segfault at 18 ip 000057493213d1e8 sp 00007fff86ac1e80 error 4 in nemo[5749320bd000+10b000] likely on CPU 5 (core 5, socket 0) [133314.520199] Code: ac 00 00 00 41 89 c5 e8 b6 36 04 00 85 c0 75 12 45 85 ed 0f 84 41 01 00 00 45 85 f6 0f 85 38 01 00 00 4c 89 e7 e8 e8 a9 03 00 <48> 8b 78 18 49 89 c5 e8 dc 48 08 00 4c 89 ef 41 89 c6 e8 d1 a6 03 [133314.742521] usb 1-4: new high-speed USB device number 19 using xhci_hcd [133314.870752] usb 1-4: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 2.23 [133314.870758] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [133314.870759] usb 1-4: Product: SAMSUNG_Android [133314.870761] usb 1-4: Manufacturer: SAMSUNG [133314.870762] usb 1-4: SerialNumber: R5CX60B36EX [133314.877826] cdc_acm 1-4:1.1: ttyACM0: USB ACM device Notice these lines in particular:
That was not me unplugging and plugging in my phone; that was me clicking on Allow on the phone's popup dialog. Something in the software/firmware stack caused the kernel to see the phone as being unplugged and then plugged back in with new permissions, and that registered as device 16 disconnecting and device 17 (the same phone) connecting 350ms later. Later on, you'll see device 17 disconnect (this is when I did actually unplug my phone from the USB cable) and device 18 connect three seconds later (that was me plugging it back in). That caused my phone to display another "Deny/Allow" popup. When I tapped "Allow", the following happened:
Same behavior (device 18 disconnects, device 19 immediately connects), and same segfault. Different IP and SP registers, but same code, with the same This is, I think, the root of the problem. When I click "Allow" on the device, the kernel registers a disconnect and immediate reconnect — and if nemo believes the phone to be mounted, then it segfaults. Remember that if I eject (unmount) the phone first without unplugging it, and then tap Allow, the "SAMSUNG Android" device disappears and reappears (very fast, I barely see it flicker off and then it's back) and it automounts correctly. So the problem involves the phone "disappearing" while nemo had it mounted; if nemo did not have it mounted, then the problem doesn't manifest itself. |
Distribution
Debian unstable
Package version
6.2.8-1
Frequency
Always
Bug description
Hey.
(I think none of the other segfault issues already reported are the same one than this.)
This is a long standing bug (since years):
Steps to reproduce
usbguard
asks me the first time whether I want to allow the device to be accessed (which I accept).nemo
.nemo
segfaults like so in the kernel log:usbguard
above is removed from the kernel and a new one appears, for whichusbguard
asks me again, whether I want to accept it (to the kernel) or not. I accept it.nemo
, I can click the Android device in that, and from then on it works (for that device and until I disconnect it).Expected behavior
Don't crash the first time ;-)
Additional information
With debug symbols installed, I'd get the following backtrace right after the
SIGSEV
:(That's not from the same run, as for which the kernel log message was generated, that I've cited above.)
In terms of kernel log, it looks like that:
Connecting the device:
next I accept it in
usbguard
:Oct 30 16:46:21 heisenberg kernel: cdc_acm 4-1:1.1: ttyACM0: USB ACM device
Oct 30 16:46:21 heisenberg kernel: usb 4-1: authorized to connect
Oct 30 16:46:30 heisenberg kernel: usb 4-1: USB disconnect, device number 28
Oct 30 16:46:30 heisenberg kernel: nemo[730999]: segfault at 18 ip 00005617ca4dadd4 sp 00007ffee1fa7508 error 4 in nemo[e7dd4,5617ca424000+106000] likely on CPU 15 (core 23, socket 0)
Oct 30 16:46:30 heisenberg kernel: Code: f6 e8 40 b6 f4 ff 48 89 df 5b e9 cf 12 f5 ff 0f 1f 80 00 00 00 00 c3 0f 1f 80 00 00 00 00 5b c3 66 0f 1f 44 00 00 f3 0f 1e fa <48> 8b 47 18 48 8b 10 48 8b 52 18 48 8b 3a 48 85 ff 74 09 48 8b 70
Oct 30 16:46:31 heisenberg kernel: usb 4-1: new SuperSpeed USB device number 29 using xhci_hcd
Oct 30 16:46:31 heisenberg kernel: usb 4-1: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= c.00
Oct 30 16:46:31 heisenberg kernel: usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 30 16:46:31 heisenberg kernel: usb 4-1: Product: SAMSUNG_Android
Oct 30 16:46:31 heisenberg kernel: usb 4-1: Manufacturer: SAMSUNG
Oct 30 16:46:31 heisenberg kernel: usb 4-1: SerialNumber: R3CN4013TZY
Oct 30 16:46:31 heisenberg kernel: usb 4-1: Device is not authorized for usage
Oct 30 16:46:35 heisenberg kernel: cdc_acm 4-1:1.1: ttyACM0: USB ACM device
Oct 30 16:46:35 heisenberg kernel: usb 4-1: authorized to connect
Oct 30 16:46:39 heisenberg kernel: usb 4-1: USB disconnect, device number 29
The text was updated successfully, but these errors were encountered: