[RTEMS Project] #2957: Shared memory support internal locking is broken
RTEMS trac
trac at rtems.org
Tue Mar 28 05:50:01 UTC 2017
#2957: Shared memory support internal locking is broken
-----------------------------+----------------------
Reporter: Sebastian Huber | Owner: Gedare
Type: defect | Status: assigned
Priority: normal | Milestone: 4.12
Component: cpukit | Version: 4.12
Severity: normal | Keywords:
-----------------------------+----------------------
The top level lock is an ISR lock (interrupt disable/enable or SMP lock)
and the low level lock is potentially a mutex. The problem is exposed by
test psxshm02:
{{{
#0 _Terminate (the_source=INTERNAL_ERROR_CORE, the_error=31) at
../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:35
#1 0x00111654 in _Internal_error
(core_error=INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT) at
../../../../../../rtems/c/src/../../cpukit/score/src/interr.c:52
#2 0x00117010 in _Thread_Do_dispatch (cpu_self=0x2035c0
<_Per_CPU_Information>, level=1611071955) at
../../../../../../rtems/c/src/../../cpukit/score/src/threaddispatch.c:190
#3 0x0011a568 in _Thread_Dispatch_enable (cpu_self=0x2035c0
<_Per_CPU_Information>) at
../../cpukit/../../../realview_pbx_a9_qemu/lib/include/rtems/score/threaddispatch.h:227
#4 0x0011b6c4 in _Thread_Change_life (clear=THREAD_LIFE_PROTECTED,
set=THREAD_LIFE_PROTECTED, ignore=(unknown: 0)) at
../../../../../../rtems/c/src/../../cpukit/score/src/threadrestart.c:684
#5 0x0011b6ea in _Thread_Set_life_protection
(state=THREAD_LIFE_PROTECTED) at
../../../../../../rtems/c/src/../../cpukit/score/src/threadrestart.c:691
#6 0x0010f3dc in _API_Mutex_Lock (the_mutex=0x2037d8) at
../../../../../../rtems/c/src/../../cpukit/score/src/apimutexlock.c:31
#7 0x001050a0 in _RTEMS_Lock_allocator () at
../../cpukit/../../../realview_pbx_a9_qemu/lib/include/rtems/score/apimutex.h:120
#8 0x00105442 in rtems_heap_allocate_aligned_with_boundary (size=10004,
alignment=0, boundary=0) at
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/malloc_deferred.c:89
#9 0x001055a6 in malloc (size=10004) at
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/malloc.c:39
#10 0x0011e820 in realloc (ptr=0x0, size=10004) at
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/realloc.c:62
#11 0x0010b1a2 in _POSIX_Shm_Object_resize_from_heap (shm_obj=0x204870,
size=10004) at
../../../../../../rtems/c/src/../../cpukit/posix/src/shmheap.c:59
#12 0x0010b6ac in shm_ftruncate (iop=0x202cf8 <rtems_libio_iops+168>,
length=10004) at
../../../../../../rtems/c/src/../../cpukit/posix/src/shmopen.c:83
#13 0x00104cfc in ftruncate (fd=3, length=10004) at
../../../../../../rtems/c/src/../../cpukit/libcsupport/src/ftruncate.c:37
#14 0x001008e0 in POSIX_Init (argument=0x0) at
../../../../../../../rtems/c/src/../../testsuites/psxtests/psxshm02/init.c:54
#15 0x001201ee in _Thread_Entry_adaptor_pointer (executing=0x2041a8) at
../../../../../../rtems/c/src/../../cpukit/score/src/threadentryadaptorpointer.c:25
#16 0x00120302 in _Thread_Handler () at
../../../../../../rtems/c/src/../../cpukit/score/src/threadhandler.c:88
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/2957>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list