Opened 7 years ago

Closed 5 years ago

#633 closed defect (fixed)

segfaults cause i2p to not be able to restart

Reported by: sponge Owned by: zzz
Priority: major Milestone: 0.9.10
Component: wrapper Version: 0.9
Keywords: segfault router.ping restart Cc:
Parent Tickets: Sensitive: no

Description

When a segfault happens, and the router does not exit cleanly and the wrapper detects this, but is not able to restart because router.ping exists. When the router exits unexpectedly like this, the wrapper should delete the router.ping file so that it can restart.

Example:

 #
 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  SIGSEGV (0xb) at pc=0xb6fe118c, pid=31505, tid=2740644720
 #
 # JRE version: 6.0_30-b12
 # Java VM: Java HotSpot(TM) Server VM (20.5-b03 mixed mode linux-x86 )
 # Problematic frame:
 # V  [libjvm.so+0x62e18c]
   PSPromotionManager::copy_to_survivor_space(oopDesc*)+0x17c
 #
 # An error report file with more information is saved as:
 # /usr/local/i2p/hs_err_pid31505.log
 #
 # If you would like to submit a bug report, please visit:
 #   http://java.sun.com/webapps/bugreport/crash.jsp
 #
 JVM exited unexpectedly.
 Launching a JVM...
 Wrapper (Version 3.1.1) http://wrapper.tanukisoftware.org

 Starting I2P 0.8.13-25
 ERROR: There appears to be another router already running!
        Please make sure to shut down old instances before starting up
        a new one.  If you are positive that no other instance is running,
        please delete the file /usr/local/i2p/router.ping
 <-- Wrapper Stopped

This happens on occasion here. Not sure exactly what the problem is, but I am suspecting a bad RAM module…

Subtickets

Change History (5)

comment:1 Changed 7 years ago by zzz

Getting the wrapper to delete the file might be hard.

Two other possible fixes (at Router.java line 232):

1) Use a different exit value than -1, so that the wrapper will wait and try again;

2) Sleep and retest the file in a loop for a couple minutes, as the file won't get re-touched if the previous router has crashed, so the timestamp will become old enough

comment:2 Changed 6 years ago by str4d

Milestone: 0.9.1

comment:3 Changed 6 years ago by zzz

Milestone: 0.9.10
Status: newaccepted

I will implement 2)

comment:4 Changed 6 years ago by zzz

Status: acceptedtesting

In 6263bb149b8301059d0471bcc1d47caeca660f4e i2p.i2p.zzz.test2 to be propped for 0.9.10

comment:5 Changed 5 years ago by zzz

Resolution: fixed
Status: testingclosed
Note: See TracTickets for help on using tickets.