[ 
https://issues.apache.org/jira/browse/BROOKLYN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114254#comment-16114254
 ] 

ASF GitHub Bot commented on BROOKLYN-526:
-----------------------------------------

GitHub user geomacy opened a pull request:

    https://github.com/apache/brooklyn-server/pull/791

    Sync file system on temp file before moving it.

    See https://issues.apache.org/jira/browse/BROOKLYN-526.
    
    This is a suggestion for a fix.  Not sure how to go about testing this!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/geomacy/brooklyn-server brooklyn-526

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/791.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #791
    
----
commit 97dfb9a16abbb4ac7deb0a032b5a46350ca25d9e
Author: Geoff Macartney <[email protected]>
Date:   2017-08-04T11:09:34Z

    Sync file system on temp file before moving it.
    
    See https://issues.apache.org/jira/browse/BROOKLYN-526

----


> Laptop crash (?) caused empty files in persisted state
> ------------------------------------------------------
>
>                 Key: BROOKLYN-526
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-526
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.11.0
>            Reporter: Aled Sage
>
> My mac laptop crashed while Brooklyn was running. After restart the mac, and 
> restarting Brooklyn, I saw exceptions like that below many times:
> {noformat}
> 2017-08-04 09:23:52,889 WARN  122 o.a.b.c.m.r.RebindExceptionHandlerImpl 
> [ooklyn-persister] Rebind: continuing after problem loading memento: memento 
> ielugq12x0 loading raw error
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
> SAXParseException: Premature end of file.
>         at 
> org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:129)[143:org.apache.brooklyn.utils-common:0.12.0.SNAPSHOT]
>         at 
> org.apache.brooklyn.util.core.xstream.XmlUtil.xpath(XmlUtil.java:78)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at 
> org.apache.brooklyn.util.core.xstream.XmlUtil.xpathHandlingIllegalChars(XmlUtil.java:100)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at 
> org.apache.brooklyn.util.core.xstream.XmlUtil.xpathHandlingIllegalChars(XmlUtil.java:87)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at 
> org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore$2.visit(BrooklynMementoPersisterToObjectStore.java:335)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at 
> org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore$1VisitorWrapper.run(BrooklynMementoPersisterToObjectStore.java:528)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
>         at 
> java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
>         at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
> Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 
> Premature end of file.
>         at 
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)[:1.8.0_144]
>         at 
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)[:1.8.0_144]
>         at 
> org.apache.brooklyn.util.core.xstream.XmlUtil.xpath(XmlUtil.java:69)[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         ... 9 more
> {noformat}
> Looking in the persisted state directory, there are a bunch of size-zero 
> files (for 34 enrichers, 4 feeds, 6 locations and 2 policies)!
> The timestamps for these zero-size files are the newest in the persistence 
> directories.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to