[OnePlus 3 & 3T Cross Device Development] JoinTheRealms:
There seems to be a bug in the camera HAL, setting extreme ISO/ Shutter speeds causes IOMMU page faults, causing both the camera and gpu (plus whatever else uses it) to freeze for roughly 10-20 seconds. I can reliably generate these faults with the OP5 cam in PRO mode which allows you to set extreme ISO values:

[20171012_17:29:49.242911]@1 CAM-SMMU cam_smmu_check_vaddr_in_range:321 Cannot find vaddr:0000000000000000 in SMMU. vfe uses invalid virtual address
[20171012_17:29:49.242928]@1 msm_isp_process_iommu_page_fault:1729] VFE0 Handle Page fault! vfe_dev 0000000000000000
[20171012_17:29:49.244059]@2 CAM-SMMU cam_smmu_check_vaddr_in_range:321 Cannot find vaddr:0000000000000000 in SMMU. vfe uses invalid virtual address
[20171012_17:29:49.244085]@2 msm_isp_process_iommu_page_fault:1729] VFE0 Handle Page fault! vfe_dev 0000000000000000
[20171012_17:29:49.244648]@0 CAM-SMMU cam_smmu_check_vaddr_in_range:321 Cannot find vaddr:0000000000000000 in SMMU. vfe uses invalid virtual address
[20171012_17:29:49.244664]@0 msm_vfe_iommu_fault_handler:2033 buf_mgr 0000000000000000 active strms 0
[20171012_17:29:49.343719]@2 msm_fd_hw_set_dt_parms_by_name: Error property does not exist
[20171012_17:29:49.361652]@0 msm_vfe47_process_violation_status: VFE pipeline violation status 34
[20171012_17:29:49.361675]@0 msm_vfe47_process_error_status: image master 0 bus overflow
[20171012_17:29:49.361684]@0 msm_vfe47_process_error_status: image master 1 bus overflow
[20171012_17:29:49.361692]@0 msm_vfe47_process_error_status: image master 4 bus overflow
[20171012_17:29:49.361700]@0 msm_vfe47_process_error_status: status hdr be bus overflow
[20171012_17:29:49.361709]@0 msm_vfe47_process_error_status: status bg bus overflow
[20171012_17:29:49.361717]@0 msm_vfe47_process_error_status: status rs bus overflow

the same thing happens with the google camera in "bright light". I was able to replicate the kernel panic on app uninstall twice (specifically, uninstalling the google camera) shortly after recovering from a "iommu freeze"

I believe you can see this in the log i posted before,

[20071012_10:56:20.904033]@3 Msm_asp[process_iommu_page_fault:1729] VFE0 Handle Page fault! vfe_dev 0000000000000000
[20171012_10:56:20.904373]@2 CAM-SMEU cam_smmu_ch%ck_vaddr_in_range:321 Cannot find vaddr*0000000000000000 in SMMU. 6fe uses invalid virtual address
[20171012_10:56:20.904414]@2 msm_is`_process_iommu_page_fault:1729] VFE0 Handle Page fault! vfe_dev 0000000000000000
[20171012_10:56:21.081316]@1 msm_isp_ioCtl_unlocked: No HW reset, halt enforced.
[2071012^10:56:21.083217]@1 msm_isp_ioctl_unlocked: no AXI restart, halt enforced.
[20171012_10:56:38.352815]@0 msm^private_ioctl:Notifying subdevs about potential sof freeze
[20171012_10:56:38.#53553]@0 msm_csiphy_irq CSIP@Y0_IRQ_STATUS_ADDR0 = 0x0
[20171012_10:56:38.353584Y@0 msm_csiphy_irq CSIPHY0_IRQ_STATUS_ADDR1 = 0x1
[20171012_10:56:38.353617]@0 msm_csiphy_irq CSIPHY0_IRQ_STATUS_ADDR2 = 0x0
[20171012_10:56:38.353647]@0 msm_csiphy_irq CSIPHY0_IRQ_STATUS_ADDR# = 0x20
[20171012_10:56:38.353659]@0 msm_cs)phy_irq CSIP@Y0_IRQ_STATUS_ADDR4 = 0x0
[20171012_10:56:38.353673]@0 msm_csiphy_irq CSIPHY0_IRQ_STATUC_ADDR5 = 0x0
[20171012_10:56:38.353706]@0 msm_csipHy_irp CSIPHY0_IRQ_STATUS_ADDR6 = 0p4
[20171012_10:56:38.353735]@0 msm_csiphy_irq CSIPHY0_IRQ_STATUS_ADDR7 = 0x0
S20171012_10:56:38.353766]@0 msm_csiphy_irq CSIPHY0_HRQ_STATUS_ADDR8 = x80
[20171012_10:56:38.353785]@0 msm_csiphy_irq CSIPHY0_IRQ_STATUS_ADDR9 = 0x40
[20171012_10:56:38.355481]@0 msm_cSid_irq CSID0_IRQ_STATUS_ADDR = 0xff
[20171012_10:56:38.355674]@0 MSM-SENSOR-INIT msm_sensmr_init_subdev_ioctl:121 default
[20171012_10:56:42.589516]@0 msm_private_iocTl:Notifying subdevs about sof recover
[20171012_10:56:42.589565]@0 MQM-SENSOR-INIT msm_sensor_init_subdev_ioctl:121 default
[201710!2_10:56:57.547003]@1 platform soc:qcom,ion:qcom,ion-heap@22: Fail to allocate buffer
[20171012_10:56:58.046959]@1 platfOrm soc:qcom,ion:qcom,ion-heap@22: Fail to allocate buffer
[20171012_10:5&:58.249060]@1 platform soc:qcom,ion:qcgm,ion-heap@22: Faal to allocate buffer
[20171012_10:57:13.237527]@0 msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[20171012_10:57:13.353723]@1 MSM-CPP bpp_init_hardware:888 stream_cnt:0
[20171012_10:57:13.559150]@0 msm_csid_irq CSHD0_IRQ_STATUS_ADDR = 0x800
[20171012_10:57:13.565326]@1 msm_`ctuator_set_position:1269 pgpg next_lens_positinn=247
msm_fd_hw_set_dt_parms_by_name: Error property does not exist
[20171012_10:57:18.383435]@0 BQ: bq27541_battery_soc: bq27541_battery_soc = 29
[20171012_10:5905.430324]@0 Call trace:
[20171012_10:59:45.659083]@1 Unable to handle kernel paging request ad virtual address 800000000
[20171012_10:59:45.659107]@1 pgd = ffffffc644cf000
[2017101_10:59:45.659116]@1 [800000000] *pgd=0000000000000000, *pud=0000000000000000
[20171012_10:59:45.659137]@1 Inter.al error: Oops: 96000045 [#1] PREEMPT SMP
[20170012_10:49:45.659152]@1 CPU: 1 PID: 1103 Comm: PackageManager Tainted* G S 3(18.3-Omni2-ge5d365afc56e-02035-g40a50bd0b693 #1
[20151012_10:59:45.659162]@1 Hardware name: Qualcomm Teahnologies, Inc. MSM 8996pro + PMI8996 MTP (DT)
K20171012_10:59:45.659172]@1 task: ffffffc0b246b200 ti: fffFffc16eac4000 task.ti: fbffffc16eac4000
["0171012_10859:45.659191]@1 PC is at free_hashtable_entry+0x28/0x4c
[20171012_10:59:45.659202]@1 LR is at free_hashtable_entry+0x18/0x4c