google / ios-webkit-debug-proxy

A DevTools proxy (Chrome Remote Debugging Protocol) for iOS devices (Safari Remote Web Inspector).
BSD 3-Clause "New" or "Revised" License
5.91k stars 461 forks source link

segmentation fault starting up #40

Closed mping closed 3 months ago

mping commented 10 years ago

I'm hitting a segfault on the following line: https://github.com/google/ios-webkit-debug-proxy/blob/master/src/webinspector.c#L149.

Core file's here: https://dl.dropboxusercontent.com/u/947497/core

mping commented 10 years ago

here's gdb attach info:

Program received signal SIGSEGV, Segmentation fault.
0x000000000040de6a in wi_connect (device_id=0x12c5b20 "03a67c767ec79e37e00762a8c4bf31b421f62383", to_device_id=0x0, 
    to_device_name=0x7fff127b3c78, recv_timeout=-1) at webinspector.c:149
149           !service->port) {
Luke-SF commented 10 years ago

Was this with that latest iOS update that broke this debugger?

mping commented 10 years ago

I only tried it with the lates iOS version.

karfau commented 3 years ago

I have "the same kind of" issue:

(just installed from master today) I hope the attached information helps in any way, and I can provide more if needed.

$ ios_webkit_debug_proxy -V
ios_webkit_debug_proxy 1.8.8
Built with libimobiledevice v1.3.0, libplist v2.2.0
$ ios_webkit_debug_proxy --debug
ss.add_server_fd(3)
Listing devices on :9221
ss.add_fd(4)
ss.add_server_fd(5)
ss.remove_server_fd(5)
ss.recv fd=4 len=974
ss.add_server_fd(5)
ss.add_fd(7)
wi.send_packet[198]:
 00 00 00 C2 62 70 6C 69 73 74 30 30 D2 01 03 02 04 5A 5F  ....bplist00.....Z_
 5F 73 65 6C 65 63 74 6F 72 5F 10 16 5F 72 70 63 5F 72 65  _selector_.._rpc_re
 70 6F 72 74 49 64 65 6E 74 69 66 69 65 72 3A 5A 5F 5F 61  portIdentifier:Z__a
 72 67 75 6D 65 6E 74 D1 05 06 5F 10 1A 57 49 52 43 6F 6E  rgument..._..WIRCon
 6E 65 63 74 69 6F 6E 49 64 65 6E 74 69 66 69 65 72 4B 65  nectionIdentifierKe
 79 5F 10 3C 33 37 32 31 38 66 63 36 33 37 62 65 64 64 35  y_.<37218fc637bedd5
 61 2D 31 65 65 64 61 38 32 32 2D 34 33 65 37 2D 61 65 36  a-1eeda822-43e7-ae6
 61 2D 35 36 38 36 38 33 35 33 34 65 30 39 34 61 35 34 34  a-568683534e094a544
 65 62 30 37 66 65 65 08 0D 18 31 3C 3F 5C 00 00 00 00 00  eb07fee...1<?\.....
 00 01 01 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 00  ...................
 00 00 00 00 00 00 00 9B                                   ........
Segmentation fault (core dumped)
$ ideviceinfo
...
BasebandStatus: BBInfoAvailable
BasebandVersion: 7.70.01
BluetoothAddress: 78:7b:8a:58:ce:6e
BoardId: 6
BrickState: false
BuildVersion: 17H35
CPUArchitecture: arm64
CarrierBundleInfoArray[0]: 
...
FirmwareVersion: iBoot-5540.140.12
FusingStatus: 3
HardwareModel: J208AP
HardwarePlatform: t8011
HasSiDP: true
HostAttached: true
...
ProductName: iPhone OS
ProductType: iPad7,4
ProductVersion: 13.7
ProductionSOC: true
ProtocolVersion: 2
...
$ systemctl status usbmuxd
● usbmuxd.service - Socket daemon for the usbmux protocol used by Apple devices
     Loaded: loaded (/usr/lib/systemd/system/usbmuxd.service; static)
     Active: active (running) since Wed 2020-09-09 12:25:48 CEST; 2h 18min ago
       Docs: man:usbmuxd(8)
   Main PID: 25025 (usbmuxd)
      Tasks: 2 (limit: 19051)
     Memory: 3.1M
     CGroup: /system.slice/usbmuxd.service
             └─25025 /usr/bin/usbmuxd --user usbmux --systemd

Sep 09 12:25:48 karfau-tux19 usbmuxd[25025]: [12:25:48.886][3] usbmuxd v1.1.1 starting up
Sep 09 12:25:48 karfau-tux19 usbmuxd[25025]: [12:25:48.889][3] Successfully dropped privileges to 'usbmux'
Sep 09 12:25:48 karfau-tux19 usbmuxd[25025]: [12:25:48.889][3] Using libusb 1.0.23
Sep 09 12:25:48 karfau-tux19 usbmuxd[25025]: [12:25:48.896][3] Initialization complete
Sep 09 12:25:48 karfau-tux19 usbmuxd[25025]: [12:25:48.896][3] Enabled exit on SIGUSR1 if no devices are attached. Start a new instance with "--exit" t>
Sep 09 13:11:15 karfau-tux19 usbmuxd[25025]: libusb: error [op_get_configuration] device unconfigured
Sep 09 13:11:15 karfau-tux19 usbmuxd[25025]: [13:11:15.741][3] Could not get old configuration descriptor for device 1-4: LIBUSB_ERROR_NOT_FOUND
Sep 09 13:11:15 karfau-tux19 usbmuxd[25025]: [13:11:15.751][3] Connecting to new device on location 0x10004 as ID 1
Sep 09 13:11:15 karfau-tux19 usbmuxd[25025]: libusb: error [udev_hotplug_event] ignoring udev action bind
Sep 09 13:11:15 karfau-tux19 usbmuxd[25025]: [13:11:15.952][3] Connected to v2.0 device 1 on location 0x10004 with serial number 4c5b