| Anonymous | Login | Signup for a new account | 2025-01-23 20:25 UTC | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0000741 | Taste | [All Projects] PolyORB-HI-C | public | 2018-01-19 10:20 | 2018-03-19 16:56 | ||||
| Reporter | maxime | ||||||||
| Assigned To | hugues | ||||||||
| Priority | normal | Severity | major | Reproducibility | have not tried | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Summary | 0000741: Management of queues of size > 1 seems to fail | ||||||||
| Description | If a PI has a queue size greater than 1 : Taste::Associated_Queue_Size => 2; this seems to be badly handled at runtime. The issue is observed in tool-src/Demo_Multi_Instances : two functions call the PI "blah", which has a queue size of 2. However, only one of the two calls seems to be executed, as is the queue index wasn't properly handled. The second call appears once in a while, randomly.. | ||||||||
| Steps To Reproduce | Build Demo_Multi_Instances in the VM run binary.c/binaries/x86_partition click on the MSC button on top of the gui The "blah" message appears with a number that increases. It was expected that each arrow appear twice, since the PI is called with identical content by two separate functions. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
Notes |
|
|
(0003209) hugues (administrator) 2018-02-02 08:24 edited on: 2018-02-02 08:52 |
Can you detail a little bit more the expected scenario. What I observe is Actually, in some cases I see twice blah (x), which should be the expected behaviour Further analysis indicates that the sporadic function is actually called twice, which is expected per the semantics I see in the AADL CV. After that, the code is in the VT generated GUI code. I'd like to annotate it for debug, is it safe to change it and re-run build-script ? |
|
(0003210) maxime (administrator) 2018-02-02 09:23 |
Sure, you can |
|
(0003211) hugues (administrator) 2018-02-02 09:23 |
In addition, I changed the GUI implementation to a basic C code + instrumentation of PolyORB-HI/C. void mygui_PI_blah(const asn1SccMyInteger IN_a) instead of using the mqueue implementation I get this taste@tastevm:~/tool-src/testSuites/Demo_Multi_Instances$ ./binary.c/binaries/x86_partition I have this trace output up to blah:254 then it goes back to 0, which is the behaviour of function 2 and 3 AFAICT (being instances of generic_a.pr SDL) |
|
(0003212) maxime (administrator) 2018-02-02 09:28 |
OK, so you are saying that the message losses are most likely happening somewhere between the taste binary and the GUI itself (ie. in the mqueue handling) ? |
|
(0003213) hugues (administrator) 2018-02-02 09:35 |
My test with a C implementation instead of a GUI one seems to indicate the issue is in the queue management or further in the processing. I suggest you test with C as well to test and confront. I also (quickly) read the code you generate. I see you are using a mutex to protect calls to the queue when communicating with the GUI. But I do not know what is done after, in particular when the message is actually sent. Since I started the GUI with some delay after the x86 partition, I'm kind of curious if we have some bad behaviour there. |
|
(0003214) maxime (administrator) 2018-02-02 09:42 |
Ok I will try to reproduce. Thanks for your investigation, I will check it further (in the plane tonight!) |
|
(0003215) hugues (administrator) 2018-02-02 13:04 |
The mutex is part of the generated code You do that in binary.c/mygui/mygui_polyorb_interface.c (generated AFAICT) void sync_mygui_blah(void *a, size_t a_len) and then .. taste@tastevm:~/tool-src/testSuites/Demo_Multi_Instances$ grep -r mygui_protected *|grep -v aadl|grep -v matches so the mutex is declared in main.c (that I generate), and initialised also by main() through the __po_hi_protected_init () as part of the __po_hi_initialize_early () call note that the mutex is not the issue: this mutex calls the message queue (blah PI) |
|
(0003216) maxime (administrator) 2018-02-02 14:48 |
In this particular project there is only one gui, so it should not be the cause of the problem However you are right, if there is mqueue API shared by all GUIs running on the same node, it should be protected. I will create a separate ticket for that. |
|
(0003270) maxime (administrator) 2018-03-19 16:56 |
Fixed in asn1_value_editor, the bug was in the Python GUI thread polling the message queue. If the same message was received twice, it could be discarded. (commit 2b37465f) |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2018-01-19 10:20 | maxime | New Issue | |
| 2018-01-19 10:20 | maxime | Status |
new => assigned |
| 2018-01-19 10:20 | maxime | Assigned To |
=> hugues |
| 2018-02-02 08:24 | hugues | Note Added: 0003209 | |
| 2018-02-02 08:27 | hugues | Note Edited: 0003209 | View Revisions |
| 2018-02-02 08:52 | hugues | Note Edited: 0003209 | View Revisions |
| 2018-02-02 09:23 | maxime | Note Added: 0003210 | |
| 2018-02-02 09:23 | hugues | Note Added: 0003211 | |
| 2018-02-02 09:28 | maxime | Note Added: 0003212 | |
| 2018-02-02 09:35 | hugues | Note Added: 0003213 | |
| 2018-02-02 09:42 | maxime | Note Added: 0003214 | |
| 2018-02-02 13:04 | hugues | Note Added: 0003215 | |
| 2018-02-02 14:48 | maxime | Note Added: 0003216 | |
| 2018-03-19 16:56 | maxime | Note Added: 0003270 | |
| 2018-03-19 16:56 | maxime | Status |
assigned => resolved |
| 2018-03-19 16:56 | maxime | Resolution |
open => fixed |
| 2018-03-19 16:56 | maxime | Status |
resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |