Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D80CC200CDA for ; Fri, 4 Aug 2017 13:01:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D473D16B78E; Fri, 4 Aug 2017 11:01:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2C73C16B137 for ; Fri, 4 Aug 2017 13:01:09 +0200 (CEST) Received: (qmail 40957 invoked by uid 500); 4 Aug 2017 11:01:08 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 40946 invoked by uid 99); 4 Aug 2017 11:01:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2017 11:01:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C5FDF1807EE for ; Fri, 4 Aug 2017 11:01:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id mygnlK8V32S5 for ; Fri, 4 Aug 2017 11:01:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CBA8761125 for ; Fri, 4 Aug 2017 11:01:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 56117E0041 for ; Fri, 4 Aug 2017 11:01:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 109B22462A for ; Fri, 4 Aug 2017 11:01:00 +0000 (UTC) Date: Fri, 4 Aug 2017 11:01:00 +0000 (UTC) From: "Geoff Macartney (JIRA)" To: dev@brooklyn.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-526) Laptop crash (?) caused empty files in persisted state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 04 Aug 2017 11:01:10 -0000 [ https://issues.apache.org/jira/browse/BROOKLYN-526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114242#comment-16114242 ] Geoff Macartney commented on BROOKLYN-526: ------------------------------------------ We probably need to do a file system {{sync}} before we do the move (maybe after as well!). Looks like {{Streams.copy()}} only does an {{output.flush()}}; maybe it should also do an {{output.getFD().sync()}} too. > 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)