1

我的树莓派 4 设置为每小时运行一个 python 脚本,它会打开一些飞利浦色调灯并使用相机模块拍照。它完美运行了 26 天,然后停止运行。如果我重新启动它,它会再次工作几个小时,然后停止工作。

当处于损坏状态时,系统日志显示 cron 作业试图运行我的脚本,但它既不打开灯也不拍照。在这种状态下,我也不能再使用 VNC 客户端访问树莓派,但可以 SSH 进去。

运行top,内存和cpu看起来并没有特别重,但我真的不知道该寻找什么。

在 syslog 中,您可以看到我的脚本在 3:25 运行,然后就出现了内核问题。树莓派确实在 3:25 拍了照片,但在那之后失败了,直到我重新启动:

Apr  2 03:17:01 raspberrypi CRON[9893]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr  2 03:25:01 raspberrypi CRON[11726]: (pi) CMD (python3 /home/pi/cameratest/timecamera-cron.py)
Apr  2 03:27:51 raspberrypi kernel: [28383.750583] INFO: task kworker/1:2:17982 blocked for more than 120 seconds.
Apr  2 03:27:51 raspberrypi kernel: [28383.750594]       Tainted: G         C        4.19.97-v7l+ #1294
Apr  2 03:27:51 raspberrypi kernel: [28383.750602] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Apr  2 03:27:51 raspberrypi kernel: [28383.750611] kworker/1:2     D    0 17982      2 0x00000000
Apr  2 03:27:51 raspberrypi kernel: [28383.750640] Workqueue: events dbs_work_handler
Apr  2 03:27:51 raspberrypi kernel: [28383.750669] [<c09c8f5c>] (__schedule) from [<c09c95cc>] (schedule+0x50/0xa8)
Apr  2 03:27:51 raspberrypi kernel: [28383.750686] [<c09c95cc>] (schedule) from [<c09cd5b4>] (schedule_timeout+0x200/0x428)
Apr  2 03:27:51 raspberrypi kernel: [28383.750700] [<c09cd5b4>] (schedule_timeout) from [<c09ca23c>] (wait_for_common+0xd4/0x1b0)
Apr  2 03:27:51 raspberrypi kernel: [28383.750713] [<c09ca23c>] (wait_for_common) from [<c09ca338>] (wait_for_completion+0x20/0x24)
Apr  2 03:27:51 raspberrypi kernel: [28383.750728] [<c09ca338>] (wait_for_completion) from [<c0840b14>] (rpi_firmware_transaction+0x78/0xd0)
Apr  2 03:27:51 raspberrypi kernel: [28383.750745] [<c0840b14>] (rpi_firmware_transaction) from [<c0840cac>] (rpi_firmware_property_list+0x140/0x2b0)
Apr  2 03:27:51 raspberrypi kernel: [28383.750760] [<c0840cac>] (rpi_firmware_property_list) from [<c0840e98>] (rpi_firmware_property+0x7c/0xfc)
Apr  2 03:27:51 raspberrypi kernel: [28383.750776] [<c0840e98>] (rpi_firmware_property) from [<c06ae5d4>] (raspberrypi_clock_property+0x4c/0x74)
Apr  2 03:27:51 raspberrypi kernel: [28383.750792] [<c06ae5d4>] (raspberrypi_clock_property) from [<c06ae640>] (raspberrypi_fw_set_rate+0x44/0x98)
Apr  2 03:27:51 raspberrypi kernel: [28383.750805] [<c06ae640>] (raspberrypi_fw_set_rate) from [<c06ae70c>] (raspberrypi_fw_pll_div_set_rate+0x38/0x40)
Apr  2 03:27:51 raspberrypi kernel: [28383.750820] [<c06ae70c>] (raspberrypi_fw_pll_div_set_rate) from [<c06a74ec>] (clk_change_rate+0x124/0x474)
Apr  2 03:27:51 raspberrypi kernel: [28383.750835] [<c06a74ec>] (clk_change_rate) from [<c06a79d0>] (clk_core_set_rate_nolock+0x194/0x1a8)
Apr  2 03:27:51 raspberrypi kernel: [28383.750849] [<c06a79d0>] (clk_core_set_rate_nolock) from [<c06a7a20>] (clk_set_rate+0x3c/0x78)
Apr  2 03:27:51 raspberrypi kernel: [28383.750863] [<c06a7a20>] (clk_set_rate) from [<c080dd20>] (dev_pm_opp_set_rate+0x284/0x54c)
Apr  2 03:27:51 raspberrypi kernel: [28383.750878] [<c080dd20>] (dev_pm_opp_set_rate) from [<c08179e4>] (set_target+0x40/0x60)
Apr  2 03:27:51 raspberrypi kernel: [28383.750894] [<c08179e4>] (set_target) from [<c081252c>] (__cpufreq_driver_target+0x2d8/0x5a8)
Apr  2 03:27:51 raspberrypi kernel: [28383.750909] [<c081252c>] (__cpufreq_driver_target) from [<c08160a8>] (od_dbs_update+0xec/0x174)
Apr  2 03:27:51 raspberrypi kernel: [28383.750924] [<c08160a8>] (od_dbs_update) from [<c0816cc4>] (dbs_work_handler+0x3c/0x68)
Apr  2 03:27:51 raspberrypi kernel: [28383.750942] [<c0816cc4>] (dbs_work_handler) from [<c023e028>] (process_one_work+0x170/0x458)
Apr  2 03:27:51 raspberrypi kernel: [28383.750957] [<c023e028>] (process_one_work) from [<c023e36c>] (worker_thread+0x5c/0x5a4)
Apr  2 03:27:51 raspberrypi kernel: [28383.750970] [<c023e36c>] (worker_thread) from [<c02446a0>] (kthread+0x138/0x168)
Apr  2 03:27:51 raspberrypi kernel: [28383.750984] [<c02446a0>] (kthread) from [<c02010ac>] (ret_from_fork+0x14/0x28)
Apr  2 03:27:51 raspberrypi kernel: [28383.750993] Exception stack(0xdc659fb0 to 0xdc659ff8)
Apr  2 03:27:51 raspberrypi kernel: [28383.751003] 9fa0:                                     00000000 00000000 00000000 00000000
Apr  2 03:27:51 raspberrypi kernel: [28383.751014] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Apr  2 03:27:51 raspberrypi kernel: [28383.751024] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Apr  2 03:27:51 raspberrypi kernel: [28383.751037] INFO: task kworker/2:0:11071 blocked for more than 120 seconds.
Apr  2 03:27:51 raspberrypi kernel: [28383.751045]       Tainted: G         C        4.19.97-v7l+ #1294
Apr  2 03:27:51 raspberrypi kernel: [28383.751053] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

还有这样的错误:

Apr  1 19:07:56 raspberrypi dhcpcd[399]: script_runreason: control_queue: No buffer space available
Apr  1 19:07:59 raspberrypi dhcpcd[399]: script_runreason: control_queue: No buffer space available

任何帮助表示赞赏!

4

0 回答 0