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 2, 2024 8:49 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,

    Are the 3 systems involved all running the same version of UV on the same platform?

    I was thinking version of UV or platform could be a factor. Although you indicate it worked previously on this same machine with the same version of UV?

    Is it the exact same code on all 3 platforms? No possibility of any control characters in the failing system?

    You are correct that the object code looks incorrect. The PyCallFunction is being interpreted incorrectly. It is defining 2 as the first argument and sending the results to the second argument. 

    What version of UV is running on the failing system?

    Neil

    Manu Fernandes
    Inspiring
    Feb 2, 2024 9:02 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. 

    Release is 11.3.0 /linux & Windows (ok) 

    Yes it worked on it from month.

    I have got the crash (faut) during test on the main program, I develop from 3 weeks without a trouble. I do not change these part of the code. 

    No special chars on the code trouble occurs only on these box from this morning.

    Thank you for help. 

    Manu Fernandes
    Inspiring
    Feb 2, 2024 9:31 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

    The most strange is, I extract the line from a 1500 line's code and Compile it alone and the problem occurs ! 

    Neil Morris
    Rocketeer
    Feb 2, 2024 9:48 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,

    Just confirming. Are you actually running UV Version 11.3.0? 

    That release was created to provide early access to some new Replication functionality before 11.3.1 was released. 

    I'm thinking the 11.3.0 was a typo?

    Thanks,

    Neil

    Manu Fernandes
    Inspiring
    Feb 2, 2024 9:54 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

    Something is broken at 'nbasic' level but what ? 

    Manu Fernandes
    Inspiring
    Feb 2, 2024 11:28 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

    Yes

    11.3.0, installed from years

    But I confirm it worked until today... The trouble is not the release.

    Thank you

    Neil Morris
    Rocketeer
    Feb 2, 2024 12:44 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

    Is the failure specific to that line of code? That is, do other items compile and run successfully? 

    Any timedate stamp changes on any of the binaries in uvhome/bin or anything else in uvhome? 

    Not sure how this would just start misbehaving. Something must have changed but what?

    Manu Fernandes
    Inspiring
    Feb 2, 2024 1:06 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

    Yes that line of code....

    I'll check /uv... 

    Thank you for your help 

    Manu Fernandes
    Inspiring
    Feb 5, 2024 3:02 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, ... 

    a little code with

    print date()
    A=1
    A=PyCallFunction('UUID','UUID') 

    on my problematic machine, the VLIST show bad assignment and crash.

    Compiler Version: 11.3.0.0                              
    Object Level    : 5                                     
    Machine Type    : 1                                     
    Local Variables : 1                                     
    Subroutine args : 0                                     
    Unnamed Common  : 0                                     
    Named Common Seg: 0                                     
    Object Size     : 28                                    
    Source lines    : 3                                     
    Object Date Time: 05 FEB 2024 08:54:52                  
                                                            
    00001: PRINT DATE()                                     
    00001 00000 : 04E date            => $R0                
    00001 00004 : 130 printcrlf      $R0                    
                                                            
    00002: A=1                                              
    00002 0000A : 0F8 move           1  => A                
                                                            
    00003: A=PYCALLFUNCTION('UUID','UUID')                  
    00003 00010 : 55A PyCallFunction 2 "UUID"  => "UUID"    
    00003 00018 : 001 abort                                 
    00003 0001A : 190 stop                                  
    

    if I copy the object code to another machine, and perform VLIST I get the correct pcode and the program run properly

    >VLIST BP TEST.o
    Main Program "BP.O/TEST.o"
    Compiler Version: 11.3.0.0
    Object Level    : 5
    Machine Type    : 11
    Local Variables : 1
    Subroutine args : 0
    Unnamed Common  : 0
    Named Common Seg: 0
    Object Size     : 28
    Source lines    : 3
    Object Date Time: 05 FEB 2024 08:54:52
    00001 00000 : 04E date            => $R0
    00001 00004 : 130 printcrlf      $R0
    
    00002 0000A : 0F8 move           1  => A
    
    00003 00010 : 55A PyCallFunction "UUID" "UUID"  => A
    00003 0001A : 190 stop

    so the problem is at runtime (RUN and VLIST) ;

    I do not identify any changes into uv/bin.

    I try to basic/RUN/VLIST as root, I get the same trouble.

    I've no idea what can be the trouble.

    .... :-( 
     

    Mike Rajkowski
    Rocketeer
    Feb 5, 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,
    Have you tested the Python code by itself on the machine with the issue?
     
    If it is working, compare the environment when you enter Python first, and when you 
    enter UniVerse first.
     
    Check the Python path:
    import sys
    sys.path
     
    Also, in the test where you go into Python first, check that you are running the
    Python provided by UniVerse:
    sys.executable
     
    ---
     
    If it also fails when you go into python first, look at modules installed, from the 
    OS command line.
     
    pip list
     
    Also, check if there is a different version of the uuid.dll on the system.
     
    <sidenote>I would not recomend doing nested statements in an EQUATE, if the inner 
    function call raises an exception, you have no way to catch it and take another action.
    I would recomend that you write your a python function to marshal the attribute
    to a string and return it, instead of requiring a 2nd call from UniVerse</sidenote>