Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » Emergency Copyover
Forum Rules | Mark all | Recent Posts

Emergency Copyover
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #21 Apr 17, 2008, 11:21 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

What does SegVio look like?

And why are you using the flag that resets the default signal handler?? See man sigaction for the flag explanations...
       
Post is unread #22 Apr 18, 2008, 5:45 am   Last edited Apr 18, 2008, 5:49 am by Banner
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

Which one should I use? I tried SA_RESTART, and both of them only copy once and then crashes.

man pages:

              SA_RESETHAND
                     Restore  the  signal  action to the default state once the signal handler has been called.  SA_ONESHOT is an obsolete, non-standard synonym
                     for this flag.


SegVio:

static void SegVio(  ) 
{
   char buf[MAX_STRING_LENGTH];
   char bufB[MAX_STRING_LENGTH];
   char *strtime;

   strtime = ctime( &current_time ); 
   strtime[strlen( strtime ) - 1] = '\0';

   log_string( "--- SEGMENTATION VIOLATION ---" );

   sprintf( buf, "%slastcmd.log", LOG_DIR );
  
   /*
    * Stops logging at 5 megs
    */
   if( file_size( buf ) < 5000000 )
   {
      sprintf( bufB, "%s :: %s", strtime, lastplayercmd );   
      append_to_file( buf, bufB );
   }

   log_string( lastplayercmd );

   // Are we allowing an emergancy copyover?   
   if( !sysdata.ECOPYOVER )
   {
      log_string( "Emereancy copyover not enabled. Shutting down." );
   }
   else if( emergancy_copy == TRUE )
   { 
      emergancy_copyover(  );
      log_string( "Emergency copyover not ready. Shutting down." );
   }
   else
   {
      log_string( "Emergency copyover not ready. Shutting down." );
   }
    
   abort(  );
}
       
Post is unread #23 Apr 18, 2008, 9:02 am   Last edited Apr 18, 2008, 9:03 am by David Haley
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

OK: let's go back to basics here. You need to register the signal handlers at the beginning of the new execution of the program. That will be after the call to 'exec' in emergancy_copyover (sic). But after temporally, not literally in the code: after the call to 'exec' the current process is fully replaced by the new one.

So, you should trace through the start of the code and see where the signal handler is normally registered. See if that line is executed after a copyover, e.g. put a printf around it. If not, then you need to register the handler during a copyover boot.

EDIT:
as for the flag, try using no flag at all. You certainly don't want to be using a one shot or reset flag! :wink:
       
Post is unread #24 Apr 18, 2008, 9:18 am
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

Apparently removing the flag setting did the trick. I didn't have to re-register it anywhere. Thanks for all the help, I -really- appreciate it. :)


Log file:
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]
WARMBOOT - BEGINNING WARMBOOT SEQUENCE!

Restoring from Warmboot.

Warmboot Recovery Complete..

Last connected from: 204-111-33-23.hardynet.com

- Seraphim and Kalypso's Wormhole - (108)[nomob indoors bank private plr_home hotel refinery factory][ noquest ]
---------------------------------------------------------------------------
This office appears to defy every law of gravity and space by its mere 

---------------------------------------------------------------------------
Obvious Exits:
None.
---------------------------------------------------------------------------

Star Wars: Galactic Insights v2.3 is ready to kick some ass on port 8060.
Comm: Loading player data for: Takeda (13K)
Comm: Loading player data for: Magus (8K)
Log: Initializing socket
Log: Star Wars: Galactic Insights v2.3 is ready to rock and roll on port 8060.
Log: Registering SIGSEGV handler
Log: Updating Webserver Information...

>| FREEZE TAG |< : A Freeze Tag Game has started! Type 'ftag join' to play.
|-(Lazer Tag)-|  : Lazer Tag is about to start. Type 'lazer join' to enter.

