#1482

[Bug] OOM crashes (30–35 GB) & worker hangs

Openaastr000opened 2d ago

What happened?

Setup:

Version: 1.10.1-beta through 1.10.1-beta.dev.529

Map data: Overture 2026-11-18.0

Specs: Windows 11, Ryzen 7 7700, 32 GB RAM, RTX 2070 Super, BeamNG 0.40.6

What's happening: When loading into Miami near KMIA (25.79044, -80.15468) with Max RAM set to Auto (18.7 GB), the server blows past its RAM cap, climbs to 30–35 GB across 15–20 worker processes, and crashes Windows/DWM and earthd with MemoryErrors.

Three specific issues found in the logs:

Single road worker leaking ~10 GB in grading.py / roadwidth.py (with expGradeGuard on): Even with road signs disabled, one road worker hit 9,979 MB while stuck for 60+ seconds on cell 14/4542/6975 (inside grading._lower_underpasses -> roads._measured_widths -> roadwidth.measure_many). Turning off expGradeGuard and manually capping Max RAM to 12 GB stopped the leak and let that cell build in ~18 seconds.

townentry.py (roadSigns) 619 MiB MemoryError & 77s worker hang: In Miami, earthd.townsigns hits "ValueError: 6786 cells in the box (max 4096)" in mapcells.py and tries to allocate an 81,075,200-element array (619 MiB per worker) in townentry.py (communes -> with_agglomerations), triggering OOM crashes. Even in sparse Yakutsk, Russia (62.05749, 129.70783), townentry.py (_pieces) stalled all 4 road geotiles (112760_36516) for 77.9 seconds.

TypeError in furniture.py on Miami road tile (36344, 55813): Fails 5 builds in a row on Overture 2026-11-18.0 with "TypeError: only 0-dimensional arrays can be converted to Python scalars" in furniture.py line 684 (junction_props).

Steps to reproduce

Launch BeamNG.Earth (1.10.1-beta or 1.10.1-beta.dev.529) using Overture 2026-11-18.0 map data on a 32 GB RAM Windows 11 system.

In BeamNG.Earth Settings, leave Max RAM for BeamNG.Earth on Auto (18.7 GB) and enable experimental switches roadSigns and expGradeGuard.

Load into Freeroam > BeamNG.Earth and spawn or teleport to Miami near KMIA (25.79044, -80.15468).

Wait ~60–90 seconds while surrounding road and far-field tiles generate.

Observed result: Total memory across earthd worker processes ignores the 18.7 GB ceiling and spikes to 30–35 GB (with a single road worker hitting ~9.9 GB in grading.py / roadwidth.py on cell 14/4542/6975 and townentry.py attempting 619 MiB allocations), triggering MemoryError exceptions and crashing earthd / Windows DWM.

Workaround: Setting Max RAM manually to 12 GB and disabling expGradeGuard and roadSigns keeps server memory under ~13.9 GB and lets cell 14/4542/6975 finish in ~18 seconds without crashing.

Location

25.79044, -80.15468

Logs

already overwritten at this point unfortunately

Hardware / settings

undefined

Screenshots

No response

Activity

1
aastr0002d ago

Update: Confirmed that townentry.py still runs and triggers the 619 MiB MemoryError even when roadSigns is disabled.When teleporting slightly south to Homestead (25.44000, -80.48000) with Max RAM set to 12 GB, expGradeGuard off, and roadSigns off (BNE_ROADSIGNS not set), roads.py:13974 (build_tile) still calls townentry.rows(), hitting ValueError: 6786 cells in the box (max 4096) and failing with:numpy._core._exceptions._ArrayMemoryError: Unable to allocate 619. MiB for an array with shape (81075200,) and data type int64Along with late worker processes ballooning to 8949 MB and 7231 MB, total server memory spiked to 34,941 MB across 24 processes despite the 12 GB cap, exhausting a 32 GB RAM + 32 GB pagefile commit limit (51 MB available).Also spotted a minor path error in the same run (ValueError: The system cannot find the path specified. (os error 3) in countrybounds.py:34 -> signstream.py:113 for Highway signs) after clearing the cache.

all of this is written by an LLM helping me troubleshoot, can't be bothered to do it myself. it should be good enough to be useful.