Bug 1229434 - [GSS](6.4.z) HornetQ won’t start if one of the journal files is truncated for any reason
Summary: [GSS](6.4.z) HornetQ won’t start if one of the journal files is truncated for...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.2
Assignee: Tomas Hofman
QA Contact: Miroslav Novak
URL:
Whiteboard:
Depends On:
Blocks: 1196524 1219165
TreeView+ depends on / blocked
 
Reported: 2015-06-08 17:56 UTC by Matthew Robson
Modified: 2019-10-10 09:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker HORNETQ-1479 0 Major Resolved JournalImpl.load() fails if there are truncated files 2018-08-02 07:48:39 UTC

Description Matthew Robson 2015-06-08 17:56:04 UTC
Description of problem:
HornetQ won’t start if one of the journal files is truncated for any reason.  In this case, there was a 0 byte journal file left behind.  This will happen if any file is less then the header-size.

Version-Release number of selected component (if applicable):


How reproducible:
Random.

Steps to Reproduce:
1.
2.
3.

Actual results:

09:14:56,186 SEVERE [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Failure in initialisation: java.nio.BufferUnderflowException
	at java.nio.Buffer.nextGetIndex(Buffer.java:498) [rt.jar:1.7.0_71]
	at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:355) [rt.jar:1.7.0_71]
	at org.hornetq.core.journal.impl.JournalImpl.readFileHeader(JournalImpl.java:2807) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.journal.impl.JournalImpl.orderFiles(JournalImpl.java:399) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1884) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1496) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.journal.impl.JournalImpl.load(JournalImpl.java:1480) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.persistence.impl.journal.JournalStorageManager.loadMessageJournal(JournalStorageManager.java:936) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.server.impl.HornetQServerImpl.loadJournals(HornetQServerImpl.java:1731) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1547) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.server.impl.HornetQServerImpl.access$1200(HornetQServerImpl.java:141) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.server.impl.HornetQServerImpl$SharedStoreLiveActivation.run(HornetQServerImpl.java:2060) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:369) [hornetq-core-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:282) [hornetq-jms-2.2.24.BZ928936.jar:2.2.24.BZ928936 (HQ_2_2_24_BZ928936, 122)]
	at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:73) [jboss-as-messaging-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]



Expected results:
Handle the truncated file gracefully.

Additional info:

Comment 1 JBoss JIRA Server 2015-06-10 13:59:51 UTC
Tomas Hofman <thofman> updated the status of jira HORNETQ-1479 to Coding In Progress

Comment 2 JBoss JIRA Server 2015-06-10 14:00:57 UTC
Tomas Hofman <thofman> updated the status of jira HORNETQ-1479 to Resolved

Comment 6 Miroslav Novak 2015-06-23 09:53:20 UTC
Verified in EAP 6.4.2.CP.CR1.

Comment 7 Petr Penicka 2017-01-17 10:16:28 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 8 Petr Penicka 2017-01-17 10:16:32 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.


Note You need to log in before you can comment on or make changes to this bug.