Bug 250961

Summary: KSharedDataCache disables shared memory on Solaris due to a MacOS-specific change
Product: [Unmaintained] kdelibs Reporter: Jan Hnatek <jan.hnatek>
Component: kdecoreAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: groot, mpyne
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Workaround for this issue for Solaris builds.

Description Jan Hnatek 2010-09-12 12:40:37 UTC
Created attachment 51558 [details]
Workaround for this issue for Solaris builds.

Version:           unspecified (using KDE 4.5.1) 
OS:                Solaris

Solaris KDE builds (4.5.1 now) typically report a number of kWarnings like:

kded(3718)/kdeui (KIconLoader) /export/home/kdebuild/packages/BUILD/KDElibs-4.5.1/i386/kdelibs-4.5.1/kdecore/util/kshareddatacache.cpp:937: Failed to establish shared memory mapping, will fallback to private memory -- memory usage will increase

This is caused by kshareddatacache.cpp:43-46 (in current trunk):

43 	// Mac OS X, for all its POSIX compliance, does not support timeouts on its mutexes, which
44 	// is kind of a disaster for cross-process support. So, disable support for shared memory
45 	// and add a wrapper implementation.
46 	#if !defined(_POSIX_TIMEOUTS) || !defined(_POSIX_THREADS) || (_POSIX_TIMEOUTS < 200112L) || (_POSIX_THREADS < 200112L) 

On [Open]Solaris we use -D_XPG5 with C++ code and Solaris unistd.h defines _POSIX_THREADS with _XPG5 to 1, not to 200112L as with _XPG6 (which is not recommended for C++ code).

It would be good to enclose the above test to something like #ifdef MACOSX or apply the attached patch.


Reproducible: Always
Comment 1 Andrew Crouthamel 2018-11-05 03:19:52 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-17 05:05:25 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!