You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Aled Sage (JIRA)" <ji...@apache.org> on 2017/09/11 08:28:00 UTC

[jira] [Resolved] (BROOKLYN-526) Laptop crash (?) caused empty files in persisted state

     [ https://issues.apache.org/jira/browse/BROOKLYN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aled Sage resolved BROOKLYN-526.
--------------------------------
       Resolution: Fixed
         Assignee: Geoff Macartney
    Fix Version/s: 0.12.0

Marking this as resolved - the two relevant improvements are:
* https://github.com/apache/brooklyn-server/pull/809 (missing call to {{stream.close()}})
* https://github.com/apache/brooklyn-server/pull/791 (to call {{fileDescriptor.sync()}})

However, see the long discussion in https://github.com/apache/brooklyn-server/pull/791 and the useful links, such as https://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html. In brief, we're only waiting for the data to be flushed to the storage device - but that device will likely have its own buffers so this is no guarantee that the relevant block(s) have actually been written to durable storage.

> 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
>            Assignee: Geoff Macartney
>             Fix For: 0.12.0
>
>
> 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)