You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Øystein Grøvlen (JIRA)" <ji...@apache.org> on 2008/03/07 10:43:46 UTC
[jira] Created: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Log receiver thread fails with NPE at failover when master has died
-------------------------------------------------------------------
Key: DERBY-3508
URL: https://issues.apache.org/jira/browse/DERBY-3508
Project: Derby
Issue Type: Bug
Components: Replication
Affects Versions: 10.4.0.0
Reporter: Øystein Grøvlen
Priority: Minor
Both master and slave embedded in ij.
I kill master and perform failover on slave.
The following is printed in ij:
ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
Note that failover works, and all seems well, so this is not a major issue.
derby.log is as follows:
-------- BEGIN REPLICATION ERROR MESSAGE ---------
Lost connection with the replication master of database 'slaveDB'.
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
--------- END REPLICATION ERROR MESSAGE ----------
Failover perfomed successfully for database 'slaveDB'.
Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jørgen Løland updated DERBY-3508:
---------------------------------
Derby Info: [Patch Available]
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jørgen Løland reassigned DERBY-3508:
------------------------------------
Assignee: Jørgen Løland
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jørgen Løland updated DERBY-3508:
---------------------------------
Attachment: derby-3508-1a.diff
derby-3508-1a.stat
The NPE was caused by the log receiver thread trying to get the port from a closed down ReplicationMessageReceive. Patch v1 fixes the problem.
I don't know how to write a regression test for this bug since the exception is not thrown to the caller of failover and the command succeeds.
All tests (except failures reported in tinderbox) passed, including the replication suite. Requesting review.
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Øystein Grøvlen resolved DERBY-3508.
------------------------------------
Resolution: Fixed
Fix Version/s: 10.4.0.0
Fix merged to the 10.4 branch as revision 636871
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Fix For: 10.4.0.0, 10.5.0.0
>
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Øystein Grøvlen updated DERBY-3508:
-----------------------------------
Fix Version/s: (was: 10.4.0.0)
10.4.1.0
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Fix For: 10.4.1.0, 10.5.0.0
>
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Øystein Grøvlen updated DERBY-3508:
-----------------------------------
Derby Info: (was: [Patch Available])
Fix Version/s: 10.5.0.0
Thanks for the patch Jørgen.
I have tested that I no longer get the NPE stack trace at failover.
Committed as revision 636833.
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Fix For: 10.5.0.0
>
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-3508) Log receiver thread fails with NPE at
failover when master has died
Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jørgen Løland closed DERBY-3508.
--------------------------------
> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>
> Key: DERBY-3508
> URL: https://issues.apache.org/jira/browse/DERBY-3508
> Project: Derby
> Issue Type: Bug
> Components: Replication
> Affects Versions: 10.4.0.0
> Reporter: Øystein Grøvlen
> Assignee: Jørgen Løland
> Priority: Minor
> Fix For: 10.4.0.0, 10.5.0.0
>
> Attachments: derby-3508-1a.diff, derby-3508-1a.stat
>
>
> Both master and slave embedded in ij.
> I kill master and perform failover on slave.
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
> at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
> at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
> at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> -------- BEGIN REPLICATION ERROR MESSAGE ---------
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> --------- END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.