Skip to content

Transmission archive fix#834

Merged
robotastic merged 2 commits intoTrunkRecorder:masterfrom
taclane:transmission_archive-fix
Jul 11, 2023
Merged

Transmission archive fix#834
robotastic merged 2 commits intoTrunkRecorder:masterfrom
taclane:transmission_archive-fix

Conversation

@taclane
Copy link
Contributor

@taclane taclane commented Jul 10, 2023

Beginning with trunk-recorder 4.6, transmission .wav files exist in a temporary directory and either get deleted, or moved to the captureDir structure if transmissionArchive is set in the config file.

Related to PR #796, trunk-recorder may crash if it attempts file operations on a non-existent transmission .wav in the tempDir.

This fix simply uses the existing checkIfFile() to verify if the file exists before attempting to move a transmission .wav from the captureDir.

@taclane
Copy link
Contributor Author

taclane commented Jul 10, 2023

Below is the error leading to this crash that was investigated on the t-r discord.

[2023-07-10 12:17:52.011707] (error)   Somehow, /dev/shm/trs/4409-1689005860_776568750.wav doesn't exist, not attempting to provide it to sox
terminate reached from thread id: 7fe5fbf81dc0Got std::runtime_error
boost::filesystem::copy_file: No such file or directory: "/dev/shm/trs/4409-1689005860_776568750.wav", "/app/trs/2023/7/10/4409-1689005860_776568750.wav"
0x7fe60062e5d9: (gr::tagged_stream_block::check_topology(int, int)+0x2e49)
0x7fe60022b24c: (std::rethrow_exception(std::__exception_ptr::exception_ptr)+0x7c)
0x7fe60022b2b7: (std::terminate()+0x17)
0x7fe60022b23e: (std::rethrow_exception(std::__exception_ptr::exception_ptr)+0x6e)
0x562a6d78a60c: (Call_Concluder::manage_call_data_workers()+0xe2c)
0x562a6d6ac5e4: (monitor_messages()+0x394)
0x562a6d6a01f0: (main+0x740)
0x7fe5ffe77d90: (__libc_init_first+0x90)
0x7fe5ffe77e40: (__libc_start_main+0x80)
0x562a6d6a3a95: (_start+0x25)
Aborted (core dumped)

@robotastic
Copy link
Collaborator

Nice Catch!

@robotastic robotastic merged commit a84090b into TrunkRecorder:master Jul 11, 2023
@taclane taclane deleted the transmission_archive-fix branch July 11, 2023 13:32
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

Successfully merging this pull request may close these issues.

2 participants