Skip to main content
Manu Fernandes
Inspiring
Feb 2, 2024 7:59 AM UTC
Question

uv 11.3 on linux : compiler error !?

hello folks,

on a Linux/uv 11.3 box, I have a trouble with BASIC 

I do this (for short): 
equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
print UUID$NEW

and I get a segmentation fault at runtime AND with VLIST ; 
basic pcode seams faulty ?
It works for month ; and it works on another machines.... 
After a reboot of the os the trouble is still there !!!
Any idea ? 
many thanks by advance
ManuFV

    18 replies

    Neil Morris
    Rocketeer
    Feb 5, 2024 4:00 PM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Hi Manu,

    Thanks for the latest testing results. Very interesting that the compiled code behaves just fine on a different system. But the RUN and VLIST commands are apparently interpreting that same object code differently. The VLIST output indicates an extra argument of '2' is being used and that shifts the correct arguments. Are you able to see the pcode using RAID with the 'I' or 'X' command? If so, does it show the same as VLIST? 

    Mike offered some comments related to checking your runtime environment. I'm not sure if RUN or VLIST does anything different when encountering a Python function rather than a standard function. If not, then unclear how/why VLIST would treat the same object differently on 2 different systems. Still thinking of possibilities.

    Neil

    Manu Fernandes
    Inspiring
    Feb 7, 2024 2:12 AM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV
    hello Mike,

    thank you 
    for  your help.
    Yes, the py code run correctly from outside or inside uv.

    but you are right, when I run uv/python the sys.executable is not bin/uv but /usr/local/bin/python3 

    the box have 4 distributions of python 2.6, 3.4.10, 3.6.4 and uv's 3.4.1 

    Is there a venv to be defined when/before I start uv ? 

    many thanks 

    manu

    Manu Fernandes
    Inspiring
    Feb 7, 2024 3:26 AM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Hi Neil,

    about RAID , yes, it execute like RUN & VLIST, here is the capture : 

    >RAID BP TEST                                                      
     TEST:   1: PRINT DATE()                                           
    :: H                                                               
    Main Program                                                       
    Compiler version: 11.3.0.0                                         
    Machine type    : 0x1                                              
    Object Size     : 0x2A                                             
    Constants       : 6                                                
    Subroutine args : 0                                                
    Local Variables : 1                                                
    Unnamed Common  : 0                                                
    Named Commed Seg: 0                                                
    :: I                                                               
       4: 130 printcrlf       $R0                                      
    :: I                                                               
    20492                                                              
       A:  F8 move            1  => A                                  
    :: X                                                   
      10: 55A PyCallFunction  2 "uuid"  => "uuid4"         
    :: I                                                               
      10: 55A PyCallFunction  2 "uuid"  => "uuid4"                     
    :: I                                                               
    Abnormal termination of UniVerse.                                  
    Fault type is 11.  Layer type is BASIC run machine.                
    Fault occurred in BASIC program TEST at address 10.                
    Segmentation fault (core dumped)                                   
    

    Mike Rajkowski
    Rocketeer
    Feb 7, 2024 9:26 AM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Manu,

    Since the systems where it works are the same OS and UniVerse Version, I am thinking there may be a difference in configuration, or what has been loaded on the system.

    You can use the exact path to the UniVerse version of Python, to see if the module has any issue.

    I expect that one of the other Python Versions on the system put some paths into the PATH environment variable.

    Compare the PATH(s) from the system that is working to the system that fails.

    Also check for a PYTHONPATH environment variable.

    Neil Morris
    Rocketeer
    Feb 7, 2024 6:26 PM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Hi Manu,

    If you have two Linux systems running the same version of UV where one works and the other fails, can you try the following and attach the results?

    # strace -o bad.out uvsh "VLIST BP TEST"    on the system which fails

    # strace -o good.out uvsh "VLIST BP TEST"   on the system which works

    Thanks,

    Neil

    Neil Morris
    Rocketeer
    Feb 8, 2024 7:37 AM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Hi Manu,

    A slight update to my last post. The 'strace' command should include the "-f" option. For example:

    # strace -o bad.out -f uvsh "VLIST BP TEST"

    Thanks,

    Neil

    Manu Fernandes
    Inspiring
    Feb 9, 2024 5:58 AM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    I join the bad.out.txt file (uv 11.3.0)  I do not have other box with the same release/linux. 

    regards.

    manu

    Neil Morris
    Rocketeer
    Feb 9, 2024 12:31 PM UTC

    hello folks,

    on a Linux/uv 11.3 box, I have a trouble with BASIC 

    I do this (for short): 
    equ UUID$NEW lit "field(PyGetAttr(PyCallFunction('uuid', 'uuid4'), 'urn'),':',3)" 
    print UUID$NEW

    and I get a segmentation fault at runtime AND with VLIST ; 
    basic pcode seams faulty ?
    It works for month ; and it works on another machines.... 
    After a reboot of the os the trouble is still there !!!
    Any idea ? 
    many thanks by advance
    ManuFV

    Hi Manu,

    I ran the test on another system internally. The strace shows the same behavior of the value '2' being applied as the first argument. 

    The output from your system is as follows:

    6276  write(1, " ", 1)                  = 1
    6276  write(1, "PyCallFunction ", 15)   = 15
    6276  write(1, "2", 1)                  = 1
    6276  write(1, " ", 1)                  = 1

    On an internal system, the result are as follows:

    12898 write(1, " ", 1)                  = 1
    12898 write(1, "PyCallFunction ", 15)   = 15
    12898 write(1, """UUID""", 6)           = 6
    12898 write(1, " ", 1)                  = 1

    I don't know where the '2' is coming from or why it just started happening. I know you checked for changes in uvhome, but perhaps a reinstall of UV?

    Thanks,

    Neil