02-05-2024 10:50 AM
Hi,
After every update of the NI packages (on Ubuntu), if I don't restart the computer, using nidaqmx in my application automatically causes a SIGABRT (6) and kills the whole application. The only "information" is confusing error message:
libnipalu.so failed to initialize Verify that nipalk.ko is built and loaded.
That's confusing because nipalk.ko is loaded... just an older version than the NI-DAQ library. It's annoying because our users don't typically run our application in a terminal, so they don't see any error message. Also, as the whole process is killed, it's impossible to show a nicer error message, or to handle it. This happens every 3 months, which is relatively frequent, and users typically don't restart the computer.
Is it possible to handle such case more gracefully and raise some sort of error instead kill the whole process?
I've noticed that it seems possible to unload and reload all the kernel modules, and fix the initialisation issue without rebooting the computer. So alternatively, the package could do just that automatically after an update (via the postinst script). The tricky part for this is that the modules must not be used. So all the services must be first stopped (and including any application which is using a NI DAQ card at the moment of the update), and then all drivers rmmod... then all the drives must be reloaded (modprobe) and then the services restarted. That's not so easy admittedly! Maybe just a message to the user saying the computer should be rebooted would be sufficient. See "update-notifier", to show messages to the user after an update.
Our system: Ubuntu 20.04/22.04 64bits x86.
02-05-2024 11:07 AM
I agree the message is confusing (doubly-so if it's not even being seen by the user!). For a number of esoteric reasons, it is not easy to avoid the abort in this case. Also, as you say, unloading the modules is not terribly straightforward because of the number of potential user-mode handles to said modules. update-notifier
probably gets the most bang for the buck.
02-05-2024 11:20 AM
If you need, I can give you example code to add to a debian .postint script in order to show a nice message with update-notifier. Just ask me 🙂