热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Carlasegfaultswithin127Episodes

EnvironmentThefollowinghasbeentestedinUbuntuwithCarla0.9.9.4,star


Environment

The following has been tested in Ubuntu with Carla 0.9.9.4, started using

1
CarlaUE4.sh -opengl -quality-level=Low

:

Trigger Code

Consider the following proof of concept code (does not logically make a lot of sense, since it was stripped down from an old version of our reinforcement learning infrastructure to be a minimal reproducer that makes Carla misbehave and crash reliably):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
py

import carla



def update_data(self, data):

    self.data = data



def spawn_and_destroy():

    client = carla.Client("localhost", 2000)

    client.set_timeout(3)

    world = client.load_world("Town04")

    blueprints = world.get_blueprint_library()



    settings = world.get_settings()

    settings.fixed_delta_seconds = 0.05

    settings.synchronous_mode = True

    settings.no_rendering_mode = True

    world.apply_settings(settings)



    car = blueprints.find("vehicle.tesla.model3")

    position = carla.Transform(carla.Location(x=300, y=13.5, z=2), carla.Rotation(yaw=180))

    vehicle = world.spawn_actor(car, position)

    collision_actor = world.spawn_actor(blueprints.find("sensor.other.collision"),

                                                       carla.Transform(carla.Location()),

                                                       attach_to=vehicle)

    collision_actor.listen(update_data)

    lane_actor = world.spawn_actor(blueprints.find("sensor.other.lane_invasion"),

                                                  carla.Transform(),  # carla.Location()),

                                                  attach_to=vehicle)

    vehicle.apply_control(carla.VehicleControl(hand_brake=1))

    lane_actor.listen(update_data)



    for i in range(10):

        try:

            world.tick(1)

        except:

            print("WARNING: tick timed out, continuing ...")



    vehicle.destroy()

    collision_actor.destroy()

    lane_actor.destroy()



for i in range(150):

    print("Episode", i)

    spawn_and_destroy()

Starting Carla and then executing this file reliably produces problems within 127 Episodes here, though the behavior is not always exactly the same, see the following sections.

Crash variant 1

After 127 Episodes the script ends:

1
2
3
4
5
6
7
8
Episode 127

Traceback (most recent call last):

  File "carla-segfault-min.py", line 87, in

    spawn_and_destroy()

  File "carla-segfault-min.py", line 51, in spawn_and_destroy

    client = carla.Client("localhost", 2000)

RuntimeError: resolve: Device or resource busy


and Carla crashes with the following message:

1
2
3
4
5
6
7
8
9
4.24.3-0+++UE4+Release-4.24 518 0

Disabling core dumps.

Signal 11 caught.

Malloc Size=65538 LargeMemoryPoolOffset=65554

CommonUnixCrashHandler: Signal=11

Malloc Size=65535 LargeMemoryPoolOffset=131119

Malloc Size=140864 LargeMemoryPoolOffset=272000

Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.

Segmentation fault (core dumped)

1
2
### Crash variant 2

After Episode 127 the script stops:

Episode 127
Traceback (most recent call last):
File "carla-segfault-min.py", line 55, in
spawn_and_destroy()
File "carla-segfault-min.py", line 19, in spawn_and_destroy
client = carla.Client("localhost", 2000)
RuntimeError: resolve: Device or resource busy

1
and Carla crashes with the following message:

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
LowLevelFatalError [File:Unknown] [Line: 102]
Exception thrown: close: Bad file descriptor
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=140864 LargeMemoryPoolOffset=272000
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

1
2
3
### Crash variant 3



I tested the above script multiple times and at one occurrence Carla already crashed within 27 episodes:

Episode 27
Traceback (most recent call last):
File "carla-segfault-min.py", line 87, in
spawn_and_destroy()
File "carla-segfault-min.py", line 53, in spawn_and_destroy
world = client.load_world("Town04")
RuntimeError: failed to connect to newly created map

1
with the following crash message:

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
terminating with uncaught exception of type std::__1::bad_weak_ptr: bad_weak_ptrCommonUnixCrashHandler: Signal=11

Signal 6 caught.
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=140864 LargeMemoryPoolOffset=272000
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

1
### Crash Variant 4

Episode 38
Traceback (most recent call last):
File "carla-segfault-min.py", line 55, in
spawn_and_destroy()
File "carla-segfault-min.py", line 21, in spawn_and_destroy
world = client.load_world("Town04")
RuntimeError: failed to connect to newly created map

