forum.vmspython.org Forum Index forum.vmspython.org
Forum system
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Building a debug image

 
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS
View previous topic :: View next topic  
Author Message
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Mon Feb 07, 2011 9:00 pm    Post subject: Building a debug image Reply with quote

I have the source code and want to build an image that supports the "--debug" option to produce stack trace.

Any hints on what I need to do to do this would be gratefully appreciated.
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Tue Feb 08, 2011 9:02 am    Post subject: Reply with quote

Build from source need MMS, Python, then you can execute the procedure
build_server_64.com on IA64, build_server_32.com on AXP.

Be sure to download 5.1.46 source (latest port on VMS).


JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Tue Feb 08, 2011 12:23 pm    Post subject: Reply with quote

Thanks JF.

I downloaded the latest 5.1.46 kit last night and managed to build it using the compiler: /noop/deb and linker: /deb switches - so I am all set to try and resolve the buggy nature of the foreign keys.

Only curious bug I am getting is during initialisation and the open of the purge index file. [MYSQL_BIN_LOG::set_purge_index_file].

The code ([sql]log.cc) seems to initialise the required extension as ".~rec~" but ends up not being able to find: mysql-bin.~rec~

If I manually change the extension to the latest log file index number (e.g. ".000001" ) then it works fine - so it seems that the reading of mysql-bin.index to get the required number fails.

The code works when I ran it in the non-debug version - so I can only assume I am missing something. Not important but it is irritating me.
Back to top
View user's profile Send private message
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Wed Feb 09, 2011 1:30 am    Post subject: Reply with quote

Hi JF - am having a strange issue with my build of 5.1.46

I am sure it worked before but when I build it now and try a new install by executing the first_start_mysqld procedure, I find it is bombing out on the initialisation of the MySQL database:

Access violation in the function mysql_parse??

Am I missing something obvious. I have tried obvious things like setting privileges etc but can't get it to work.


Code:

$ mysqld --no-defaults --language=/mysql051_root/sql/share/english --bootstrap -
        --log-warnings=0 --loose-skip-innodb  --loose-skip-ndbcluster -
        --datadir=/mysql051_root/data

set storage_engine=myisam;

create database mysql;

use mysql;
--
-- use scripts/mysql_system_tables.sql and
--     scripts/mysql_system_tables_data.sql
--

--
-- The system tables of MySQL Server
--

set sql_mode='';
set storage_engine=myisam;

CREATE TABLE IF NOT EXISTS db (   Host char(60) binary DEFAULT '' NOT NULL, Db c
har(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Se
lect_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_pri
v enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('
N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y')
COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE
utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_gener
al_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEF
AULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT
 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT
NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Cre
ate_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, L
ock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Crea
te_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_vi
ew_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routi
ne_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routin
e_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv
enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N',
'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') CO
LLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY
 User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Databa
se privileges';
%SYSTEM-F-ACCVIO, access violation, reason mask=D0, virtual address=000000000000
001B, PC=0000000000000002, PS=46343649
%TRACE-F-TRACEBACK, symbolic stack dump follows
image     module    routine               line      rel PC           abs PC     
CXXL$64_LANGRTL  CX6L$LRTS_VMS_UNWIND2  _Unwind_Resume
                                         30728 00000000000014D0 FFFFFFFF8514B4D0
MYSQLD  sql_parse  mysql_parse           #8556 000000000001BC32 0000000000A501F2
MYSQLD  sql_parse  handle_bootstrap_impl
                                          #499 0000000000001562 0000000000A35B22
MYSQLD  sql_parse  handle_bootstrap      #3167 00000000000018B2 0000000000A35E72
PTHREAD$RTL  THD_THREAD  thdBase        245139 0000000000005C42 FFFFFFFF84542702
PTHREAD$RTL                                  0 0000000000053C72 FFFFFFFF8451BC72
PTHREAD$RTL  THD_INIT  pthread_main     244841 0000000000000492 FFFFFFFF844F8492
                                             0 FFFFFFFF80B61172 FFFFFFFF80B61172
DCL                                          0 000000000006BAF2 000000007AE27AF2
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
%DCL-W-SKPDAT, image data (records not beginning with "$") ignored
  MYSQL051_SRV job terminated at  8-FEB-2011 23:22:57.17

  Accounting information:
  Buffered I/O count:                204      Peak working set size:      41328
  Direct I/O count:                  106      Peak virtual size:         311808
  Page faults:                      2365      Mounted volumes:                0
  Charged CPU time:        0 00:00:00.27      Elapsed time:       0 00:00:03.24

[/code]
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Wed Feb 09, 2011 10:53 am    Post subject: Reply with quote

Hi,

be sure that you have no link error (undefined symbol).

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Thu Feb 10, 2011 2:29 am    Post subject: Reply with quote

I found the problem.

This is peculiar.

The cause was the fact that the reference to MYSQLParse() in parse_sql was failing.

This function comes from sql_yacc.cc which - as documented elsewhere - appears to have some issues when compiling - and generates the message:

Code:
CXX-I-OPTLIMEXC, optimizer throttling limit exceeded, optimization
          reduced to avoid excessive resource use.  Object is partly
          optimized.  /OPTIMIZE=OVERRIDE_LIMITS will prevent throttling, but
          the compilation may run out of memory or use excessive CPU.
at line number 36350 in file MYSQL051_ROOT:[vms]sql_yacc.cc;


If I recompile this routine with lower optimisation levels and then rebuild the server then the application runs without any problems. From testing it looks like it needs to be /OPTIM=LEVEL=1 or /OPTIM=LEVEL=0 (/NOOPTIM) to get a working version.

Strange that it appears to work in your build with full optimisation. What is the size of the SQL_YACC.OBJ file? In my system I am getting the following sizes according to the level of optimisation:

From the kit: 5072 Blocks FAILED
OPT=OVERRIDE_LIMITS 4023 Blocks FAILED
OPT=LEVEL=2 5188 Blocks FAILED
OPT=NOINLINE 6031 Blocks FAILED
OPT=LEVEL=1 7059 Blocks WORKS
Back to top
View user's profile Send private message
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Thu Feb 10, 2011 4:06 am    Post subject: Reply with quote

One possible cause is my C++ compiler.

Currently I have version 7.2 whereas the latest appears to be 7.4

Are you using 7.4, JF?
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Thu Feb 10, 2011 8:40 am    Post subject: Reply with quote

I'm using C++ 7.4.

The problem with the compilation of sql_yacc.cc is known, but with C++ 7.4 this seem to generate a usable .obj file.

I, also, have has to increase pgflquota a lot.

If I remember correctly, in previous version I used /NOOPTIM.

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Fri Feb 11, 2011 2:37 am    Post subject: Reply with quote

I now have a stable version of 5.1.46 built with SSL 1.3

If anyone wants a copy of the binary - let me know and I will post it on a website for download.
Back to top
View user's profile Send private message
icl



Joined: 26 Oct 2007
Posts: 29
Location: London, UK

PostPosted: Mon Feb 14, 2011 12:04 pm    Post subject: Reply with quote

JF - are there PDF/PTF/PCF files you use for generating a PCSI distribution?

I can't find any with the source code but it would be quite useful for me to make one that I can distribute onto other systems.

P.S. I don't have CXX version 7.4 yet, but I updated my compilers to CC073 and CXX073 and that appears to have fixed the compilation issue.
Back to top
View user's profile Send private message
jfp



Joined: 12 Jul 2004
Posts: 618

PostPosted: Tue Feb 15, 2011 7:54 am    Post subject: Reply with quote

I send you, in a private message, a pointer to download the necessary material.

JF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vmspython.org Forum Index -> MySQL for OpenVMS All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group