bugCERTI - Bugs: bug #20727, Syntax error on valid file?

 
 

bug #20727: Syntax error on valid file?

Submitter:  Eric NOULARD <erk>
Submitted:  Thu 09 Aug 2007 06:17:29 AM UTC
   
 
Category:  CERTI Severity:  * 3 - Normal
Item Group:  HLA compliance error Status:  Ready For Test
Privacy:  Public Assigned to:  erk
Open/Closed:  Closed Release:  * 3.2.4
Reproducibility:  Every Time Fixed Release:  * 3.2.5
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 30 Aug 2007 03:09:31 AM UTC, comment #10: 

I tried it out and the file is now completely parsed without errors.

Thanks for your help!

Jeff <zaphod46>
Wed 29 Aug 2007 01:13:44 PM UTC, comment #9: 

I think I found the bug.
This was in the FED parser.
When we found parameter inherited from mother interaction
class there was "temporary" buggy handle number
which leads to the problem.

The fix is in CVS.
Could you update your CVS tree and retry?

PS: I did try to compile delta3d examples but it is
    not really as easy a running  SCons, a lot of
    UNDETECTED third party libraries are used
    even if SCons did not discovered they were not here...

Eric NOULARD <erk>
Group administrator
Wed 22 Aug 2007 02:45:35 AM UTC, comment #8: 

Here is the backtrace from the current CVS HEAD:

(gdb) run
Starting program: /home/jeff/delta3d/bin/testHLA
[Thread debugging using libthread_db enabled]
[New Thread 47967147130320 (LWP 13142)]
[New Thread 1082616128 (LWP 13146)]
terminate called after throwing an instance of 'RTI::RTIinternalError'

Program received signal SIGABRT, Aborted.
[Switching to Thread 47967147130320 (LWP 13142)]
0x00002ba036840885 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00002ba036840885 in raise () from /lib/libc.so.6
#1  0x00002ba036841b3e in abort () from /lib/libc.so.6
#2  0x00002ba03646c4f4 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#3  0x00002ba03646a676 in ?? ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#4  0x00002ba03646a6a3 in std::terminate ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#5  0x00002ba03646a78a in __cxa_throw ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#6  0x00002ba03629a137 in RTIambPrivateRefs::processException (
    this=<value optimized out>, msg=0x7fff772fcbb0) at RTIambPrivateRefs.cc:435
#7  0x00002ba03629b955 in RTIambPrivateRefs::executeService (this=0x5939f0,
    req=0x7fff772fdbc0, rep=0x7fff772fcbb0) at RTIambPrivateRefs.cc:86
#8  0x00002ba036297d01 in RTI::RTIambassador::createFederationExecution (
    this=0x5913a0, executionName=0x66ca68 "dtCore",
    FED=0x67a228 ".//examples/data/RPR-FOM.fed") at RTIambassador.cc:541
#9  0x00002ba033ed4bfb in dtHLA::RTIConnection::JoinFederationExecution (
    this=0x591300, executionName=@0x7fff772fef00, fedFilename=@0x7fff772feef0,
    federateName=@0x7fff772feee0) at src/dtHLA/rticonnection.cpp:184
#10 0x0000000000404e02 in TestHLAApp::Config (this=0x550e30)
    at examples/testHLA/testhla.cpp:169
#11 0x0000000000403198 in main (argc=1, argv=0x7fff772ff108)
    at examples/testHLA/testhla.cpp:188

Jeff <zaphod46>
Wed 15 Aug 2007 10:21:33 PM UTC, comment #7: 

Ack. your last message.
I'm currently on vacation.
I will come back on this issue in a week or so.
Thank you for going this deep.

RTI::RTIinternalError should be something that is
not implemented (yet).

If you have time to go farther you may try the same test
with the CVS version of CERTI which includes some missing
feature like receive order policy.
You may retrieve the current CVS version with the following
command:

cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/certi co certi

Eric NOULARD <erk>
Group administrator
Mon 13 Aug 2007 05:37:20 AM UTC, comment #6: 

Here is the trace on testHLA:

(gdb) run
Starting program: /home/jeff/delta3d/bin/testHLA
[Thread debugging using libthread_db enabled]
[New Thread 47183520793040 (LWP 15389)]
[New Thread 1082616128 (LWP 15393)]
terminate called after throwing an instance of 'RTI::RTIinternalError'

Program received signal SIGABRT, Aborted.
[Switching to Thread 47183520793040 (LWP 15389)]
0x00002ae9c2cfa885 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00002ae9c2cfa885 in raise () from /lib/libc.so.6
#1  0x00002ae9c2cfbb3e in abort () from /lib/libc.so.6
#2  0x00002ae9c29264f4 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#3  0x00002ae9c2924676 in ?? ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#4  0x00002ae9c29246a3 in std::terminate ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#5  0x00002ae9c292478a in __cxa_throw ()
   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libstdc++.so.6
#6  0x00002ae9c274e42c in RTIambPrivateRefs::processException ()
   from /usr/local/lib/libRTI.so.1
#7  0x00002ae9c274efd3 in RTIambPrivateRefs::executeService ()
   from /usr/local/lib/libRTI.so.1
#8  0x00002ae9c2748109 in RTI::RTIambassador::createFederationExecution ()
   from /usr/local/lib/libRTI.so.1
#9  0x00002ae9c0320bfb in dtHLA::RTIConnection::JoinFederationExecution (
    this=0x5911c0, executionName=@0x7fffeaeb1ae0, fedFilename=@0x7fffeaeb1ad0,
    federateName=@0x7fffeaeb1ac0) at src/dtHLA/rticonnection.cpp:184
#10 0x0000000000404e02 in TestHLAApp::Config (this=0x552800)
    at examples/testHLA/testhla.cpp:169
#11 0x0000000000403198 in main (argc=1, argv=0x7fffeaeb1ce8)
    at examples/testHLA/testhla.cpp:188
(gdb)

The referenced files can all be viewed here: http://delta3d.svn.sourceforge.net/viewvc/delta3d/tags/REL-1.5.0/

The fed file is in examples/data/RPR-FOM.fed at that same URL.

The exception occured after line 488 appeared on the RTIG output. Then I told testHLA to continue and got this:

(gdb) next
Single stepping until exit from function raise,
which has no line number information.

RTIA has thrown NetworkError exception.
Reason: Connection closed by client.
 UDP Socket 11 : total =         0b sent
 UDP Socket 11 : total =         0b received
 TCP Socket 10 : total =       166b sent
 TCP Socket 10 : total =        68b received

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
(gdb)

Line 489 was printed on the RTIG output at the same time.

Jeff <zaphod46>
Sat 11 Aug 2007 05:16:55 PM UTC, comment #5: 

When running the patch, I also get the RTIInternalError.  Basically, it exhibits exactly the same behavior as the modified FED file does.

Thanks for the advice, I will run the testHLA in a debugger and get back to you with better info.

Delta3d takes a bit of tweaking to get running under Linux. I will try the debugger first to spare you the headache.

Jeff <zaphod46>
Sat 11 Aug 2007 01:17:21 PM UTC, comment #4: 


>Thank you for your help.  I tried using this file and
> RTIG just stops as soon as it gets to the offending
> line.  My client spits out the following:
>
> ~/delta3d $ ./bin/testHLA terminate called after
> throwing an instance of 'RTI::RTIinternalError'
> Aborted
> ~/delta3d $ RTIA has thrown NetworkError exception.
> Reason: Connection closed by client.


Another error may be thrown on the RTIG console
you should look at it when lauching your federate.

>
> I tried, for simplicity, just deleting the offending
> lines completely and the whole FED file is parsed.
> The
> client then crashes with an RTI::NameNotFound.


Which is normal :))
The federation now lacks the interaction parameter
you've just deleted :=))


> I get the same results if I apply the patch that you provided.


Same result as what?
'RTI::RTIinternalError'
or
'RTI::NameNotFound'
or
the primary parse error.

If it is the parse error you should continue
to tweak the syntax.yy in order to get the parsing
right.
After that, you "MAY" get RTI::Internal Error
then the next step should be to run testHLA inside a debugger
in order to track the exception.
When you have the exception traceback put it here
on the tracker and I will try to help you to get it fixed.

> From the little I know of syntax descriptions, the YY
> file seems to include the proper case.  Is there any
> way I could get more information about the error that
> it is throwing?  I already compile with
> YYERROR_VERBOSE defined.


The parser won't give you more information than
something like
"unexpected CLASS, expecting R_PAR"


If you want me to be able to reproduce your bug
may be you can explain me how to reproduce it form the ground up.

0) how to install delta3d (configure option used etc...)
1) how to launch the test

Thank you for this CRETI bug hunting session.

Eric NOULARD <erk>
Group administrator
Fri 10 Aug 2007 01:55:39 PM UTC, comment #3: 

I've just checked-in the patch to CERTI CVS
since I did test it with the billard
application with no regression.

However I really need a test with delta3D, I personally
do not have time to do it myself.

Forty Nine would you be able to do the test?

Eric NOULARD <erk>
Group administrator
Thu 09 Aug 2007 07:27:46 AM UTC, comment #2: 

Would you please try to:

1) apply the attached patch to your CERTI-3.2.4 tree
   cd certi
   patch -p0 < patch-20727-erk-v1.patch
2) recompile CERTI
3) re-install
4) re-run your test with the original   
   RPR-FOM.fed from delta3d.org

(file #13626)

Eric NOULARD <erk>
Group administrator
Thu 09 Aug 2007 07:10:38 AM UTC, comment #1: 

I think I found a workaround.
Would you try to replace the RPR-FOM.fed file
with the one attached to the tracker.


(file #13625)

Eric NOULARD <erk>
Group administrator
Thu 09 Aug 2007 06:17:29 AM UTC, original submission:  

A CERTI reported a fed parser error when using
http://www.delta3d.org provided fed file:

See Delta3D forum too:
Delta3D Forum

the file is:
delta3d_1.5.0/examples/data/RPR-FOM.fed

Original message may be found on the CERTI-devel ML archive:
http://lists.nongnu.org/archive/html/certi-devel/2007-08/msg00000.html

This seems to be a CERTI bug located in the fed parser
grammar definition which does not accept
"some case" of nested interaction class.

See the lex/yacc grammar file:
http://cvs.savannah.nongnu.org/viewvc/certi/libCERTI/syntax.yy?revision=3.3&root=certi&view=markup

Eric NOULARD <erk>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #13626:  patch-20727-erk-v1.patch added by erk (562B - text/x-patch - Authorize parameter list + class list without security level spec)
file #13625:  RPR-FOM-CERTI.fed added by erk (25KiB - application/octet-stream - Modified fed file with unwanted Sec_Level (should be harmless))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zaphod46 (Posted a comment)
  • -email is unavailable- added by erk (Submitted the item)
  •  

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-19 erk Open/ClosedOpen Closed
        Fixed ReleaseCVS 3.2.5
    2007-08-29 erk StatusIn Progress Ready For Test
    2007-08-11 erk StatusReady For Test In Progress
    2007-08-10 erk StatusIn Progress Ready For Test
        Fixed ReleaseUnknown CVS
    2007-08-09 erk Attached File- Added patch-20727-erk-v1.patch, #13626
    2007-08-09 erk Attached File- Added RPR-FOM-CERTI.fed, #13625
    2007-08-09 erk Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code