DDS 9th topic 导致崩溃
DDS 9th topic causes a crash
我正在为 java
应用程序使用 DDS
(更具体地说是 RTI DDS
)。我正在代码中为我的 DDS
实现一个一个地创建每个 topic
,因此我可以在编写代码后用 DDS spy
测试每个。当我写第 8 个 topic
时一切正常。然而,当我写第 9 个 topic
时,似乎什么也没有发生,因为程序似乎在某个地方停止了。然后我进行了调试,并在多次进入代码后,将其打印给了委员会。
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x01349a58, pid=16109, tid=2429123440
#
# JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17)
# Java VM: Java HotSpot(TM) Server VM (24.65-b04 mixed mode linux-x86 )
# Problematic frame:
# V [libjvm.so+0x48aa58] java_lang_String::utf8_length(oopDesc*)+0x58
#
# Core dump written. Default location: /home/foo/core or core.16109
#
# An error report file with more information is saved as:
#
# /home/foo/corehs_err_pid16109.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
[D0000|ENABLE]COMMENDSrReaderService_new:!create worker-specific object
[D0000|ENABLE]PRESPsService_enable:!create srr (strict reliable reader)
[D0000|ENABLE]DDS_DomainParticipantService_enable:!enable publish/subscribe service
[D0000|ENABLE]DDS_DomainParticipant_enableI:!enable service
我不确定为什么在我创建第 9 个 topic
时突然发生这种情况,但如果我只有 8 个,效果很好。我也尝试增加 resourcelimits
并得到 Immutable QOS Policy
错误。有谁知道为什么我的第 9 个 topic
会导致失败以及如何解决这个问题?我是 运行 我在 32 bit RHEL 6.6
上的申请。
我发现这是因为 max objects per thread
默认情况下被 qos
设置为 8。要更改此设置,在创建第一个主题之前,您必须执行以下操作。
DomainParticipantFactoryQos factoryQos =
new DomainParticipantFactoryQos();
DomainParticipantFactory.TheParticipantFactory.get_qos(factoryQos);
factoryQos.resource_limits.max_objects_per_thread = 2048;
DomainParticipantFactory.TheParticipantFactory.set_qos(factoryQos);
这会在 DDS 启动之前设置大小,因此在那时是可编辑的而不是不可变的。
我正在为 java
应用程序使用 DDS
(更具体地说是 RTI DDS
)。我正在代码中为我的 DDS
实现一个一个地创建每个 topic
,因此我可以在编写代码后用 DDS spy
测试每个。当我写第 8 个 topic
时一切正常。然而,当我写第 9 个 topic
时,似乎什么也没有发生,因为程序似乎在某个地方停止了。然后我进行了调试,并在多次进入代码后,将其打印给了委员会。
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x01349a58, pid=16109, tid=2429123440
#
# JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17)
# Java VM: Java HotSpot(TM) Server VM (24.65-b04 mixed mode linux-x86 )
# Problematic frame:
# V [libjvm.so+0x48aa58] java_lang_String::utf8_length(oopDesc*)+0x58
#
# Core dump written. Default location: /home/foo/core or core.16109
#
# An error report file with more information is saved as:
#
# /home/foo/corehs_err_pid16109.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
[D0000|ENABLE]COMMENDSrReaderService_new:!create worker-specific object
[D0000|ENABLE]PRESPsService_enable:!create srr (strict reliable reader)
[D0000|ENABLE]DDS_DomainParticipantService_enable:!enable publish/subscribe service
[D0000|ENABLE]DDS_DomainParticipant_enableI:!enable service
我不确定为什么在我创建第 9 个 topic
时突然发生这种情况,但如果我只有 8 个,效果很好。我也尝试增加 resourcelimits
并得到 Immutable QOS Policy
错误。有谁知道为什么我的第 9 个 topic
会导致失败以及如何解决这个问题?我是 运行 我在 32 bit RHEL 6.6
上的申请。
我发现这是因为 max objects per thread
默认情况下被 qos
设置为 8。要更改此设置,在创建第一个主题之前,您必须执行以下操作。
DomainParticipantFactoryQos factoryQos =
new DomainParticipantFactoryQos();
DomainParticipantFactory.TheParticipantFactory.get_qos(factoryQos);
factoryQos.resource_limits.max_objects_per_thread = 2048;
DomainParticipantFactory.TheParticipantFactory.set_qos(factoryQos);
这会在 DDS 启动之前设置大小,因此在那时是可编辑的而不是不可变的。