Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Compiler crashing while compilation
Compiler crashing while compilation [message #1729798] Tue, 19 April 2016 07:42 Go to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

I'm trying to compile a ttcn suite. While compilation the compiler is crashing with the following error message:
FATAL ERROR: /home/sameer/titan-5.4.3/Install/bin/compiler: In line 4556 of TtcnTemplate.cc: Template::needs_temp_ref()
make: *** [compile] Aborted (core dumped)


I'm attaching the compilation log file.
Please help.

Thanks
  • Attachment: make.log
    (Size: 183.05KB, Downloaded 50 times)
Re: Compiler crashing while compilation [message #1729799 is a reply to message #1729798] Tue, 19 April 2016 07:45 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

we need the TTCN code in order to be able to help; please try to reproduce the fault at small scale if you don't want to send the whole bunch.

Best regards
Elemer
Re: Compiler crashing while compilation [message #1729802 is a reply to message #1729798] Tue, 19 April 2016 07:56 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 53
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,

1. Without source file we cannot fix the problem. Could you attach it, pls?
2. Is it reproducible ?
3. send us the output of command "make diag" or at least the output of cmd "compiler -v"

BR
Jeno
Re: Compiler crashing while compilation [message #1729807 is a reply to message #1729802] Tue, 19 April 2016 08:48 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

I'm trying to reproduce the issue in a small script. I'll post it as soon as I'm able to do it.
The output of compiler -v is:
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/5 R4D
Build date: Apr 19 2016 13:31:20
Compiled with: GCC 4.8.2

Copyright (c) 2000-2015 Ericsson Telecom AB


Thanks
Re: Compiler crashing while compilation [message #1730026 is a reply to message #1729807] Thu, 21 April 2016 04:24 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

In order to identify the said problem, I'm trying to run the compiler in debug mode using gdb.
I added the -g option to the file titan.core-5.4.3/Makefile.cfg in the followling line:
COMPILERFLAGS := -Wall -g


But even after this when I run
gdb compiler
gdb says Quote:
no debugging symbols found


Is there a way to run the compiler in debug mode so that I can examine few variables of compiler and know which part of my script may be causing the problem?

Thanks
Re: Compiler crashing while compilation [message #1730032 is a reply to message #1730026] Thu, 21 April 2016 06:03 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

The compiler is crashing while code generation.
Is there some way to know the code getting generated at the time of crash corresponds to which part of the TTCN script?

Thanks
Re: Compiler crashing while compilation [message #1730042 is a reply to message #1730032] Thu, 21 April 2016 07:07 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

-g is not exactly a debug option of the compiler , and it does not have much to do with gdb;
I understand the error appears during compilation, so you don't want to debug the created executable (which does not yet exist), but the compiler itself;
Certainly no debug option of the compiler will be of any help as that will refer to the created executable.


So if you want to pursue this line, you might want to build the compiler in debug mode with gdb from source. For that you will have to download the source from github and
modify the referring Makefile accordingly. There's a good chance indeed gdb will show you the problematic area.

Best regards
Elemer





Re: Compiler crashing while compilation [message #1730052 is a reply to message #1730042] Thu, 21 April 2016 07:48 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

I asked around , and building in debug mode and debugging the compiler is more wizardry than science;
probably the best bet is to try to reduce the code somehow, and send it to us.



Best regards
Elemer
Re: Compiler crashing while compilation [message #1730060 is a reply to message #1730052] Thu, 21 April 2016 08:11 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the insight.
I'm working on identifying the point of problem in TTCN so that I can reproduce the issue in a small script and share.

Thanks
Re: Compiler crashing while compilation [message #1730063 is a reply to message #1730060] Thu, 21 April 2016 08:34 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,
Sorry,
I was wrong about the -g , my misunderstanding; however it's a bit more complicated to build in debug mode and it's even more complicated to make it work.


BR Elemer

Re: Compiler crashing while compilation [message #1730068 is a reply to message #1730063] Thu, 21 April 2016 09:09 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I've found the issue.

For the following asn definition:
HCS-ServingCellInformation ::=		SEQUENCE {
	hcs-PRIO							HCS-PRIO							DEFAULT 0,
	q-HCS								Q-HCS								DEFAULT 0,
	t-CR-Max							T-CRMax								OPTIONAL
}


Following initialization was done in ttcn template:
...
...
            hcs_ServingCellInformation :=             {
                hcs_PRIO := 2,
                q_HCS := 35,
                t_CR_Max :=  -     // Problem
            }
...
...


It worked with the following change:
...
...
            hcs_ServingCellInformation :=             {
                hcs_PRIO := 2,
                q_HCS := 35,
                t_CR_Max :=  omit       // Changed - to omit. 
            }
...
...


I found the point of problem by putting a print in the compiler code at the point of crash and printed the name of the template.

Thanks
Re: Compiler crashing while compilation [message #1730085 is a reply to message #1730068] Thu, 21 April 2016 10:31 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

OK , in general "-" is not supported as replacement of omit.
In the short term, we will generate an error message at compilation; a new release is expected mid-May so that will already contain the fix.


Thank you for your efforts

Best regards
Elemer



Re: Compiler crashing while compilation [message #1730165 is a reply to message #1730085] Fri, 22 April 2016 04:15 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the info.
Can you let me know if use of "-" instead of "omit" for optional fields is valid TTCN or not?

Thanks
Re: Compiler crashing while compilation [message #1730185 is a reply to message #1730165] Fri, 22 April 2016 07:08 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,
no,

using "-" (don't change) is semantically equivalent with implicitly unspecifying a field:

var MyRecordType MyVariable:= //assignment notation
 {
 field1 := '11001'B,
 // field2 implicitly unspecified
 field3 := "A string"
 }
 // Or
var MyRecordType MyVariable:= //assignment notation
 {
 field1 := '11001'B,
 field2 := -, // field2 explicitly unspecified
 field3 := "A string"
 } 



see the below example:

Types.asn

Types DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

HCS-ServingCellInformation ::=		SEQUENCE {
	hcs-PRIO							INTEGER							DEFAULT 0,
	q-HCS								INTEGER								DEFAULT 0,
	t-CR-Max							INTEGER								OPTIONAL
}

END


ASNExample.ttcn

module ASNExample {

	/* import types from ASN.1 */
	import from Types language "ASN.1:1997" all;


 template  HCS_ServingCellInformation hcs_ServingCellInformation :=             {
                hcs_PRIO := 2,
                q_HCS := 35//,
               // t_CR_Max :=  -     // Problem
            }


 template  HCS_ServingCellInformation hcs_ServingCellInformation2 :=             {
                hcs_PRIO := 2,
                q_HCS := 35,
                t_CR_Max :=  1
            }


control {


 var  HCS_ServingCellInformation v_ServingCellInformation1 :=             {
                hcs_PRIO := 2,
                q_HCS := 35,
                t_CR_Max :=  1
            }




v_ServingCellInformation1 :=             {
                hcs_PRIO := 2,
                q_HCS := 35//,
                //t_CR_Max :=  -
            }

 template  HCS_ServingCellInformation hcs_ServingCellInformation3  modifies hcs_ServingCellInformation2:=             {
                hcs_PRIO := 2,
                q_HCS := 35//,
               // t_CR_Max :=  -     // Problem
            }


log(hcs_ServingCellInformation)

log(v_ServingCellInformation1)

log(hcs_ServingCellInformation2)
log(hcs_ServingCellInformation3)

}

}




with the result:
08:50:38.060412 TTCN-3 Main Test Component started on esekilxxen1843. Version: CRL 113 200/5 R4D.
08:50:38.060550 TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=No; LogEventTypes:=No; SourceInfoFormat:=None; *.FileMask:=LOG_ALL; *.ConsoleMask:=ACTION | ERROR | TESTCASE | STATISTICS | WARNING; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error
08:50:38.060673 Connected to MC.
08:50:38.068448 Executing control part of module ASNExample.
08:50:38.068512 Execution of control part in module ASNExample started.
08:50:38.068592 { hcs_PRIO := 2, q_HCS := 35, t_CR_Max := <uninitialized template> }
08:50:38.069707 { hcs_PRIO := 2, q_HCS := 35, t_CR_Max := 1 }
08:50:38.069732 { hcs_PRIO := 2, q_HCS := 35, t_CR_Max := 1 }
08:50:38.069749 { hcs_PRIO := 2, q_HCS := 35, t_CR_Max := 1 }
08:50:38.069768 Execution of control part in module ASNExample finished.
08:50:38.076377 Verdict statistics: 0 none, 0 pass, 0 inconc, 0 fail, 0 error.
08:50:38.076435 Test execution summary: 0 test case was executed. Overall verdict: none
08:50:38.076456 Exit was requested from MC. Terminating MTC.



So for the moment I'd recommend you remove the fields using "-".


I expect we should have a solution soon though, probably next week.


Best regards
Elemer









Re: Compiler crashing while compilation [message #1730192 is a reply to message #1730185] Fri, 22 April 2016 08:12 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the detailed explanation.
Re: Compiler crashing while compilation [message #1730360 is a reply to message #1730192] Mon, 25 April 2016 09:44 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,
did you have time maybe to look into the endorsement we have talked about? It comes with absolutely no commitment from your side;
on the other hand we are now requested to collect case studies relevant to open sourcing Titan, and I believe your area is quite relevant.

Thank you and best regards
Elemer


Previous Topic:Problem titan HelloWorld example in eclipse
Next Topic:Ubuntu 16.04 is out, a new release of Eclipse Titan follows shortly
Goto Forum:
  


Current Time: Wed Sep 19 02:47:35 GMT 2018

Powered by FUDForum. Page generated in 0.02569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top