[Force]: 1835/1835 [Align]: evil
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]Log: Banner: saveall
Saving Planets...
Saving Starsystems...
Saving Ships...
Saving Helps...
Log: Saving help.are...
Saved.
Saving Commands List...
Saving Skills List...
Saving Herbs...
Saving Socials...
Saving Installed Areas...
Log: Saving limbo.are...
Log: Saving space.are...
Log: Saving newacad.are...
Log: Saving omni_complex.are...
Log: Saving mon_cal.are...
Log: Saving throne_city.are...
Log: Saving menari_spaceport.are...
Log: Saving monument_plaza.are...
Log: Saving coruscant_streets.are...
Log: Saving tatooine.are...
Log: Saving darkhand.are...
Log: Saving honoghr.are...
Log: Saving cloning.are...
Log: Saving senate.are...
Log: Saving kashyyk.are...
Log: Saving a_byss_city.are...
Log: Saving grand_towers.are...
Log: Saving adari.are...
Log: Saving adari01.are...
Log: Saving land_vehicles.are...
Log: Saving byss_jail.are...
Log: Saving sorosuub.are...
Log: Saving endor.are...
Log: Saving jedi_acad.are...
Log: Saving corus_pt2.are...
Log: Saving mc90.are...
Log: Saving hunters_guild.are...
Log: Saving hunter_ships.are...
Log: Saving mall.are...
Log: Saving quarren.are...
Log: Saving Corellia.are...
Log: Saving clan_jails.are...
Log: Saving nar_shadda.are...
Log: Saving freezetag.are...
Log: Saving lazertag.are...
Log: Saving Kuat.are...
Log: Saving merchant_asteroid.are...
Log: Saving mysticalserpent.are...
Log: Saving bases.are...
Log: Saving space2.are...
Log: Saving houses.are...
Log: Saving galatea.are...
Log: Saving bastion.are...
Log: Saving republic_capital.are...
Log: Saving hoth.are...
Log: Saving geonosis.are...
Log: Saving roche_asteroids.are...
Log: Saving Ryloth.are...
Log: Saving pships.are...
Folding completed.
Saving Changes...
Saving Multiplayer List...
Saving System Data...
Saving Clans...
Saving Councils...
Saving Hiscores...
Saving Shuttles...
Saving Apprentices...
Writing Webserver Information...
Saving Characters and Areas...
Your area is not loaded!

Saveall completed succesfully.

[Force]: 1835/1835 [Align]: evil
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]
 [ALERT]: EMERGENCY COPYOVER - DIVERTING CRASH

Restoring from Warmboot.

Warmboot Recovery Complete..

Last connected from: 204-111-33-23.hardynet.com

- Seraphim and Kalypso's Wormhole - (108)[nomob indoors bank private plr_home hotel refinery factory][ noquest ]
---------------------------------------------------------------------------
This office appears to defy every law of gravity and space by its mere 




---------------------------------------------------------------------------
Obvious Exits:
None.
---------------------------------------------------------------------------


Star Wars: Galactic Insights v2.3 is ready to kick some ass on port 8060.
Comm: Loading player data for: Takeda (13K)
Comm: Loading player data for: Magus (8K)
Log: Initializing socket
Log: Star Wars: Galactic Insights v2.3 is ready to rock and roll on port 8060.
Log: Registering SIGSEGV handler
Log: Updating Webserver Information...

>| FREEZE TAG |< : A Freeze Tag Game has started! Type 'ftag join' to play.
|-(Lazer Tag)-|  : Lazer Tag is about to start. Type 'lazer join' to enter.

[Force]: 1835/1835 [Align]: evil
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]
 [ALERT]: EMERGENCY COPYOVER - DIVERTING CRASH

Restoring from Warmboot.

Warmboot Recovery Complete..

Last connected from: 204-111-33-23.hardynet.com

- Seraphim and Kalypso's Wormhole - (108)[nomob indoors bank private plr_home hotel refinery factory][ noquest ]
---------------------------------------------------------------------------
This office appears to defy every law of gravity and space by its mere 



---------------------------------------------------------------------------
Obvious Exits:
None.
---------------------------------------------------------------------------


Star Wars: Galactic Insights v2.3 is ready to kick some ass on port 8060.
Comm: Loading player data for: Takeda (13K)
Comm: Loading player data for: Magus (8K)
Log: Initializing socket
Log: Star Wars: Galactic Insights v2.3 is ready to rock and roll on port 8060.
Log: Registering SIGSEGV handler
Log: Updating Webserver Information...

>| FREEZE TAG |< : A Freeze Tag Game has started! Type 'ftag join' to play.
|-(Lazer Tag)-|  : Lazer Tag is about to start. Type 'lazer join' to enter.

[Force]: 1835/1835 [Align]: evil
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]
 [ALERT]: EMERGENCY COPYOVER - DIVERTING CRASH

Restoring from Warmboot.

Warmboot Recovery Complete..

Last connected from: 204-111-33-23.hardynet.com

- Seraphim and Kalypso's Wormhole - (108)[nomob indoors bank private plr_home hotel refinery factory][ noquest ]
---------------------------------------------------------------------------
This office appears to defy every law of gravity and space by its mere 



---------------------------------------------------------------------------
Obvious Exits:
None.
---------------------------------------------------------------------------


Star Wars: Galactic Insights v2.3 is ready to kick some ass on port 8060.
Comm: Loading player data for: Takeda (13K)
Comm: Loading player data for: Magus (8K)
Log: Initializing socket
Log: Star Wars: Galactic Insights v2.3 is ready to rock and roll on port 8060.
Log: Registering SIGSEGV handler
Log: Updating Webserver Information...

>| FREEZE TAG |< : A Freeze Tag Game has started! Type 'ftag join' to play.
|-(Lazer Tag)-|  : Lazer Tag is about to start. Type 'lazer join' to enter.

[Force]: 1835/1835 [Align]: evil
[Health]: 3023/3023 [Move]: 30000/30000 [$$]:[437097]


       
Pages:<< prev 1, 2 next >>