eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

sumo simulation StepSegmentation fault with opposite lane overtaking #6015

Open alexdawn opened 5 years ago

alexdawn commented 5 years ago

On hitting play the simulation crashes 18 seconds in at 08:00:18

image

The network itself loads fine both in sumo-gui and NETEDIT. It crashes at the same time division in the non gui sumo.exe with the line StepSegmentation fault= 30.30*RT, ~70030.30UPS, vehicles TOT 2342 ACT 2311 BUF 14) while it might be related to the demand the initial demand file runs fine in DUAROUTER and DFROUTER

Full text in the window:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: sumo-gui.exe
  Application Version:  0.0.0.0
  Application Timestamp:    5cb53208
  Fault Module Name:    sumo-gui.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   5cb53208
  Exception Code:   c0000005
  Exception Offset: 000000000017dfda
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    2057
  Additional Information 1: bff2
  Additional Information 2: bff2ed105620b1528428ba7e259ca8c1
  Additional Information 3: e452
  Additional Information 4: e4523d518a632234a0a6246c48df5a4e

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

And the log file upon loading the sumoconfig file into sumo-gui:

----------------------------------------------------------------------------------------
Loading configuration... done.
Loading net-file from 'C:\Users\adawn\projects\ds-servers\ub-sumo\model_input\oxford\oxfordshire_network.net.xml'... 
Warning: Unequal lengths of neigh lane ':2179_18_0' and lane ':2179_4_0' (21.46, 20.67)
Warning: Unequal lengths of neigh lane ':2181_52_0' and lane ':2181_10_0' (20.93, 20.15)
Warning: Unequal lengths of neigh lane ':2188_26_0' and lane ':2188_8_0' (42.91, 42.30)
Warning: Unequal lengths of neigh lane ':2188_33_0' and lane ':2188_7_0' (41.83, 40.85)
Warning: Unequal lengths of neigh lane ':2188_39_0' and lane ':2188_7_0' (41.83, 40.85)
Warning: Unequal lengths of neigh lane ':2987_22_0' and lane ':2987_6_0' (23.00, 21.95)
Warning: Unequal lengths of neigh lane ':2987_27_0' and lane ':2987_6_0' (23.00, 21.95)
Warning: Unequal lengths of neigh lane ':2990_22_0' and lane ':2990_6_0' (25.29, 24.44)
Warning: Unequal lengths of neigh lane ':2990_27_0' and lane ':2990_6_0' (25.29, 24.44)
Warning: Unequal lengths of neigh lane ':3006_30_0' and lane ':3006_10_0' (29.57, 28.42)
Warning: Unequal lengths of neigh lane ':3006_37_0' and lane ':3006_10_0' (29.57, 28.42)
Warning: Unequal lengths of neigh lane ':3029_116_0' and lane ':3029_36_0' (31.89, 31.15)
Warning: Unequal lengths of neigh lane ':3029_127_0' and lane ':3029_36_0' (31.89, 31.15)
Warning: Unequal lengths of neigh lane ':3056_58_0' and lane ':3056_12_0' (36.61, 35.55)
Warning: Unequal lengths of neigh lane ':3056_67_0' and lane ':3056_12_0' (36.61, 35.55)
Warning: Unequal lengths of neigh lane ':3076_22_0' and lane ':3076_6_0' (21.22, 20.66)
Warning: Unequal lengths of neigh lane ':3076_27_0' and lane ':3076_6_0' (21.22, 20.66)
Warning: Unequal lengths of neigh lane ':3080_46_0' and lane ':3080_8_0' (19.78, 18.77)
Warning: Unequal lengths of neigh lane ':3080_53_0' and lane ':3080_8_0' (19.78, 18.77)
Warning: Unequal lengths of neigh lane ':3088_22_0' and lane ':3088_6_0' (13.60, 12.46)
Warning: Unequal lengths of neigh lane ':3088_27_0' and lane ':3088_6_0' (13.60, 12.46)
Warning: Unequal lengths of neigh lane ':3108_22_0' and lane ':3108_6_0' (20.45, 19.49)
Warning: Unequal lengths of neigh lane ':3108_27_0' and lane ':3108_6_0' (20.45, 19.49)
Warning: Unequal lengths of neigh lane ':3113_58_0' and lane ':3113_12_0' (34.33, 33.98)
Warning: Unequal lengths of neigh lane ':3113_67_0' and lane ':3113_12_0' (34.33, 33.98)
Warning: Unequal lengths of neigh lane ':3142_46_0' and lane ':3142_8_0' (21.13, 20.05)
Warning: Unequal lengths of neigh lane ':3142_53_0' and lane ':3142_8_0' (21.13, 20.05)
Warning: Unequal lengths of neigh lane ':3144_58_0' and lane ':3144_12_0' (39.01, 38.45)
Warning: Unequal lengths of neigh lane ':3144_67_0' and lane ':3144_12_0' (39.01, 38.45)
Warning: Unequal lengths of neigh lane ':3152_58_0' and lane ':3152_12_0' (30.18, 29.31)
Warning: Unequal lengths of neigh lane ':3152_67_0' and lane ':3152_12_0' (30.18, 29.31)
Warning: Unequal lengths of neigh lane ':3168_46_0' and lane ':3168_8_0' (31.21, 30.08)
Warning: Unequal lengths of neigh lane ':3168_53_0' and lane ':3168_8_0' (31.21, 30.08)
Warning: Unequal lengths of neigh lane ':3180_22_0' and lane ':3180_6_0' (14.50, 13.34)
Warning: Unequal lengths of neigh lane ':3180_27_0' and lane ':3180_6_0' (14.50, 13.34)
Warning: Unequal lengths of neigh lane ':3192_76_0' and lane ':3192_30_0' (18.70, 17.78)
Warning: Unequal lengths of neigh lane ':3192_85_0' and lane ':3192_30_0' (18.70, 17.78)
done (3281ms).
Loading additional-files from 'C:\Users\adawn\projects\ds-servers\ub-sumo\model_input\oxford\oxfordshire_network.taz.xml'... done (46ms).
Loading additional-files from 'C:\Users\adawn\projects\ds-servers\ub-sumo\model_input\oxford\oxfordshire_network.poly.xml'... done (5106ms).
Loading done.
namdre commented 5 years ago

