Jump to content

Update "Enable logging for Plastic SCM" article to send client logs to %APPDATA%?


Recommended Posts

Hi,

some time ago I activated detailed logging for cm.exe & plastic.exe following instructions here.

Since then I have updated my Plastic SCM version a couple of times over. Today I accidentally installed the non-Cloud version, but then installed the Cloud version.

After this, both plastic.exe and cm.exe lost write access to the C:\Program Files\PlasticSCM5\client folder. For cm.exe this results in no logfile being written; for plastic.exe it results in strange tech hangs during some operations, and callstacks like these when you break in with WinDBG:

Quote

0:000> !PrintException
Exception object: 00000000052a0b88
Exception type:   System.UnauthorizedAccessException
Message:          Access to the path 'C:\Program Files\PlasticSCM5\client\plastic20180326-15.log.txt' is denied.
InnerException:   <none>
StackTrace (generated):
<none>
StackTraceString: <none>
HResult: 80070005

0:000> !clrstack
OS Thread Id: 0x1ac (0)
        Child SP               IP Call Site
0000000000d5e258 00007ffeeba44008 [HelperMethodFrame: 0000000000d5e258] 
0000000000d5e340 00007ffeda142ae1 System.IO.__Error.WinIOError(Int32, System.String) [f:\dd\ndp\clr\src\BCL\system\io\__error.cs @ 160]
0000000000d5e390 00007ffeda191c8b System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean) [f:\dd\ndp\clr\src\BCL\system\io\filestream.cs @ 880]
0000000000d5e490 00007ffeda18eccb System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare) [f:\dd\ndp\clr\src\BCL\system\io\filestream.cs @ 527]
0000000000d5e540 00007ffececb6e48 *** WARNING: Unable to verify checksum for C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\log4net\5c9f1d0c33dda2bd3cd0379fcef6427c\log4net.ni.dll
*** ERROR: Module load completed but symbols could not be loaded for C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\log4net\5c9f1d0c33dda2bd3cd0379fcef6427c\log4net.ni.dll
log4net.Appender.FileAppender+LockingModelBase.CreateStream(System.String, Boolean, System.IO.FileShare)
0000000000d5e5c0 00007ffececb6f92 log4net.Appender.FileAppender+ExclusiveLock.OpenFile(System.String, Boolean, System.Text.Encoding)
0000000000d5e620 00007ffececb6502 log4net.Appender.FileAppender.OpenFile(System.String, Boolean)
0000000000d5e690 00007ffececba066 log4net.Appender.RollingFileAppender.OpenFile(System.String, Boolean)
0000000000d5e6f0 00007ffececb621b log4net.Appender.FileAppender.SafeOpenFile(System.String, Boolean)
0000000000d5e750 00007ffececb5e27 log4net.Appender.FileAppender.ActivateOptions()
0000000000d5e7a0 00007ffececd4d03 log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(System.Xml.XmlElement)
0000000000d5e840 00007ffececd484f log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindAppenderByReference(System.Xml.XmlElement)
0000000000d5e8b0 00007ffececd5238 log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseChildrenOfLoggerElement(System.Xml.XmlElement, log4net.Repository.Hierarchy.Logger, Boolean)
0000000000d5e920 00007ffececd50f6 log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRoot(System.Xml.XmlElement)
0000000000d5e980 00007ffececd43c4 log4net.Repository.Hierarchy.XmlHierarchyConfigurator.Configure(System.Xml.XmlElement)
0000000000d5ea00 00007ffececd25f4 log4net.Repository.Hierarchy.Hierarchy.XmlRepositoryConfigure(System.Xml.XmlElement)
0000000000d5ea70 00007ffececc3cd5 log4net.Config.XmlConfigurator.InternalConfigureFromXml(log4net.Repository.ILoggerRepository, System.Xml.XmlElement)
0000000000d5eac0 00007ffececc3629 log4net.Config.XmlConfigurator.InternalConfigure(log4net.Repository.ILoggerRepository, System.IO.Stream)
0000000000d5eb30 00007ffececc2d5a log4net.Config.XmlConfigurator.InternalConfigure(log4net.Repository.ILoggerRepository, System.IO.FileInfo)
0000000000d5eb90 00007ffececc28c2 log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)
0000000000d5ec00 00007ffec8087dfc *** WARNING: Unable to verify checksum for C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\plastic\90608e846a2919892f756afc40ac8bfc\plastic.ni.exe
*** ERROR: Module load completed but symbols could not be loaded for C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\plastic\90608e846a2919892f756afc40ac8bfc\plastic.ni.exe
xk.a()
0000000000d5ec50 00007ffec8087a3b xk.a(System.String[])
0000000000d5eee0 00007ffedbb95863 [GCFrame: 0000000000d5eee0] 

It took a long time to trace the strange GUI behaviour back to "after upgrade, the client application was no longer allowed to write logfiles into c:\program files".

 

I suggest that you update the Logging article: provide example config files that write clientside log files to ${LOCALAPPDATA}\plastic4\logs - I have attached updated the example conf files - and change the article text to indicate the new location where client-side logs get written.

 

(This is not a problem for the server, as that will be run as Local System account.)

 

cm.log.conf

 

plastic.log.conf

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...