Segmentation fault in Omega2P+Python Library installations



  • Hi,
    We are using 100s of Omega2P in field. The recent batch of omega2p got the below firmware
    root@Omega-276A:~# oupgrade

    Device Firmware Version: 0.3.4 b259
    Checking latest version online...
    url: https://api.onioniot.com/firmware/omega2p/stable
    Repo Firmware Version: 0.3.4 b259
    Comparing version numbers
    Device firmware is up to date!

    We are facing new issues. We cannot be able to run python in few boards.
    root@Omega-276A:~# python
    Traceback (most recent call last):
    File "/usr/lib/python2.7/site.py", line 62, in <module>
    ValueError: bad marshal data (unknown type code)
    root@Omega-276A:~# python3
    Fatal Python error: Py_Initialize: can't import _frozen_importlib
    ValueError: bad marshal data (unknown type code)

    Current thread 0x77f9bd0c (most recent call first):
    Aborted
    root@Omega-276A:~#

    From Hardware point of view, all are same design and same SMPS.
    I tried to to factory reset. Again same issue.

    Any suggestions why few boards behave like this with python.

    It would be great help. Since we are in the middle of deployment.

    Thanks in advance


  • administrators

    This issue usually arises due to corrupted Python bytecode or libraries, possibly related to filesystem corruption, incomplete package installation, or flash memory issues.

    I saw your other post about boot issue, this could be related. Do you have other devices connected to the SPI bus in your setup?



  • @Zheng-Han No, SPI is not connected to anything. I use only UART, Ethernet and GPIOs as of now.
    Same code works very well in most of the devices. Same design. I have used LM1117 3.3V with 100uF cap. Earlier this was not an issue. Same code is working in previous lot of Omegas.



  • @Zheng-Han I did one experiment.
    I did
    firstboot -y
    sync
    reboot
    As I understand, the device is in factory reset. After reboot, I login.
    Installed python-light python-pip

    I tested Python command
    root@Omega-236B:~# python
    Python 2.7.18 (default, Sep 09 2024, 15:48:40)
    [GCC 7.3.0] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

    reboot
    I tested the python command
    BusyBox v1.28.3 () built-in shell (ash)


    / __ ___ ()__ ___ / __ _ _ ___ ___ ____ _
    / // / _ / / _ / _ \ / // / ' / -) _ / _ /
    _
    /////___//// _////_/_, /_,/
    W H A T W I L L Y O U I N V E N T ? /
    __/

    Ω-ware: 0.3.4 b259

    root@Omega-236B:~# python
    Segmentation fault
    root@Omega-236B:~#

    I got segmentation fault. I did not install any extra libraries. Any Idea why it is happening.



Looks like your connection to Community was lost, please wait while we try to reconnect.