please provide all necessary input files for reproducing the crash. It would be preferable if you could cut down the scenario to a smaller version which still crashes. This tool might help: https://sumo.dlr.de/wiki/Tools/Routes#cutRoutes.py

namdre commented 5 years ago

also, please check first whether the crash happens with version 1.3.1 as several crashes have been fixed since 1.2.0

alexdawn commented 5 years ago

I've updated to 1.3.1 and it is still crashing although now at 08:01:21 I'll see if I can still replicate with a reduced network although I haven't come across any issues so far with the smaller model (this is the reduced network with the addition of buffer links and external demand, the smaller model has had no crashes like this)

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: sumo-gui.exe
  Application Version:  0.0.0.0
  Application Timestamp:    5d648982
  Fault Module Name:    sumo-gui.exe
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   5d648982
  Exception Code:   c0000005
  Exception Offset: 0000000000151b60
  OS Version:   6.1.7601.2.1.0.256.48
  Locale ID:    2057
  Additional Information 1: e339
  Additional Information 2: e3399d2a3b619755bbea1f1714ea00f9
  Additional Information 3: 07fd
  Additional Information 4: 07fdb20d0ea47bbbc70c7064615b1bbe

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
alexdawn commented 5 years ago

The simulation runs to completion with just the bus routes files loaded. One of the car trips must be generating the crash somehow? Not the number of trips are only ~900 vehicles are loaded when the crash occurs. Not sure if it can be invalid routes or anything as DAROUTER and MAROUTER run fine?

alexdawn commented 5 years ago

while the clock stops at 28861, there are some logs from 28862 for lane changes but no logs for floating car observers or netstate, for these two the logs cut halfway through a tag in 28861 and for lane changes halfway through a tag in 28862

    <change id="4656.0" type="car" time="28862.00" from=":3900_4_2" to=":3900_4_1" dir="-1" speed="9.49" pos="8.45" reason="strategic|urgent" leaderGap="13.97" leaderSecureGap="10.28" leaderSpeed="9.09" followerGap="None" followerSecureGap="None" followerSpeed="None" origLeaderGap="None" origLeaderSecureGap="None" origLeaderSpeed="None"/>
    <change id="4447.0" type="car" time="28862.00" from="4407.flarex_0" to="4407.flarex_1" dir="1" speed="7.16" pos="5.69" reason="strategic|urgent" leaderGap="None" leaderSecureGap="None" leaderSp
alexdawn commented 5 years ago

aha! @namdre running the model where NETCONVERT has changed to be --opposites.guess false --opposites.guess.fix-lengths false seems to have fixed the crash, which is a big clue to the problem. I've not seen an issue opposite lane overtaking in the smaller model though potentially some of the buffer links in the larger model are very long and have a very high lane count

namdre commented 5 years ago

The warnings in your first log file are intriguing. If you run netconvert with options --opposites.guess true --opposites.guess.fix-lengths true then opposite lanes should all have the same lengths. However, the lanes in the warnings are all internal. Please post all options that were used the build the network of the crashing simulation (you can just copy the header from the .net.xml).

alexdawn commented 5 years ago

Ah I'd grown blind to those warnings, though normally I see them in NETCONVERT not SUMO my arguments were:

    netconvert --node-files="$VAGRANT_MODEL_SSH/$1_network.nod.xml"\
    --edge-files="$VAGRANT_MODEL_SSH/$1_network.edg.xml"\
    --connection-files="$VAGRANT_MODEL_SSH/$1_network.con.xml"\
    --output-file="$VAGRANT_MODEL_SSH/$1_network_without_ghosts.net.xml"\
    --type-files="$VAGRANT_MODEL_SSH/$1_network.typ.xml" --proj.utm\
    --plain.extend-edge-shape\
    --lefthand\
    --sidewalks.guess false --crossings.guess false\
    --default.crossing-width 2.0\
    --sidewalks.guess.from-permissions false\
    --sidewalks.guess.max-speed 21.9 --sidewalks.guess.min-speed 0.0\
    --opposites.guess true --opposites.guess.fix-lengths true\
    --junctions.scurve-stretch 1\
    --no-turnarounds.except-deadend true\
    --log="$VAGRANT_MODEL_SSH/$1_netconvert.log" &&\
    netconvert --sumo-net-file="$VAGRANT_MODEL_SSH/$1_network_without_ghosts.net.xml"\
    --output-file="$VAGRANT_MODEL_SSH/$1_network.net.xml"\
    --edge-files="$VAGRANT_MODEL_SSH/$1_network_patch-ghosts.edg.xml"
namdre commented 5 years ago

Please check whether sumo also warns about Unequal lengths of neigh lane when you load the network after the first netconvert call.

alexdawn commented 5 years ago

Looking over the network I've discovered I'd been generating multiple links with the same from and to values in this outer area. These duplicate edges might be responsible for the odd behaviour

namdre commented 5 years ago

If you can put together a small failure example I'll be happy to check it out.