Skip to content

Commit

Permalink
Increase DTV_SURPLUS to 32 (needed by Fireworks)
Browse files Browse the repository at this point in the history
Test case: $CMSSW_RELEASE_BASE/python/Fireworks/Geometry/dumpSimGeometry_cfg.py

dlopen() fails with:

    pluginFireworksGeometryTGeoMgrFromDddPlugin.so because dlopen:
    cannot load any more object with static TLS

This happens because DTV_SURPLUS is set to 14 and we attempt to initialize
TLS for /usr/lib64/libGL.so.1 which is above DTV_SURPLUS.

This should be resolved starting RHEL/CentOS 7.2.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
  • Loading branch information
davidlt committed Nov 30, 2015
1 parent 10968b0 commit 2c052e0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions sysdeps/generic/ldsodefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,18 @@ struct rtld_global
have to iterate beyond the first element in the slotinfo list. */
#define TLS_SLOTINFO_SURPLUS (62)

/* Number of additional slots in the dtv allocated. */
#define DTV_SURPLUS (14)
/* Number of additional allocated dtv slots. This was initially
14, but problems with python, MESA, and X11's uses of static TLS meant
that most distributions were very close to this limit when they loaded
dynamically interpreted languages that used graphics. The simplest
solution was to roughly double the number of slots. The actual static
image space usage was relatively small, for example in MESA you
had only two dispatch pointers for a total of 16 bytes. If we hit up
against this limit again we should start a campaign with the
distributions to coordinate the usage of static TLS. Any user of this
resource is effectively coordinating a global resource since this
surplus is allocated for each thread at startup. */
#define DTV_SURPLUS (32)

/* Initial dtv of the main thread, not allocated with normal malloc. */
EXTERN void *_dl_initial_dtv;
Expand Down

0 comments on commit 2c052e0

Please sign in to comment.