Skip to content

otp-1.4.0-shaded.jar does not save (write) big graph to file after building it #3128

@SRN1973

Description

@SRN1973

I realized that the otp-1.4.0-shaded.jar does not write back a calculated Graph.obj when the input files cover a whole country.
(the otp-1.3.0-shaded.jar as well as the otp-2.0-shaded.jar both write the graph as expected)

Input files:

Command to build and save the Graph:
/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx300G -jar otp-1.4.0-shaded.jar --build graphs/current_14
respectively with openjdk-11-jre-headless (I tried both but the result is the same)
java -Xmx300G -jar otp-1.4.0-shaded.jar --build graphs/current_14

Operating System:
Ubuntu 18.04.4 LTS
RAM: 1 TB
120 cernels

Error message of otp:
3:10:31.235 INFO (DirectTransferGenerator.java:100) Done connecting stops to one another. Created a total of 999488 transfers from 348928 stops.
23:10:31.247 INFO (Graph.java:963) Summary (number of each type of annotation):
23:10:31.434 INFO (Graph.java:969) TripDegenerate - 2540
23:10:31.434 INFO (Graph.java:969) NoFutureDates - 3
23:10:31.434 INFO (Graph.java:969) TurnRestrictionBad - 11646
23:10:31.434 INFO (Graph.java:969) RepeatedStops - 1754
23:10:31.434 INFO (Graph.java:969) HopZeroTime - 1152895
23:10:31.434 INFO (Graph.java:969) HopSpeedSlow - 9256
23:10:31.434 INFO (Graph.java:969) StopNotLinkedForTransfers - 54007
23:10:31.434 INFO (Graph.java:969) LevelAmbiguous - 17896
23:10:31.434 INFO (Graph.java:969) HopSpeedFast - 52846
23:10:31.434 INFO (Graph.java:969) StopLinkedTooFar - 3088
23:10:31.435 INFO (Graph.java:969) TurnRestrictionUnknown - 439
23:10:31.435 INFO (Graph.java:969) GraphConnectivity - 81826
23:10:31.435 INFO (Graph.java:969) StopUnlinked - 2950
23:10:31.435 INFO (Graph.java:969) TurnRestrictionException - 1394
23:10:31.435 INFO (Graph.java:969) Graphwide - 1
23:10:40.580 INFO (Graph.java:814) Main graph size: |V|=24870759 |E|=60642402
23:10:40.580 INFO (Graph.java:815) Writing graph /media/vol2/stefan/b/Open_Trip_Planner/graphs/current_14/Graph.obj ...
Exception in thread "main" java.lang.IllegalStateException: com.esotericsoftware.kryo.KryoException: java.lang.NegativeArraySizeException Serialization trace: compactGeometry (org.opentripplanner.routing.edgetype.StreetEdge)
at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:146)
at org.opentripplanner.standalone.OTPMain.run(OTPMain.java:103)
at org.opentripplanner.standalone.OTPMain.main(OTPMain.java:73)
Caused by: com.esotericsoftware.kryo.KryoException: java.lang.NegativeArraySizeException Serialization trace: compactGeometry (org.opentripplanner.routing.edgetype.StreetEdge)
at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:101)
at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:100)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:40)
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)

at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:100)
at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:40)
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
at org.opentripplanner.routing.graph.Graph.save(Graph.java:841)
at org.opentripplanner.routing.graph.Graph.save(Graph.java:817)
at org.opentripplanner.graph_builder.GraphBuilder.run(GraphBuilder.java:144)
... 2 more
Caused by: java.lang.NegativeArraySizeException
at com.esotericsoftware.kryo.util.IdentityObjectIntMap.resize(IdentityObjectIntMap.java:542)
at com.esotericsoftware.kryo.util.IdentityObjectIntMap.putStash(IdentityObjectIntMap.java:306)
at com.esotericsoftware.kryo.util.IdentityObjectIntMap.push(IdentityObjectIntMap.java:300)
at com.esotericsoftware.kryo.util.IdentityObjectIntMap.put(IdentityObjectIntMap.java:162)
at com.esotericsoftware.kryo.util.MapReferenceResolver.addWrittenObject(MapReferenceResolver.java:41)
at com.esotericsoftware.kryo.Kryo.writeReferenceOrNull(Kryo.java:681)
at com.esotericsoftware.kryo.Kryo.writeObjectOrNull(Kryo.java:616)
at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:86)

Metadata

Metadata

Assignees

No one assigned

    Labels

    X OTP1~ Not in use any more ~ Fix or backport to the 1.x version of OTP

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions