Synchronization problem in message queue mechanism
antohecezar at yahoo.com
Fri Aug 23 08:24:57 UTC 2013
Thanks a lot for the posting, I think what you have simulated there is exactly one of our problem manifestations. Indeed, after that pointer is NULL in _Thread_queue_Process_timeout, the system state is invalid and probably other bad manifestations we've seen, start to appear.
One question, please, if it's ok with you - for a fast fix, what would you suggest, either verify that pointer for NULL and return immediately, if it's invalid, or wait for a fixing patch from you guys ?
Or maybe disable interrupts altogether during the function call duration ? Would the NULL verification / interrupt disabling have negative impacts elsewhere ?
Again, we are no experts in RTEMS, so sorry if my questions may not seem valid.
Thanks a lot, cheers,
From: Sebastian Huber <sebastian.huber at embedded-brains.de>
To: rtems-users at rtems.org
Sent: Thursday, August 22, 2013 6:37 PM
Subject: Re: Synchronization problem in message queue mechanism
for a test case please have a look at the attached patch. If I run this test
on a simulator I get:
(gdb) b threadqprocesstimeout.c:42 if the_thread_queue == 0
Breakpoint 3 at 0x201da00: file
*** TEST INTERRUPT CRITICAL SECTION 20 ***
Support - rtems_timer_create - creating timer 1
Breakpoint 3, _Thread_queue_Process_timeout (the_thread=0x2046b00) at
42 if ( the_thread_queue->sync_state !=
(gdb) p the_thread_queue
$1 = (Thread_queue_Control *) 0x0
So we have a NULL pointer access in _Thread_queue_Process_timeout(). This
destroys the system state.
On real systems the sequence in the test case can happen with nested interrupts
which interrupt the clock tick handler (this is a common setup).
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
rtems-users mailing list
rtems-users at rtems.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users