{"action":"closed","issue":{"url":"https://api.github.com/repos/real-logic/Aeron/issues/96","labels_url":"https://api.github.com/repos/real-logic/Aeron/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/real-logic/Aeron/issues/96/comments","events_url":"https://api.github.com/repos/real-logic/Aeron/issues/96/events","html_url":"https://github.com/real-logic/Aeron/issues/96","id":69636843,"number":96,"title":"IndexOutOfBoundsException on PublisherTool upon restart","user":{"login":"strangelydim","id":2837339,"avatar_url":"https://avatars.githubusercontent.com/u/2837339?v=3","gravatar_id":"","url":"https://api.github.com/users/strangelydim","html_url":"https://github.com/strangelydim","followers_url":"https://api.github.com/users/strangelydim/followers","following_url":"https://api.github.com/users/strangelydim/following{/other_user}","gists_url":"https://api.github.com/users/strangelydim/gists{/gist_id}","starred_url":"https://api.github.com/users/strangelydim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strangelydim/subscriptions","organizations_url":"https://api.github.com/users/strangelydim/orgs","repos_url":"https://api.github.com/users/strangelydim/repos","events_url":"https://api.github.com/users/strangelydim/events{/privacy}","received_events_url":"https://api.github.com/users/strangelydim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/real-logic/Aeron/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/real-logic/Aeron/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-20T17:24:09Z","updated_at":"2015-06-30T16:42:23Z","closed_at":"2015-06-30T16:42:23Z","body":"If I start SubscriberTool (with an embedded driver, embedded vs. not probably doesn't matter here):\r\n\r\n```\r\n$ java -cp aeron-tools/build/libs/tools.jar uk.co.real_logic.aeron.tools.SubscriberTool --driver=embedded\r\n```\r\n\r\nand then start PublisherTool:\r\n\r\n```\r\n$ java -cp aeron-tools/build/libs/tools.jar uk.co.real_logic.aeron.tools.PublisherTool\r\n```\r\n\r\nAll is well.  However, if I then kill PublisherTool and restart it right away (sometimes it takes a handful of kills/restarts), then it'll often fail with this:\r\n\r\n```\r\njava.lang.IndexOutOfBoundsException: index=16777208, length=24, capacity=16777216\r\n\tat uk.co.real_logic.agrona.concurrent.UnsafeBuffer.boundsCheck(UnsafeBuffer.java:795)\r\n\tat uk.co.real_logic.agrona.concurrent.UnsafeBuffer.putBytes(UnsafeBuffer.java:724)\r\n\tat uk.co.real_logic.aeron.common.concurrent.logbuffer.LogAppender.appendPaddingFrame(LogAppender.java:304)\r\n\tat uk.co.real_logic.aeron.common.concurrent.logbuffer.LogAppender.appendUnfragmentedMessage(LogAppender.java:216)\r\n\tat uk.co.real_logic.aeron.common.concurrent.logbuffer.LogAppender.append(LogAppender.java:142)\r\n\tat uk.co.real_logic.aeron.Publication.offer(Publication.java:192)\r\n\tat uk.co.real_logic.aeron.tools.PublisherTool$PublisherThread.onNext(PublisherTool.java:433)\r\n\tat uk.co.real_logic.aeron.tools.RateController$SecondsAtBitsPerSecondInternal.sendNext(RateController.java:495)\r\n\tat uk.co.real_logic.aeron.tools.RateController.next(RateController.java:63)\r\n\tat uk.co.real_logic.aeron.tools.PublisherTool$PublisherThread.run(PublisherTool.java:372)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```\r\n\r\nNote that PublisherTool, with all default options, will be using the exact same channel, stream ID, _and session ID_ each time it starts up.  (Always udp://localhost:31111#1[1])."}}