NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

"opkg update" generates "Segmentation fault"

Solved!
Go to solution

I am experiencing a "Segmentation fault" on my sbRIO-9651, or SOM, when I run "opkg update" or "opkg install". This is the first time that I'm trying to use the package manager. I've not customized the system. In fact, one of the first things I did was a clean reinstall of the following software:

installed_sw.png 

My network is configured appropriately. I can successfully ping NI's repository server from the SOM (ping download.ni.com).

Commands like "opkg info" and "opkg status" successfully run but there is a segmentation fault upon completion of the command (meaning, status and info is provided but the command seg faults at the end).

Here is additional information about my system and the configuration of opkg:

system_state.png

 

I've reproduced this problem both on a cRIO-9068 and my sbRIO-9651. Neither system had ever used the opkg command before the Segmentation fault. However, the opkg started working on the cRIO-9068 after I did a clean reinstall of the above NI software. The clean reinstall did NOT fix the sbRIO-9651. 

 

Has anyone else experienced this? If so, how did you get around it? Thanks.

 

0 Kudos
Message 1 of 5
(6,558 Views)

I just learned something interesting. 

I have a 3rd NI-Linux device that I had not tried to use yet. I pulled it out and got it configured and online. I tried "opkg update" and it worked! So, I installed a handful of useful tools. I then went on with some work and down the line realized that I wanted to try to install another tool. I ran "opkg install python-select" (where python-select does not exist), upon which I got a Segmentation fault. Now, this third device is stuck like the other where I cannot use "opkg update" or "opkg install <pkg>" where <pkg> is a good/existing package. So, it seems that the opkg DB gets messed up somehow and then cannot recover. 

I'm going to look into what to do here. I don't know if there is a DB file that can be deleted/refreshed or what. 

 

If anyone from the community knows... please pipe in. 

 

In the meantime, I'll be looking into this.

0 Kudos
Message 2 of 5
(6,535 Views)
Solution
Accepted by topic author Southern_Cross

Here is a work around...

If you reformat your device it will reimage the NI-Linux OS. This will solve the problem atleast for a while. It's unknown what causes OPKG to get into the bad state that results in the segmentation fault, but this is at least a work around...

 

Message 3 of 5
(6,499 Views)

You may also want to look into upgrading to LV 2017. NI took over the maintainer role for opkg and fixed several bugs in the last 2 years. 

0 Kudos
Message 4 of 5
(6,488 Views)

Sorry for the delayed reponse (holidays and all).

 

Most likely, there's some bad state (or something that causes stack sizes of opkg to grow too large when performing operations) when working with some of the current state information. If you can get a controller into this state again, it would be interesting to see what the contents of /var/lib/opkg is, as this is where the opkg state is kept

0 Kudos
Message 5 of 5
(6,410 Views)