1
 

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=140864 LargeMemoryPoolOffset=272000
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)
```

该提问来源于开源项目:carla-simulator/carla

Our tests suggested that the only issue is the reloading of the map, so we just do not reload it, we just reset our scenarios in the current world. I do not know however if that is feasible for you!





   



推荐阅读
  • Java Socket 关键参数详解与优化建议
    Java Socket 的 API 虽然被广泛使用,但其关键参数的用途却鲜为人知。本文详细解析了 Java Socket 中的重要参数,如 backlog 参数,它用于控制服务器等待连接请求的队列长度。此外,还探讨了其他参数如 SO_TIMEOUT、SO_REUSEADDR 等的配置方法及其对性能的影响,并提供了优化建议,帮助开发者提升网络通信的稳定性和效率。 ... [详细]
  • 在Delphi7下要制作系统托盘,只能制作一个比较简单的系统托盘,因为ShellAPI文件定义的TNotifyIconData结构体是比较早的版本。定义如下:1234 ... [详细]
  • 本文介绍了如何利用Struts1框架构建一个简易的四则运算计算器。通过采用DispatchAction来处理不同类型的计算请求,并使用动态Form来优化开发流程,确保代码的简洁性和可维护性。同时,系统提供了用户友好的错误提示,以增强用户体验。 ... [详细]
  • 本文详细介绍了如何在 Linux 系统上安装 JDK 1.8、MySQL 和 Redis,并提供了相应的环境配置和验证步骤。 ... [详细]
  • 如果应用程序经常播放密集、急促而又短暂的音效(如游戏音效)那么使用MediaPlayer显得有些不太适合了。因为MediaPlayer存在如下缺点:1)延时时间较长,且资源占用率高 ... [详细]
  • JUC(三):深入解析AQS
    本文详细介绍了Java并发工具包中的核心类AQS(AbstractQueuedSynchronizer),包括其基本概念、数据结构、源码分析及核心方法的实现。 ... [详细]
  • javax.mail.search.BodyTerm.matchPart()方法的使用及代码示例 ... [详细]
  • javascript分页类支持页码格式
    前端时间因为项目需要,要对一个产品下所有的附属图片进行分页显示,没考虑ajax一张张请求,所以干脆一次性全部把图片out,然 ... [详细]
  • 本指南介绍了如何在ASP.NET Web应用程序中利用C#和JavaScript实现基于指纹识别的登录系统。通过集成指纹识别技术,用户无需输入传统的登录ID即可完成身份验证,从而提升用户体验和安全性。我们将详细探讨如何配置和部署这一功能,确保系统的稳定性和可靠性。 ... [详细]
  • 本文深入解析了WCF Binding模型中的绑定元素,详细介绍了信道、信道管理器、信道监听器和信道工厂的概念与作用。从对象创建的角度来看,信道管理器负责信道的生成。具体而言,客户端的信道通过信道工厂进行实例化,而服务端则通过信道监听器来接收请求。文章还探讨了这些组件之间的交互机制及其在WCF通信中的重要性。 ... [详细]
  • 使用 ListView 浏览安卓系统中的回收站文件 ... [详细]
  • Keepalived 提供了多种强大且灵活的后端健康检查机制,包括 HTTP_GET、SSL_GET、TCP_CHECK、SMTP_CHECK 和 MISC_CHECK 等多种检测方法。这些健康检查功能确保了高可用性环境中的服务稳定性和可靠性。通过合理配置这些检查方式,可以有效监测后端服务器的状态,及时发现并处理故障,从而提高系统的整体性能和可用性。 ... [详细]
  • 在Android平台中,播放音频的采样率通常固定为44.1kHz,而录音的采样率则固定为8kHz。为了确保音频设备的正常工作,底层驱动必须预先设定这些固定的采样率。当上层应用提供的采样率与这些预设值不匹配时,需要通过重采样(resample)技术来调整采样率,以保证音频数据的正确处理和传输。本文将详细探讨FFMpeg在音频处理中的基础理论及重采样技术的应用。 ... [详细]
  • 在Linux系统中,网络配置是至关重要的任务之一。本文详细解析了Firewalld和Netfilter机制,并探讨了iptables的应用。通过使用`ip addr show`命令来查看网卡IP地址(需要安装`iproute`包),当网卡未分配IP地址或处于关闭状态时,可以通过`ip link set`命令进行配置和激活。此外,文章还介绍了如何利用Firewalld和iptables实现网络流量控制和安全策略管理,为系统管理员提供了实用的操作指南。 ... [详细]
  • 在使用 SQL Server 时,连接故障是用户最常见的问题之一。通常,连接 SQL Server 的方法有两种:一种是通过 SQL Server 自带的客户端工具,例如 SQL Server Management Studio;另一种是通过第三方应用程序或开发工具进行连接。本文将详细分析导致连接故障的常见原因,并提供相应的解决策略,帮助用户有效排除连接问题。 ... [详细]
author-avatar
席钾攀
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有