Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ exception with description "Negative size" thrown #388

Closed
bedding opened this issue Aug 21, 2017 · 5 comments
Closed

C++ exception with description "Negative size" thrown #388

bedding opened this issue Aug 21, 2017 · 5 comments

Comments

@bedding
Copy link

bedding commented Aug 21, 2017

I started the media driver with IPC term buffer size set to 1GB,

-Daeron.ipc.term.buffer.length=1073741824)

I am able to add publication, but when I call findPublication my application always threw the exception with description "Negative size".

Everything worked fine if IPC term buffer size is something less than 1GB. What could cause this problem?

@tmontgomery
Copy link
Contributor

This is Java media driver, correct?

FYI, C++ addPublication is asynchronous. Any errors will come through findPublication.

@tmontgomery
Copy link
Contributor

BTW, what is the error in the ErrorLog?

@bedding
Copy link
Author

bedding commented Aug 21, 2017

Yes it is Java media driver. Following is from the error log,

***
1 observations from 2017-08-21 21:30:42.287+0000 to 2017-08-21 21:30:42.287+0000 for:
 java.lang.IllegalArgumentException: Negative size
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:865)
        at io.aeron.driver.buffer.MappedRawLog.<init>(MappedRawLog.java:63)
        at io.aeron.driver.buffer.RawLogFactory.newInstance(RawLogFactory.java:154)
        at io.aeron.driver.buffer.RawLogFactory.newIpcPublication(RawLogFactory.java:124)
        at io.aeron.driver.DriverConductor.newIpcPublicationLog(DriverConductor.java:798)
        at io.aeron.driver.DriverConductor.addIpcPublication(DriverConductor.java:1038)
        at io.aeron.driver.DriverConductor.getOrAddIpcPublication(DriverConductor.java:1025)
        at io.aeron.driver.DriverConductor.onAddIpcPublication(DriverConductor.java:506)
        at io.aeron.driver.DriverAdapter.addPublication(DriverAdapter.java:198)
        at io.aeron.driver.DriverAdapter.onMessage(DriverAdapter.java:89)
        at org.agrona.concurrent.ringbuffer.ManyToOneRingBuffer.read(ManyToOneRingBuffer.java:158)
        at io.aeron.driver.DriverAdapter.receive(DriverAdapter.java:68)
        at io.aeron.driver.DriverConductor.doWork(DriverConductor.java:146)
        at org.agrona.concurrent.CompositeAgent.doWork(CompositeAgent.java:79)
        at org.agrona.concurrent.AgentRunner.run(AgentRunner.java:140)
        at java.lang.Thread.run(Thread.java:748)


1 distinct errors observed.

@tmontgomery
Copy link
Contributor

Ah. That helps. Thanks. Let me look at it.

@tmontgomery
Copy link
Contributor

I've made 2 changes. One to the Java Media Driver and the other to the C++ API. These seem to work for me. But not doing any real tests besides BasicSubscriber and BasicPublisher.

@mjpt777 mjpt777 closed this as completed Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants