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
Error on critical.wav resource #578
Comments
I have no idea why this happens but can confirm that it does. Looking into this temporary resources folder I found that most of the resource files where missing. Looks basically like the folder https://github.com/HenriWahl/Nagstamon/tree/master/Nagstamon/resources is copied there at start because all files exist there when Nagstamon has been started freshly but for some unknown reason most of the files vanish after a while. I have no clue why exactly this /var/folder/* is created at all but assume it has to do something with pyinstaller which is used for packaging of Nagstamon. But this is just a guess. |
Hello. I have noticed this error pop-up before all versions. It seems to occur when Nagstamon has been open and running for some time. A quit and restart will always resolve the issue. But in all the versions, the audio alert has still played back appropriately even when the message appears. Is it possibly a sandbox issue where the error is itself in error? |
I found out that this problem is related to pyinstaller. Pyinstaller offers 2 ways to package an app: as one file or as directory. I some years ago choose the one file way. When using this mechanism, the one file gets unzipped in the /var/folders/something-directory. This as such is not a bad thing, but macOS from time to time cleans up this folder... the code already running is not involved, but the .wav-files are, because they get simply loaded when needed.
|
I was too fast... this solution 30c9604 only works on Linux - where it is not needed. |
I am not able to get pyinstaller to package Nagstamon as one directory, getting it running. Another rather mad approach might be to cache the .wav-files and replace them in case they where deleted by macOS... |
I managed to store a copy of the .wav-files in memory and when they are not existing, they will be recreated. Pretty mad but works. Maybe you can give it a try with https://nagstamon.ifw-dresden.de/files/incoming/Nagstamon%203.3-20191011.dmg. |
Well you beat me to posting my suggestion, but that works. 😀 |
Hello HenriWahl, `Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGSEGV) Thread 0 Crashed:: Dispatch queue: com.apple.main-thread |
Yes... I see that I see nothing helpful... I will check as soon as possible. Edit: the automatic file deletion seems to happen after some days running. |
My testing instance is still running. It's a Catalina macOS. Which is your version? Nagstamon is build on a Sierra host. |
Can you please sure it is the very last release you downloaded? There were several versions this day. Maybe reload it from the website just to make sure it is the latest? |
Hello HenriWahl, |
@mariusvw can you please check if the latest testing release solves this problem? |
@HenriWahl Another thought, why store the wav files in memory and not in the resource location of the application directory? (e.g. /Applications/Nagstamon.app/Contents/Resources) |
Please download latest 20191014. Storage in memory is easier because all other platforms do not use these macOS-folders and pyinstaller isolates the runtime anyway. |
@HenriWahl tested with 3.3-20191014, crashes at the same moment |
What macOS version do you use? Which server do you use? Did any version of Nagstamon work before? |
@HenriWahl version 3.2.1/20190607 worked just with the wav file warnings. Running Mac OS X 10.15 (Catalina), I have multiple server versions with Nagios Core and Opsview, all result in the same. |
And now crashes as soon as you start or when some alert occurs? |
What are your displaying settings? There were some changes so let me know: is the popup status window closing when moving the pointer out of it and is Nagstamon running in systray or as floating statusbar? |
OK... and crashes occur when alarms happen and sounds shall be played? |
I can't tell which moment it happens, it runs in the background in the menubar, without any sound it crashes and shows a crash report. |
So you have sound disabled? |
@mariusvw There was a freshly introduced bug in latest testing release, please check the 20191015 version. |
From my side I had the crashing narrowed down to when the system was waking from a sleep state. |
New day, restarted my macbook and ensured all caches were cleared, solves the crashing on 20191014. Sounds played. Have not tested yet what happens when the caches are cleared again, takes some days to let it happen, will report back when in 2 days. |
@mariusvw @pbrunnen It would be interesting which files and mostly important which directories get deleted when macOS has the idea to cleanup /var/folders. If Nagstamon loses all its files AND its directories like /private/var/folders/7w/hfvrg7v92x3gjt95cqh974240000gn/T/_MEIM1WVB5/Nagstamon/resources it also will have to recreate directories. In case Nagstamon crashes for you, can you please check how empty the temporary folder is or what files and directories are missing? |
Good day @HenriWahl |
Good evening @HenriWahl |
I added the not-only-restore-sound-files-but-directories-too feature in 3.3-20191016, so this one should be the final solution. At least regarding the missing-file-problem. If it still crashes after sleep I am not sure what to do then. |
@pbrunnen please try to run Nagstamon.app/Contents/MacOS/Nagstamon directly - it will open a terminal window which might help to debug the wakeup issue. |
@HenriWahl will upgrade to 3.3-20191016 today, so far 20191014 didn't crash, even after a 2 day sleep of my macbook. All contents in /var/folders remained, as soon as those got cleaned out without putting the macbook in sleep mode Nagstamon crashed. Will run it again with the same test today running from CLI to get most debugging information. |
@mariusvw if running with CLI please as described above from Nagstamon.app/Contents/MacOS/Nagstamon because this is the pyinstaller version which creates the sometimes vanishing folders in /var/folders/*. Thanks for debugging! |
Good morning @HenriWahl, |
Hello @HenriWahl,
Unfortunately that was all that was logged. I also attached the crash report as it did seem to have more detail compared to prior. I will try this again to reproduce capturing all messages to file. |
Well... reading the crashdump I only can confirm that it... crashed. The error messages you saw in the terminal are of no harm. Was there an older version which did not crash after wakeup? I updated Qt5 for the latest testing releases because support for newer macOSes should get better. Does it crash immediately when waking up or is Nagstamon still able to do something? |
After running it from the console yesterday I noticed one error so far:
Still couldn't find a good reason for the other errors yet |
OK... so this file has to be included into the file backup cache too... I'll take care of it. Did it result in a crash? |
It didn't crashed |
Latest 3.3-20191018 contains fix to avoid #578 (comment) |
Now there is a new 3.3-20191018 available at https://nagstamon.ifw-dresden.de/download/#testing which caches every *.wav and *.svg file and restores them on the fly if needed. Worth another check over the weekend... |
Hi @HenriWahl, I have narrowed the crash down to only when I'm waking at the office in my docking station. The most I can get is 'Segmentation fault: 11' when running through the terminal. So this is some strange edge case that is unrelated... It may even a timing issue with the Kerberos change as all the prior versions did not crash. I would just close this bug as complete. I can open a separate bug if you wish, but this is certainly something I can live with. Thank you for everything! |
Would be fine to just close it... :-) And thanks for debugging too! |
At my side it works without crashing and the sounds play. When things change, will let you know. |
@mariusvw @pbrunnen can you please check the very latest testing version 3.3-20191112? After solving this *.wav problem there came up a new one - this time the certifi/cacert.pem file was automatically deleted from /var/folders/*/Nagstamon and missed by the HTTP request machinery as seen in attached screenshot. |
Hello @HenriWahl ,
Certainly. Does the custom CA parameter need to be set to something and if so, what type of certificate? Thanks! |
No - this certifi/cacert.pem comes with Nagstamon but gets deleted like the *.wav-files. I just managed to restore this file too because it seems to be needed for every HTTP-request. This problem only could appear because the *.wav-files-deletion-problem was solved. Now both problems are gone and I am interested if another one will raise. Hopefully not. |
Hello @HenriWahl , |
@HenriWahl I haven't noticed any problems yet. |
It seems that the critical.wav is sometimes missing in the resources directory.
Solution suggestion always copy the default in place when resource is not found.
The text was updated successfully, but these errors were encountered: