[ace-users] Catching up from old releases
Mehlos, Andrew (GE Healthcare)
Andrew.S.Mehlos at ge.com
Fri Nov 18 17:14:38 CST 2016
Template included below, but I think this is more of a general question about ACE_TSS changes from long (long, long, long.. ) ago -- we're running into some issues during thread shutdown that we didn't see in the older (ACE 5.2.1) version -- details are under SYNOPSIS.
ACE VERSION: 6.4.0
HOST MACHINE and OPERATING SYSTEM:
Linux 3.13.0-45-generic x86_64
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
Linux 4.8.0 armv7l
COMPILER NAME AND VERSION (AND PATCHLEVEL):
gcc-5.3.0 (cross compiler)
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
platform_linux.GNU (with static_libs=1 added)
ACE_TSS issues during thread shutdown
DOES THE PROBLEM AFFECT:
On Unix systems, did you run make realclean first? N/A
OTHER (please specify)? Shutdown
Code base originally used ACE 5.2.1 , but we're trying to get caught up and move to 6.4.0. It seems the TSS implementation changed around quite a bit a little later in the ACE 5.x series.
Startup and normal runtime seem just fine -- the general problem we're seeing with 6.4 that we didn't have in 5.2 seems isolated to shutdown as threads are terminating -- in the core dumps w hit the problem when the ACE_TSS::cleanup() calls delete()-- in 5.2.1, the ACE_TSS destructor just called thr_key_detach(), but it looks much more involved now and calls the ::cleanup(). This, combined with the mention in TSS_T.h about
* When the ACE_TSS object is destroyed, all threads's instances of the
* data are deleted.
...makes me think that this is probably on the right track, but I'm a little confused what the statement above means, because it seems awfully drastic to delete every thread's version of an object because a single thread deleted theirs. That, plus the fact that everything seems to work normally until threads start shutting down, makes me think I'm totally misinterpreting that..
Going through the ML archives, I didn't find anything that looked too related, but I was having trouble trying to dig up posts prior to around 2006 or so. I did come across this one ( https://groups.google.com/forum/#!topic/comp.soft-sys.ace/ubxOReXuGa0 ) which mentioned...
> Do ACE_TSS objects only work correctly for threads that are
> from ACE_Task_Base?
No, but there are cases where it does depend on threads being spawned
by ACE rather than native APIs.
We _do_ create threads by calling pthread_create() -- could this be one of those cases?
So, the general question I have is "Does anyone remember migrating code around the time this change happened in ACE or have any tips or suggestions around the TSS changes from 10 years ago?" (I realize this is a bit of a long shot, but figured it can't hurt to ask before trying to come up with example code to illustrate what we're seeing that will compile with both 5.2.1 and 6.4.0..)
Any assistance would be greatly appreciated.
More information about the ace-users