|
From: Bob F. <bfr...@si...> - 2004-06-03 22:59:16
|
As a followup, if I create a patch containing my updates and apply it
to the released 2.1.1 sources, valgrind gets a lot further through
execution of the program. This implies that the abort I encountered
with the CVS version is peculiar to the CVS version:
--24414-- sys_wait_results: got PX_SetSigmask for TID 2
==24414==
==24414== Invalid read of size 4
==24414== at 0x3C074AA9: (within /lib/librt-2.3.3.so)
==24414== by 0x3C8A200B: pthread_once (vg_libpthread.c:1730)
==24414== by 0x3C074228: timer_create (in /lib/librt-2.3.3.so)
==24414== by 0x808A323: CTimeBox::CreateTimer() (TimeBox.cc:74)
==24414== by 0x808B209: CTimeBox::CTimeBox(char*) (TimeBox.cc:126)
==24414== by 0x809241B: InitializeFunct() (basefuncts.cc:548)
==24414== by 0x809F2EE: main (guiMain.cc:218)
==24414== Address 0x4A is not stack'd, malloc'd or free'd
==24414==
==24414== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==24414== Access not within mapped region at address 0x4A
==24414== at 0x3C074AA9: (within /lib/librt-2.3.3.so)
==24414== by 0x3C8A200B: pthread_once (vg_libpthread.c:1730)
==24414== by 0x3C074228: timer_create (in /lib/librt-2.3.3.so)
==24414== by 0x808A323: CTimeBox::CreateTimer() (TimeBox.cc:74)
==24414== by 0x808B209: CTimeBox::CTimeBox(char*) (TimeBox.cc:126)
==24414== by 0x809241B: InitializeFunct() (basefuncts.cc:548)
==24414== by 0x809F2EE: main (guiMain.cc:218)
This crash does not occur without valgrind, however, it is quite
possible that the related librt/application code is indeed faulty
since the timer notify method the code is using (SIGEV_THREAD) has not
been observed (by me) to be working in this kernel.
The application code executed is:
struct sigevent event;
memset( &event, 0, sizeof( struct sigevent ) );
event.sigev_notify = SIGEV_THREAD;
event.sigev_notify_function = &timer_thread_handler;
event.sigev_value.sival_ptr = this;
timer_create( CLOCK_REALTIME, &event, &timer_id );
where timer_thread_handler is a function, and timer_id is part of the
enclosing C++ class.
Bob
======================================
Bob Friesenhahn
bfr...@si...
http://www.simplesystems.org/users/bfriesen
|