[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] installer/common servinstlib.cpp,1.19,1.20
From:       dcollins () helixcommunity ! org
Date:       2011-02-15 0:34:36
Message-ID: 201102150034.p1F0YSpa026685 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/installer/common
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv14869/server/installer/common

Modified Files:
	servinstlib.cpp 
Log Message:
Synopsis
========
Fixes PR 269341: Installation errors for 64 bit Solaris 10, Server and Proxy (take II)

Branches: HEAD, SERVER_14_2_RN
Reviewer: Chytanya


Description
===========

In some cases, the sub-processes that print the "installer busy" dots
was not terminating correctly, and instead returning back to the caller.
This resulted in two processes attempting to delete/chmod/rename files,
and the resulting error messages.  I used instrumentation to verify
that this was happening.  The problem is inconsistent and does not
happen every time.

The cause of this problem appears to be either a compiler optimization
going awry, or a compiler bug.  It would not repro with a debug build.
With optimizations, the StartPrintingDots() routine would sometimes return
without actually calling _exit().  Then two processes would proceeed to
delete/chmod/chown/rename various files, getting in each other's way.

The main fix is that I rearranged the logic in the routine, which seems
to have enabled the compiler to generate code more like was intended.

I also added a couple of alternate ways to ensure the subprocess exits.
These should never get triggered (and didn't with the above changes)
but they are there as an added safety net.

With the attached changes, I've done at least 20 installs and have
not triggered the issue.  On the same box it would happen nearly
every time before.


Files Affected
==============

server/installer/common/servinstlib.cpp
server/installer/common/util/consoleui.cpp


Testing Performed
=================

Unit Tests:
- N/A

Integration Tests:
- Verified fix on 64-bit Solaris
- Verified installer still functional on RHEL5/x86_64

Leak Tests:
- N/A

Performance Tests:
- N/A

Platforms Tested: sunos-5.10-sparc64, linux-rhel5-x86_64
Builds Verified: sunos-5.10-sparc64, linux-rhel5-x86_64

QA Hints
========
- The code modified only gets used on Unix platforms, not Windows.



Index: servinstlib.cpp
===================================================================
RCS file: /cvsroot/server/installer/common/servinstlib.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- servinstlib.cpp	11 Feb 2011 00:52:05 -0000	1.19
+++ servinstlib.cpp	15 Feb 2011 00:34:34 -0000	1.20
@@ -1178,6 +1178,7 @@
         pCUI->StopPrintingDots();
         pCUI->ShowMessage("\nDone.\n\n");
     }
+
     exit(nErr);
 }
 #else
@@ -1190,13 +1191,17 @@
 #endif // _CONSOLE
 
 
+/************************************************************************
+ * ServerInstaller::System - a wrapper/replacement for system()
+ */
 int
 ServerInstaller::System(const char* szCmd)
 {
     if(!m_bSilent)
     {
-        xprintf (("\nexecuting: %s\n", szCmd));
+        xprintf (("\n[%d]: executing: %s\n", getpid(), szCmd));
     }
+
     return system(szCmd);
 }
 


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic