java.lang.StackOverflowError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • QuickFIX/J Jira
    via by Unknown author,
  • QuickFIX/J Jira
    via by Unknown author,
  • This issue is probably related to QFJ-379: http://www.quickfixj.org/jira/browse/QFJ-379 We noticed that a stack overflow can occur when QuickFIX is processing a very large number of queued messages. From the event log file (edited to make the situation clearer): MsgSeqNum too high, expecting 1430 but received 4937 MsgSeqNum too high, expecting 1430 but received 4938 Received SequenceReset FROM: 1430 TO: 1939 [...] Processing queued message: 4030, pending: [1432, 1433, 1434, ..., 1939, 4031, 4032, ..., 4937, 4938] null java.lang.StackOverflowError at java.nio.Buffer.<init>(Buffer.java:176) at java.nio.ByteBuffer.<init>(ByteBuffer.java:259) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52) at java.nio.ByteBuffer.wrap(ByteBuffer.java:350) at java.nio.ByteBuffer.wrap(ByteBuffer.java:373) at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339) at java.lang.StringCoding.encode(StringCoding.java:378) at java.lang.String.getBytes(String.java:812) [... application code ...] at XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219) at quickfix.Session.fromCallback(Session.java:1314) at quickfix.Session.verify(Session.java:1272) at quickfix.Session.verify(Session.java:1343) at quickfix.Session.next(Session.java:742) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) [....] at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) Is anyone able to offer any suggestions? I think the next/nextQueued functions may be excessively recursive, which will cause a stack overflow error if the queue of messages to be processed is extremely large. I also tried with a thread stack size of 128K, 256K, 512K (-Xss VM option) but see the same problem.
    via by JamesM,
  • This issue is probably related to QFJ-379: http://www.quickfixj.org/jira/browse/QFJ-379 We noticed that a stack overflow can occur when QuickFIX is processing a very large number of queued messages. From the event log file (edited to make the situation clearer): MsgSeqNum too high, expecting 1430 but received 4937 MsgSeqNum too high, expecting 1430 but received 4938 Received SequenceReset FROM: 1430 TO: 1939 [...] Processing queued message: 4030, pending: [1432, 1433, 1434, ..., 1939, 4031, 4032, ..., 4937, 4938] null java.lang.StackOverflowError at java.nio.Buffer.<init>(Buffer.java:176) at java.nio.ByteBuffer.<init>(ByteBuffer.java:259) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52) at java.nio.ByteBuffer.wrap(ByteBuffer.java:350) at java.nio.ByteBuffer.wrap(ByteBuffer.java:373) at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339) at java.lang.StringCoding.encode(StringCoding.java:378) at java.lang.String.getBytes(String.java:812) [... application code ...] at XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219) at quickfix.Session.fromCallback(Session.java:1314) at quickfix.Session.verify(Session.java:1272) at quickfix.Session.verify(Session.java:1343) at quickfix.Session.next(Session.java:742) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) [....] at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) Is anyone able to offer any suggestions? I think the next/nextQueued functions may be excessively recursive, which will cause a stack overflow error if the queue of messages to be processed is extremely large. I also tried with a thread stack size of 128K, 256K, 512K (-Xss VM option) but see the same problem.
    via by JamesM,
  • GitHub comment 804#144745230
    via GitHub by jediwhale
    ,
  • GitHub comment 789#292584138
    via GitHub by lydiam
    ,
  • Jenkins users - java.lang.StackOverflowError
    via by Unknown author,
    • java.lang.StackOverflowError at java.nio.Buffer.<init>(Buffer.java:176) at java.nio.ByteBuffer.<init>(ByteBuffer.java:259) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52) at java.nio.ByteBuffer.wrap(ByteBuffer.java:350) at java.nio.ByteBuffer.wrap(ByteBuffer.java:373) at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339) at java.lang.StringCoding.encode(StringCoding.java:378) at java.lang.String.getBytes(String.java:812)[... application code ...] at XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219) at quickfix.Session.fromCallback(Session.java:1314) at quickfix.Session.verify(Session.java:1272) at quickfix.Session.verify(Session.java:1343) at quickfix.Session.next(Session.java:742) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796)[....] at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570)
    No Bugmate found.