Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#709 closed defect (fixed)

Spurious NPE at Shutdown

Reported by: sponge Owned by: zzz
Priority: minor Milestone: 0.9.2
Component: router/transport Version: 0.9.1
Keywords: NPE Shutdown Cc: zab@…
Parent Tickets:

Description

Seen on android. Corner case?

E/I2P     (19221): Router [Thread-53] Starting final shutdown(3)
E/I2P     (19221): Router [Thread-53] Error shutting down the comm system java.lang.NullPointerException java.lang.NullPointerException
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPEndpoint.clearOutbound(UDPEndpoint.java:160)
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.destroyAll(UDPTransport.java:1153)
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.shutdown(UDPTransport.java:376)
E/I2P     (19221):      at net.i2p.router.transport.udp.UDPTransport.stopListening(UDPTransport.java:1358)
E/I2P     (19221):      at net.i2p.router.transport.TransportManager.stopListening(TransportManager.java:175)
E/I2P     (19221):      at net.i2p.router.transport.TransportManager.shutdown(TransportManager.java:186)
E/I2P     (19221):      at net.i2p.router.transport.CommSystemFacadeImpl.shutdown(CommSystemFacadeImpl.java:64)
E/I2P     (19221):      at net.i2p.router.Router.shutdown2(Router.java:806)
E/I2P     (19221):      at net.i2p.router.Router.shutdown(Router.java:750)
E/I2P     (19221):      at net.i2p.android.router.service.RouterService$Stopper.run(RouterService.java:578)
E/I2P     (19221):      at java.lang.Thread.run(Thread.java:1019)
E/I2P     (19221): Router [Thread-53] Shutdown(3) complete


Subtickets

Change History (4)

comment:1 Changed 7 years ago by zzz

  • Milestone changed from 0.9.3 to 0.9.2

Fixed in 0.9.1-24-rc

comment:2 Changed 7 years ago by zzz

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 7 years ago by zab

  • Cc zab@… added

The change in revision b77be03e354ba8a303d01d36f0b25744a7319370 is an improvement, but a further improvement would be http://pastethis.i2p/show/1905/ . Even that does not prevent all spurious startup & shutdown errors; you need explicit state management (for example with enums) to avoid them. I suspect ticket #710 is a symptom of the same problem.

comment:4 Changed 7 years ago by zzz

Sure. The OP was reported on Android, where shutdown-during-startup is a lot more likely to happen through user and/or OS actions, and the general slowness of the platform. While these are low priority problems, yes we should fix them.

In my i2p.i2p.zzz.test branch I went through and synchronized all the startup/shutdown methods in the router, which should help. Those changes will be probably propped as 0.9.2-1.

Note: See TracTickets for help on using tickets.