If opencpn is running with an un-acknowledged ais
, it will become unusable after about 15 minutes. Cannot receive new alarms, open new charts, does not save changes, etc.
Sometime you are too buzy to acknowledge alarms.
When a sound alarm
is active, O opens the soundfile every second. When 1024 files are opened the system will not open new files...
Even if you acknowledge the alarms, the sound files remain open and eventually you will reach the magic number of 1024 opened files.
How to reproduce:
- configure O to sound CPA alarm
- arrange to have a CPA alarm
- do not acknowledge alarm
- after about 1000 sounds,
- the alarm will stop sounding
- if you move the view, new charts will not open
- track stop being saved
- if you check the log wou will see many: 09:39:59.211 WARNING SndfileSoundLoader.cpp:36 Cannot open file /usr/share/opencpn/sounds/beep_ssl.wav: System error : Too many files opened.
To see a list of the opened files issue this command:
ls -l /proc/$(ps -C opencpn -o pid=|tr -d " ")/fd
All this has been tested with same results on:
- Ubuntu 22.04.2 LTS on Lenovo Thinkpad (x86_64)
- Flatpak on same machine
- Raspbian GNU/Linux 11 (bullseye) on a Raspberry pi 4 (armv7l)
While documenting this, I found that eventually any sound will cause the problem:
- Ships' bell
watch alarm, wait 15 minutes.
Until this is resolved O is unusable with sound (all sounds) in linux.
This problem started with O 5.6 and reported in fs #2895