Add a New Comment (Rich Markup)
Fixed on br_jbch_4.0.0 (commit #9827427) and tested under Fedora 23 64 bits (gcc 5.3.1). Works fine.
Ongoing investigation, I am updating the ticket as documentation of current findings. Problem seems to comes from the access right to the memory segment where you need to update Write/Read pointer values. To resume a Ring buffer (from sender to receiver) needs two memory areas. 1) One to read and write the explicit datas 2) One to maintain the Ring Buffer status For 2), the writer AND the reader need RW access to maintain the Ring Buffer status. Problem have to be fixed in: 1) shm_open(..) usage (line 43 in SHMPosix::Open() function) 2) mmap(..) usage (line 92 SHMPosix::Attach() function)
I tried the test case for the SHM Memory communications between complied processus (with CERTI) CertiProcessus_A and CertiProcessus_B. These are located under /CERTI_INSTALL_PATH/bin When you try to run the Posix Ring Buffer SHM test case, then it fails. To reproduce it: ---------------- 1) In Main_SocketSHM.cc, due to Ticket #47597, Change line 63 from "Win32" to "Posix" and recompile CERTI 2) Go to the bin folder and open two terminals (don't forget to "source" CERTI env) 3) In one terminal call:
>> ./CertiProcessus_A
4) In the other terminal call:
>> ./CertiProcessus_B
5) Then Follow the instructions and select "RB" option to use Ring Buffer. Then you must send (command "S") from one process (example A) and read from the other (command "R" for example on B). 6) Then the reader will fail reporting ------------------------------------------------- RingBuffer --> Try to Receive... RingBuffer::Receive(...) --> BEGIN Algorithm : Count_CS = 34 | Write_CS = 16| Read_CS = 0 RingBuffer::Receive(...) --> Utilisation memcpy Simple RingBuffer::Receive(...) --> Adresse Utilisee _Shm_CS->GetShm() = 0x7efcee8b8000| _Shm_CS->GetShm() + _Tab_CS[2] = 0x7efcee8b8000 RingBuffer::Receive(...) --> END Algorithm : Count_CS = 50 | Write_CS = 16| Read_CS = 16 AVANT memcpy(_Pw_Pr_CS->GetShm(), _Tab_CS, 3 * sizeof(int) ) ; !! Segmentation fault (core dumped) ------------------------------------------------- See attached my Logs from CertiProcessus_A and CertiProcessus_B. I am taking this over.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 3 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11