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

Fatal usage in IPA module #59

Closed
kbingham opened this issue Jun 5, 2023 · 2 comments
Closed

Fatal usage in IPA module #59

kbingham opened this issue Jun 5, 2023 · 2 comments

Comments

@kbingham
Copy link
Collaborator

kbingham commented Jun 5, 2023

There's a user report of setting controls causing the whole process to crash:

ayufan/camera-streamer#67:

Getting this error and service restart when try to set various options (not all, but too few)

Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: device/v4l2/device_options.c: RESCALLER:STREAM: The 'AeExposureMode=2' was failed to find.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: device/v4l2/device_options.c: RESCALLER:VIDEO: The 'AeExposureMode=2' was failed to find.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: device/v4l2/device_options.c: SNAPSHOT: The 'AeExposureMode=2' was failed to find.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: device/v4l2/device_options.c: STREAM: The 'AeExposureMode=2' was failed to find.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: device/v4l2/device_options.c: VIDEO: The 'AeExposureMode=2' was failed to find.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: util/http/http.c: HTTP8080/6: Client disconnected 192.168.2.6.
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: [518:41:50.377648261] [44019] FATAL RPiAgc agc.cpp:540 No exposure profile long
Jun 02 13:21:17 wgrpinlcam01 camera-streamer[44004]: Backtrace:
Jun 02 13:21:17 wgrpinlcam01 systemd[1]: camera-streamer-raspi-v3-12MP.service: Main process exited, code=killed, status=6/ABRT
Jun 02 13:21:17 wgrpinlcam01 systemd[1]: camera-streamer-raspi-v3-12MP.service: Failed with result 'signal'.
Jun 02 13:21:17 wgrpinlcam01 systemd[1]: camera-streamer-raspi-v3-12MP.service: Consumed 1min 32.532s CPU time.
Jun 02 13:21:27 wgrpinlcam01 systemd[1]: camera-streamer-raspi-v3-12MP.service: Scheduled restart job, restart counter is at 5.

The Fatals in void Agc::housekeepConfig() seems to be a bit painful. Is there anything we can do to reduce this error level? Or is this really a fatal error, and an issue in the users system configuration or such?

@naushir
Copy link
Collaborator

naushir commented Jun 6, 2023

This error message suggests to me that the user is using a custom camera tuning file, and that file is malformed/incomplete. I don't think demoting the error message would be the right thing here. It should be quite easy to fix the tuning file to pass the validation though.

naushir added a commit to naushir/libcamera that referenced this issue Jun 8, 2023
If a metering/exposure/constraint mode is not listed in the sensor
tuning file, and a control for the missing mode is set on the agc, we
terminate the application with a fatal log message.

Instead of this fatal termination, log a warning message and switch to
the appropriate default mode so that the application continues running.

Reported-on: raspberrypi/libcamera#59
Reported-on: ayufan/camera-streamer#67
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
kbingham pushed a commit to kbingham/libcamera that referenced this issue Jun 8, 2023
If a metering/exposure/constraint mode is not listed in the sensor
tuning file, and a control for the missing mode is set on the agc, we
terminate the application with a fatal log message.

Instead of this fatal termination, log a warning message and switch to
the appropriate default mode so that the application continues running.

Bug: raspberrypi/libcamera#59
Bug: ayufan/camera-streamer#67
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
@kbingham
Copy link
Collaborator Author

kbingham commented Jun 8, 2023

@kbingham kbingham closed this as completed Jun 8, 2023
Gabrielle-George pushed a commit to Gabrielle-George/libcamera that referenced this issue Jun 30, 2023
If a metering/exposure/constraint mode is not listed in the sensor
tuning file, and a control for the missing mode is set on the agc, we
terminate the application with a fatal log message.

Instead of this fatal termination, log a warning message and switch to
the appropriate default mode so that the application continues running.

Bug: raspberrypi/libcamera#59
Bug: ayufan/camera-streamer#67
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants