Error by compiling MKK utility


Topic author
spoofy
Contributor
Posts: 21
Joined: Fri Mar 31, 2023 6:02 pm
Reputation: 0
Location: Erlangen/Germany
Status: Offline

Error by compiling MKK utility

Post by spoofy » Thu Apr 20, 2023 7:20 am

I tryed to compile MKK utility: https://github.com/endlesssoftware/mmk
and CC Crashed.

Code: Select all

$ @compile

   MMK Bootstrap Procedure

$! If you have the SDL compiler installed, then feel free to uncomment the
$! lines below.  However, it is not absolutely necessary as the resulting
$! header files are distributed with the source kit.
$!
$!$ MESSAGE/NOOBJECT/SDL=MMK_MSG.SDL MMK_MSG.MSG
$!$ SDL/VAX/LANGUAGE=CC=ETC_DIR:MMK_MSG.H MMK_MSG.SDL
$ LIBRARY/CREATE BIN_DIR:MMK.OLB
$ CC/NOLIST/OBJECT=BIN_DIR:MMK.OBJ MMK.C
$ LIBRARY/REPLACE BIN_DIR:MMK.OLB BIN_DIR:MMK.OBJ
$ CC/NOLIST/OBJECT=BIN_DIR:FILEIO.OBJ FILEIO.C
$ LIBRARY/REPLACE BIN_DIR:MMK.OLB BIN_DIR:FILEIO.OBJ
$ CC/NOLIST/OBJECT=BIN_DIR:MEM.OBJ MEM.C
$ LIBRARY/REPLACE BIN_DIR:MMK.OLB BIN_DIR:MEM.OBJ
$ CC/NOLIST/OBJECT=BIN_DIR:GET_RDT.OBJ GET_RDT.C
%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=000000000343
0000, PC=00000000006C9993, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
image     module    routine               line      rel PC           abs PC     
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  CHECK_ATTRIBUTES
                                          #816 00000000006C9993 00000000006C9993
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  CHECK_TUPLE
                                         #1564 00000000006CD141 00000000006CD141
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  CHECK_TUPLE_IN_LIST
                                         #2145 00000000006D0461 00000000006D0461
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  GEM_IC_CHECK_NODE
                                         #2635 00000000006C80BA 00000000006C80BA
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  GEM_IC_CHECK_NODE
                                         #2671 00000000006C83EE 00000000006C83EE
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_IC.BLI;1  GEM_IC_CHECK
                                         #2276 00000000006C69BE 00000000006C69BE
DECC$COMPILER  [.src]g2l_module.cxx  G2L_COMPILE_MODULE
                                          #571 0000000000A490D3 0000000000A490D3
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_CO.BLI;1  GEM_CO_COMPILE_MODULE
                                         #3413 00000000006E2627 00000000006E2627
DECC$COMPILER  COMPILE.C;1  gemc_be_master
                                       #103705 00000000004236FE 00000000004236FE
DECC$COMPILER  COMPILE.C;1  gem_xx_compile
                                       #102916 00000000004223D7 00000000004223D7
DECC$COMPILER  GEM_VER_AREA:<SRC>GEM_CP_VMS.BLI;1  GEM_CP_MAIN
                                         #2643 00000000006D4C1E 00000000006D4C1E
DECC$COMPILER                                0 0000000000AD76D4 0000000000AD76D4
DECC$COMPILER                                0 00000000020F6D6D 00000000020F6D6D
PTHREAD$RTL                                  0 000000008004122C FFFF830008D0322C
PTHREAD$RTL                                  0 0000000080002316 FFFF830008CC4316
                                             0 FFFF8300071FBDC6 FFFF8300071FBDC6
DCL                                          0 000000008006741B 000000007ADFF41B
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
$BAIL_OUT:
$ EXIT 1.or.(0*F$VERIFY(0))
$ cc/version
VSI C X7.4-726 (GEM 50X23) on OpenVMS x86_64 E9.2-1  
$ 


Last edited by mister.moderator on Thu May 25, 2023 3:04 am, edited 1 time in total.

Tags:


sms
Master
Posts: 288
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Error by compiling MKK utility

Post by sms » Thu Apr 20, 2023 3:24 pm

Code: Select all

   Same here.
Added in 1 hour 11 minutes 28 seconds:

Code: Select all

   A quick try with an old cross tools kit suggests that you might want
to make changes like the following to the C source:

ITS $ gdiff parse_descrip.c_orig parse_descrip.c     
216c216
< #if defined(__ALPHA) || defined(__ia64__)
---
> #ifndef __VAX

ITS $ gdiff parse_objects.c_orig parse_objects.c     
135c135
< #if defined(__ALPHA) || defined(__ia64__)
---
> #ifndef __VAX

   I wouldn't bet on the macro stuff, either.  The (old) cross tools
MACRO/MIGRATION apparently didn't like what it saw in the IA64
SYS$COMMON:[SYSLIB]ARCH_DEFS.MAR:

IA64     = 1
^
%XMAC-W-GENWARN, generated WARNING: 0 Architecture symbol set to 1, probably
 an error at line number 14 in file SYS$COMMON:[SYSLIB]ARCH_DEFS.MAR;1

   My ignorance of VAX MACRO is comprehensive, so I didn't look to see
if the cross tools were supposed to handle that stuff.  A cross tools
kit newer than my X86_XTOOLS E9.2-XG6F might do better, but I never got
access to anything newer, so I know nothing.

   Also:

EVAX    =       1
^
%XMAC-W-GENWARN, generated WARNING: 0 Architecture symbol set to 1, probably
 an error at line number 102 in file
 ITS$DKA0:[UTILITY.SOURCE.MMK.mmk-master_2023-04-20]parse_tables.mar;1
%MMK-F-ERRUPD, error status %X107D1260 occurred when updating target
 SYS$DISK:[.BIN-X86_64]PARSE_TABLES.OBJ

   So, I'd guess that someone who knows more than I do about VAX MACRO
would want to make some changes there.

   In the mean time, you may be stuck with MMS (in DECset), whose V4.0-4
also might be imperfect.  See:

      https://forum.vmssoftware.com/viewtopic.php?f=37&t=8634

User avatar

martinv
Master
Posts: 101
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Error by compiling MKK utility

Post by martinv » Mon Apr 24, 2023 2:54 am

Wow! I even crashed the system when exeuting that CC command interactively...

Code: Select all

OpenVMS system dump analyzer
...analyzing an x86-64 interleaved memory dump...

Dump taken on 24-APR-2023 08:40:08.56 using version E9.2-1
PGFIPLHI, Pagefault with IPL too high

SDA> clue crash
Crashdump Summary Information:
------------------------------
Crash Time:        24-APR-2023 08:40:08.56
Bugcheck Type:     PGFIPLHI, Pagefault with IPL too high
Node:              X86VMS  (Standalone)
CPU Type:          innotek GmbH VirtualBox
VMS Version:       E9.2-1
Current Process:   FTA2_SYSTEM
Current Image:     X86VMS$DKA0:[SYS0.SYSCOMMON.][SYSEXE]DECC$COMPILER.EXE;1
Failing PC:        FFFF8300.06BFA8E9    EXCEPTION+8008A4E9   (EXCEPTION + 00008149 / line 67153)
Failing PS:        00000000.00000000
Module:            EXCEPTION    (Link Date/Time: 23-JAN-2023 14:14:54.62)
Offset:            8008A4E9

Boot Time:         24-APR-2023 07:42:59.00
System Uptime:               0 00:57:09.56
Crash/Primary CPU: 1./0.
System/CPU Type:   0000
Saved Processes:   28
Pagesize:          8 KByte (8192 bytes)
Physical Memory:   3840 MByte (1196032 PFNs, discontiguous memory)
Dumpfile Pagelets: 0 blocks
Dump Flags:        olddump,writecomp,errlogcomp
Dump Type:         raw,full,shared_mem
EXE$GL_FLAGS:      init,fatal_bug,bugdump
Paging Files:      1 Pagefile and 0 Swapfiles installed

Stack Pointers:
KSP = 00000000.7FF7B3E0   ESP = 00000000.7FF8BE00   SSP = 00000000.7FF9CA28
USP = 00000000.7ACC3A20

General Registers:
RAX = 00000000.00000600   RDI = 00000000.00100002   RSI = 00000000.0000035C
RDX = 00000000.7FF7B780   RCX = 00000000.7B614E38   R8  = 00000000.00000000
R9  = 00000000.00000008   RBX = 00000000.7FF7BE00   RBP = 00000000.7FF7B500
R10 = 00000000.0000035C   R11 = 00000000.0000035C   R12 = 00000000.7FF7B3F8
R13 = 00000000.000000B9   R14 = 00000000.7ACC525A   R15 = 00000000.02D09706
RIP = FFFF8300.0739D9D2   RSP = 00000000.7FF7B3E8   SS  = 00000000.00000010

Pagefault Information:
Faulting Virtual Address        00000000.7B614E38
Memory Management Flags         00000000.00000000   (Read Data Fault)
Faulting IPL                    00000008

Exception Frame:

Exception taken at RIP FFFF8300.06BFA8E9 from Kernel mode
Trap Type      0000000E (Page Fault)
Address      = 00000000.7FF7B780         Prev Frame     = 00000000.7FF7BC20
RAX = 00000000.00001001   RDI = 00000000.7FF7B948   RSI = 00000000.00000000
RDX = 00000000.7B614E00   RCX = 00000000.03430000   R8  = 00000000.00000001
R9  = FFFFFFFF.FFFFE001   RBX = 00000000.7ACC525A   RBP = 00000000.7FF7B9A0
R10 = 00000000.00000008   R11 = FFFF8300.06976500   R12 = 00000000.005D05A6
R13 = 00000000.000000B9   R14 = 00000000.7ACC525A   R15 = 00000000.02D035C8
RIP = FFFF8300.06BFA8E9   RSP = 00000000.7FF7B960   SS  = 00000000.00000010

System Registers:
Page Table Base Register (PTBR)                           00000000.00631198
Processor Base Register (PRBR)                            FFFFFFFF.8C9FA000
Privileged Context Block Base (PCBB)                      FFFFFFFF.8AC90080
System Control Block Base (SCBB)                          00000000.00000000
Software Interrupt Summary Register (SISR)                00000000.00000000
Address Space Number (ASN)                                00000000.00000000
AST Summary / AST Enable (ASTSR_ASTEN)                    00000000.0000000F
Interrupt Priority Level (IPL)                            00000000.0000001F

Failing Instruction:
EXCEPTION + 00008149 / line 67153:  movq    38(%rdx),%rdx

Instruction Stream (about last 10 instructions):
EXCEPTION + 00008109 / line 67146:  addb    %al,(%rcx)
EXCEPTION + 0000810B / line 67146:  addb    %al,(%rax)
EXCEPTION + 0000810D / line 67146:  callq   00012ECE
EXCEPTION + 00008112 / line 67146:  cmpq    $00000000,%rax
EXCEPTION + 00008118 / line 67146:  setne   %cl
EXCEPTION + 0000811B / line 67146:  xorb    $01,%cl
EXCEPTION + 0000811E / line 67146:  testb   $01,%cl
EXCEPTION + 00008121 / line 67146:  jne     02
EXCEPTION + 00008123 / line 67146:  jmpb    18
EXCEPTION + 00008125 / line 67148:  movq    -28(%rbp),%rdi
EXCEPTION + 00008129 / line 67148:  movq    -08(%rbp),%rsi
EXCEPTION + 0000812D / line 67148:  movl    $00000200,%eax
EXCEPTION + 00008132 / line 67148:  callq   -00001DA7
EXCEPTION + 00008137 / line 67149:  addq    $40,%rsp
EXCEPTION + 0000813B / line 67149:  popq    %rbp
EXCEPTION + 0000813C / line 67149:  retq
EXCEPTION + 0000813D / line 67153:  jmpb    00
EXCEPTION + 0000813F / line 67153:  movb    $01,%al
EXCEPTION + 00008141 / line 67153:  movq    -08(%rbp),%rcx
EXCEPTION + 00008145 / line 67153:  movq    -10(%rbp),%rdx
EXCEPTION + 00008149 / line 67153:  movq    38(%rdx),%rdx
EXCEPTION + 0000814D / line 67153:  cmpq    %rdx,%rcx
EXCEPTION + 00008150 / line 67153:  seta    %sil
EXCEPTION + 00008154 / line 67153:  testb   $01,%sil
EXCEPTION + 00008158 / line 67153:  movb    %al,-2B(%rbp)
Working hard for something we don't care about is called stress;
working hard for something we love is called passion.
(Simon Sinek)

User avatar

arne_v
Master
Posts: 281
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Error by compiling MKK utility

Post by arne_v » Mon Apr 24, 2023 8:14 am

There is a thread in comp.os.vms covering MMK - I believe it has been build successfully for x86-64 and they only need the maintainer to merge the fixes in.

A few quotes:
I used MMK for the builds. A few steps to build Emacs are better done on the target platform. MMK for x86 needed a couple of changes. I didn't put them back to https://github.com/endlesssoftware/mmk. But I just noticed a pull request, which probably describes similar changes to build MMK for x86.
We have it, or at least will have it when Tim resurfaces and merges my
PR that hb alluded to:

<https://github.com/endlesssoftware/mmk/pull/101>

If anyone notices anything I forgot, feel free to comment there. I
wasn't thrilled about turning off warnings to build the MACRO module:

<https://github.com/endlesssoftware/mmk/ ... 02d203fa1a>

but I don't do MACRO and this seemed like the quickest, safest solution.
Arne
arne@vajhoej.dk
VMS user since 1986

User avatar

martinv
Master
Posts: 101
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Error by compiling MKK utility

Post by martinv » Mon Apr 24, 2023 9:04 am

Hi Arne,

thanks for the pointer. That must have been built using the crosstools. Using C X7.4-726 on VirtualBox Craig's version crashes with the same traceback when compiling.
Working hard for something we don't care about is called stress;
working hard for something we love is called passion.
(Simon Sinek)

User avatar

arne_v
Master
Posts: 281
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Error by compiling MKK utility

Post by arne_v » Mon Apr 24, 2023 2:02 pm

No matter what then it is certainly a bug in the compiler, that VSI need to fix.
Arne
arne@vajhoej.dk
VMS user since 1986


sms
Master
Posts: 288
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Error by compiling MKK utility

Post by sms » Mon Apr 24, 2023 5:01 pm

Code: Select all

> https://github.com/endlesssoftware/mmk/pull/101

   Thanks for reposting that.  It was posted in one of those
endless-noise topics in comp.os.vms, and I'd lost track of it.

> [...] you might want to make changes like the following to the C
> source:
> [...]

   Before I quit looking, I noticed only the two instances that caused
other problems.  There were others, too, I see.

User avatar

volkerhalle
Master
Posts: 195
Joined: Fri Aug 14, 2020 11:31 am
Reputation: 0
Status: Offline

Re: Error by compiling MKK utility

Post by volkerhalle » Tue Apr 25, 2023 1:55 am

Martin,

is this PGFIPLHI crash reproducable ?

Could you please create a new CLUE file using:

$ ANALYZE/CRASH SYS$SYSTEM:
SDA> READ/EXEC
SDA> CLUE HISTORY/OVERRIDE
SDA> EXIT

These command will make sure, that a line is added to CLUE$HISTORY and will also create a new full CLUE file (in CLUE$COLLECT:CLUE$node_ddmmyy_hhmm.LIS) with hopefully better symbolization. Could you please then mail me the CLUE file ?

Volker.

User avatar

martinv
Master
Posts: 101
Joined: Fri Jun 14, 2019 11:05 pm
Reputation: 0
Location: Goslar, Germany
Status: Offline
Contact:

Re: Error by compiling MKK utility

Post by martinv » Tue Apr 25, 2023 8:42 am

Hi Volker,

no, I have not managed to evoke the system crash again. Now, compiling GET_RDT.C just crashes the C compiler. I'll mail you the CLUE file nonetheless.
Working hard for something we don't care about is called stress;
working hard for something we love is called passion.
(Simon Sinek)


sms
Master
Posts: 288
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Error by compiling MKK utility

Post by sms » Tue Apr 25, 2023 1:49 pm

Code: Select all

> is this PGFIPLHI crash reproducable ?

   Never happened here; only the compiler failure.
Added in 1 hour 16 seconds:

Code: Select all

   Hmmm...  What would I have done differently in this module?  First
try:

V87 $ gdiff  get_rdt.c_orig get_rdt.c
96,97c96
<     extern unsigned int lbr$ini_control(), lbr$open(), lbr$lookup_key();
<     extern unsigned int lbr$set_module(), lbr$close(), lbr$get_index();
---
> #include <lbr$routines.h>
V87 $ 

   Seems to make a world of difference.  You still need all the other
changes in the pull request, of course.  And the compiler bug is still a
compiler bug.

V87 $ mcr [.BIN-x86_64]MMK.EXE /id
%MMK-I-IDENT, this is the MMK Make Utility V5.1
-MMK-I-COPYRIGHT, Copyright (c) 2008, Matthew Madison.
    Copyright (c) 2014, Endless Software Solutions.
  See LICENSE.TXT in distribution kit for license information.

   That's as far as I went, but what could go wrong now?
Added in 8 hours 49 minutes 4 seconds:

Code: Select all

> [...] what could go wrong now?

   Interestingly, the MMK descrip.mms is compatible with MMK, but not
with MMS.  (The .IFNDEF directive (easily cured) and the "|=" operator
(less easily cured) are unknown to MMS.)

   descrip.mms does not (yet) add the /NOWARN work-around to MGLAGS on
x86_64.

Post Reply