Skip to content
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

camera realignment on startup #34541

Closed
adeebshihadeh opened this issue Feb 7, 2025 · 3 comments
Closed

camera realignment on startup #34541

adeebshihadeh opened this issue Feb 7, 2025 · 3 comments
Labels
Milestone

Comments

@adeebshihadeh
Copy link
Contributor

1.035573] system/camerad/cameras/spectra.cc:769 - camera_map_bufs: map buf req: (fd: 94) 0x5e0048 0
[1.035744] system/camerad/cameras/spectra.cc:769 - camera_map_bufs: map buf req: (fd: 95) 0x5f0049 0
[1.035790] system/camerad/cameras/spectra.cc:769 - camera_map_bufs: map buf req: (fd: 96) 0x60004a 0
[1.035848] system/camerad/cameras/spectra.cc:769 - camera_map_bufs: map buf req: (fd: 97) 0x61004b 0
[1.036138] system/camerad/cameras/camera_qcom2.cc:304 - camerad_thread: -- Starting devices
[1.036201] system/camerad/cameras/spectra.cc:310 - sensors_start: starting sensor 0
[1.037670] system/camerad/cameras/spectra.cc:310 - sensors_start: starting sensor 2
[1.037826] system/camerad/cameras/spectra.cc:310 - sensors_start: starting sensor 1
[1.038247] system/camerad/cameras/camera_qcom2.cc:308 - camerad_thread: -- Dequeueing Video events
[1.108024] system/loggerd/encoderd.cc:63 - encoder_thread: encoder road_cam_encoder init 1928x1208
[1.108633] system/loggerd/encoderd.cc:63 - encoder_thread: encoder driver_cam_encoder init 1928x1208
[1.108870] system/loggerd/encoderd.cc:63 - encoder_thread: encoder wide_road_cam_encoder init 1928x1208
[1.202763] system/loggerd/encoderd.cc:34 - sync_encoders: camera 1 encoder ready
[1.203567] system/loggerd/encoderd.cc:34 - sync_encoders: camera 2 encoder ready
[1.208041] system/loggerd/encoderd.cc:34 - sync_encoders: camera 0 encoder ready
[1.212616] selfdrive/ui/qt/widgets/cameraview.cc:214 - virtual void CameraWidget::paintGL(): Drawing same frame twice 0
[1.278533] system/loggerd/encoderd.cc:41 - sync_encoders: camera 1 waiting for frame 2, cur 1
[1.285115] system/loggerd/encoderd.cc:41 - sync_encoders: camera 2 waiting for frame 2, cur 1
[1.285335] system/loggerd/encoderd.cc:41 - sync_encoders: camera 0 waiting for frame 2, cur 1
[1.352870] system/loggerd/video_writer.cc:17 - VideoWriter: encoder_open /data/media/0/realdata/000004ec--5a6970556c--0/dcamera.hevc remuxing:0
[1.357017] system/loggerd/video_writer.cc:17 - VideoWriter: encoder_open /data/media/0/realdata/000004ec--5a6970556c--0/qcamera.ts remuxing:1
[1.383646] system/loggerd/video_writer.cc:17 - VideoWriter: encoder_open /data/media/0/realdata/000004ec--5a6970556c--0/fcamera.hevc remuxing:0
[1.386805] system/loggerd/video_writer.cc:17 - VideoWriter: encoder_open /data/media/0/realdata/000004ec--5a6970556c--0/ecamera.hevc remuxing:0
[1.901969] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -22
[1.902077] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -22
[1.903056] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -22 13
[1.903115] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -22 13
[1.903307] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -22
[1.903357] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -22
[1.903559] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -22 32
[1.903602] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -22 32
[2.102151] system/camerad/cameras/spectra.cc:1103 - handle_camera_event: camera 0 realign
[2.103116] system/camerad/cameras/spectra.cc:1103 - handle_camera_event: camera 0 realign
[2.106423] system/camerad/cameras/spectra.cc:1113 - handle_camera_event: camera 0 dropped requests 31 13
[2.106552] system/camerad/cameras/spectra.cc:1113 - handle_camera_event: camera 0 dropped requests 31 13
[2.199127] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -110
[2.199209] system/camerad/cameras/spectra.cc:60 - do_sync_control: CAM_SYNC error: id 6 - errno 11 - ret 0 - ioctl_result -110
[2.199431] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -110 1
[2.199462] system/camerad/cameras/spectra.cc:688 - enqueue_buffer: failed to wait for sync: -110 1
[2.199611] system/camerad/cameras/spectra.cc:1103 - handle_camera_event: camera 2 realign
[2.199640] system/camerad/cameras/spectra.cc:1103 - handle_camera_event: camera 2 realign
[2.199838] system/camerad/cameras/spectra.cc:1113 - handle_camera_event: camera 2 dropped requests 32 14
[2.199885] system/camerad/cameras/spectra.cc:1113 - handle_camera_event: camera 2 dropped requests 32 14
[2.201869] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 105 Dumping state information for preceding requests
[2.201990] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3420] req_id[20] state[EPOCH] evt_type[DONE]
[2.202047] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3420] req_id[20] state[APPLIED] evt_type[SOF]
[2.202102] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc345c] req_id[25] state[APPLIED] evt_type[SOF]
[2.202178] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3466] req_id[20] state[APPLIED] evt_type[SOF]
[2.202243] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3466] req_id[20] state[APPLIED] evt_type[DONE]
[2.202529] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3498] req_id[26] state[APPLIED] evt_type[SOF]
[2.202601] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc3498] req_id[20] state[APPLIED] evt_type[SOF]
[2.202656] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc34ac] req_id[20] state[APPLIED] evt_type[DONE]
[2.202741] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc34c0] req_id[27] state[APPLIED] evt_type[SOF]
[2.202796] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 122 time[0xfffc34ca] req_id[20] state[EPOCH] evt_type[DONE]
[2.202846] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 105 Dumping state information for preceding requests
[2.202908] MAIN 0 kernel - CAM_ERR: CAM-ISP: __cam_isp_ctx_dump_state_monitor_array: 105 Dumping state information for preceding requests
@adeebshihadeh adeebshihadeh added this to the 0.9.8 milestone Feb 7, 2025
@adeebshihadeh
Copy link
Contributor Author

adeebshihadeh commented Feb 8, 2025

Restarting dmonitoringmodeld repros this, but enabling the BPS should fix this since camerad will be entirely off the GPU.

while true; do ./dmonitoringmodeld & sleep 4; pkill -f dmonit; sleep 2; done

@adeebshihadeh
Copy link
Contributor Author

Bette repro:

#!/usr/bin/env python3
import time
from openpilot.system.manager.process_config import managed_processes

cnt = 0
while True:
  if (cnt % 5) == 0:
    managed_processes['modeld'].stop(block=True)
    managed_processes['modeld'].start()
  if (cnt % 6) == 0:
    managed_processes['dmonitoringmodeld'].stop(block=True)
    managed_processes['dmonitoringmodeld'].start()
  cnt += 1
  time.sleep(1)

@adeebshihadeh
Copy link
Contributor Author

Fixed by #34558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant