bluecherrydvr / bluecherry-apps

Bluecherry surveillance system (server application)
http://www.bluecherrydvr.com
GNU General Public License v2.0
217 stars 68 forks source link

Any file inside storage directory besides bluecherry created directories / files cause crash #659

Open curtishall opened 9 months ago

curtishall commented 9 months ago

Reproduce:

Place any regular text files (I did three) in /var/lib/bluecherry/recordings:

-rw-r--r-- 1 root             root                5 Jan 16 00:08 test1
-rw-r--r-- 1 root             root               42 Jan 16 00:08 test2
-rw-r--r-- 1 root             root               42 Jan 16 00:08 test3

Upon restart the server will crash after "Checking location: /var/lib/bluecherry/recordings":

Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Status reports are served at /tmp/bluecherry_status
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Status reports are served at /tmp/bluecherry_trigger
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Started bc-server 3.1.0 (toolchain 9.4.0) v2.7.6-839-ge2f54363 heads/master
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): API server started listen to port: 7005
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): HLS server started listen to port: 7003 (SSL=0)
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): SQL database connection opened
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Found abandoned recording /var/lib/bluecherry/recordings/2024/01/15/000011/18-08-10.mp4, queued for length update
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Found abandoned recording /var/lib/bluecherry/recordings/2024/01/15/000016/18-08-10.mp4, queued for length update
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Found abandoned recording /var/lib/bluecherry/recordings/2024/01/15/000014/18-08-10.mp4, queued for length update
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): started processing abandoned recordings
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Determined oldest media time: 2024/01/15 02-14-34
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: I(): Checking location: /var/lib/bluecherry/recordings
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: BUG: Aborted at 0x00007fe88497b090
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: Call trace:
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe88497b090]  @ /lib/x86_64-linux-gnu/libc.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe88497b00b] gsignal+0x00000000 @ /lib/x86_64-linux-gnu/libc.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe88495a859] abort+0x00000000 @ /lib/x86_64-linux-gnu/libc.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884d348d1]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884d4037c]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884d403e7]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884d40699]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884d37369]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe884ddb7b9]  @ /lib/x86_64-linux-gnu/libstdc++.so.6
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x000055a388d189df]  @ /usr/sbin/bc-server
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x000055a388d1a481]  @ /usr/sbin/bc-server
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x000055a388d158f8]  @ /usr/sbin/bc-server
Feb 12 09:04:29 2a41d95dac01 bc-server[41]: [0x00007fe88495c083] __libc_start_main+0x00000