View unanswered posts | View active topics It is currently Fri Jul 10, 2020 12:22 pm



Reply to topic  [ 13 posts ] 
 File lock bug used in tag and planetary invasion. 
Author Message
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post File lock bug used in tag and planetary invasion.
This is a known bug in TWGS v2.x and v1.x, although I know of no known cases where is has altered the outcome of a tournament in v1.x

It caused a huge issue in a tournament in 2016, and we have seen it in other tournaments on TWGS v2.x, but I do no think it i a specific v2 ONLY bug. The basic premise for "Tag" is:

1. Player One is griding and laying a fig in each sector.
2. Player Two gets into a sector ahead of player One.
3. Player Two lays a fig in the sector at the exact same time.

TW2002 locks the sector record for one of the players, and kicks both players out or the game when the second player tries to lock the sector. Player Two relogs and kills player One before he figures out what happened. I have seen really old "Tag" scripts, so I know it predates v2, but I can't get these scripts to work for me.

Something similar is happening during planetary invasions. With photon scripts being run by both teams and re-loaders and everything happening at the same time, the database gets locked and all players are kicked out of the game. There is no way to know if the invading team is intentionally triggering the bug, but it gives them an obvious advantage since their players are most likely at the keys. Re-login scripts will not fire because you are NOT disconnected. You are kicked to the game menu which will not time out and you will never re-login till you are at the keys.

I have never been able to reproduce this bug running TAG or Invasion scripts personally, so any information regarding this bug should be sent to jpritch@eisonline.com for documentation. I spoke with JP on Discord about the bug, and he told me he would give it top priority when he gets to a point he is able to work on Classic TWGS/TW2002. At this time he is not able to compile the source code, but that may change at some point in the future.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Sat Mar 07, 2020 9:24 pm
Profile ICQ YIM WWW
Lieutenant J.G.

Joined: Mon Dec 01, 2014 5:39 pm
Posts: 409
Unread post Re: File lock bug used in tag and planetary invasion.
I've always felt it was also a weight of numbers issue.

Meaning the defenders have 4-5 people in sector, and we have many next door. I've played dozens of games with few people in the game, where I'd send in 1-2 people at same time, and have 1-2 defenders firing, and nothing every happened. WHile in tournaments with a lot of people, we've had issues.

The one that occurred in ICE 2020 had very little happening in reality. I had sent in a number of people to die on your figs.

The last time I sent in, it was just me, no photons etc. I literally just sent a long macro to go in, attack alot and die.


Sat Mar 07, 2020 11:47 pm
Profile
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post Re: File lock bug used in tag and planetary invasion.
Hammer_2 wrote:
I've always felt it was also a weight of numbers issue.

Supposedly "Tag" works with just two players, but I scripted two players in a sector. picking up and dropping figs, and never hit it. I think there must be a very specific timing to it.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Sat Mar 07, 2020 11:53 pm
Profile ICQ YIM WWW
Commander
User avatar

Joined: Wed May 01, 2013 11:28 pm
Posts: 1207
Location: Rural Indiana
Unread post Re: File lock bug used in tag and planetary invasion.
Micro wrote:
This is a known bug in TWGS v2.x and v1.x, although I know of no known cases where is has altered the outcome of a tournament in v1.x

It caused a huge issue in a tournament in 2016, and we have seen it in other tournaments on TWGS v2.x, but I do no think it i a specific v2 ONLY bug. The basic premise for "Tag" is:

1. Player One is griding and laying a fig in each sector.
2. Player Two gets into a sector ahead of player One.
3. Player Two lays a fig in the sector at the exact same time.

TW2002 locks the sector record for one of the players, and kicks both players out or the game when the second player tries to lock the sector. Player Two relogs and kills player One before he figures out what happened. I have seen really old "Tag" scripts, so I know it predates v2, but I can't get these scripts to work for me.

Something similar is happening during planetary invasions. With photon scripts being run by both teams and re-loaders and everything happening at the same time, the database gets locked and all players are kicked out of the game. There is no way to know if the invading team is intentionally triggering the bug, but it gives them an obvious advantage since their players are most likely at the keys. Re-login scripts will not fire because you are NOT disconnected. You are kicked to the game menu which will not time out and you will never re-login till you are at the keys.

I have never been able to reproduce this bug running TAG or Invasion scripts personally, so any information regarding this bug should be sent to jpritch@eisonline.com for documentation. I spoke with JP on Discord about the bug, and he told me he would give it top priority when he gets to a point he is able to work on Classic TWGS/TW2002. At this time he is not able to compile the source code, but that may change at some point in the future.


Is JP giving any kind of time table for his return to this...When I last talked to him he said he was going to start on it soon. that was 2 years ago..

sk

_________________
Star Killer
USA(RETIRED)
Loyalty Above All Else Except Honor
Playing with integrity is more important than winning
HHT 2015 Champs: Cloud09
2015 Lottery Tournament Winning Team Member
2016 Big Game Draft Tournament Winning Team Member
HHT 2016 Champs: Cloud09

Star Killer's Ice9 TWGS
Viper's Pit V1 TWGS
Website: http://sk-twgs.com
Email: starkillerstwgs@yahoo.com
Discord: Star Killer#0358
Ice 9 V2 TWGS: SK-TWGS.COM PORT 2002
Viper's Pit V1 TWGS: V1.SK-TWGS.COM PORT 2002
Now The Fastest TWGS in the West
https://www.facebook.com/StarKillersTradeWars/
To help offset the server(s) hosting bill donate via PayPal to: starkillerstwgs@yahoo.com


Sun Mar 08, 2020 12:27 am
Profile ICQ WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post Re: File lock bug used in tag and planetary invasion.
Star Killer wrote:
Is JP giving any kind of time table for his return to this...When I last talked to him he said he was going to start on it soon. that was 2 years ago..
No, he is working on taking his flight model from Star Citizen and implementing a space combat game in the Trade Wars universe using ships made out of Voxels, but you didn't hear that from me.

Voxel graphics give it kind of an ANSI feel in three dimensions. This is not JP's work, just something I found with google as an example of voxel artwork:

Image

Of coarse, Mindcraft is the game that made voxels popular!

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Sun Mar 08, 2020 2:14 am
Profile ICQ YIM WWW
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1809
Location: Guam USA
Unread post Re: File lock bug used in tag and planetary invasion.
The 'TAG' scenario you mention was producible in v1
and was reported to J.P. when the 15 bugs were revealed.

And when this was done , it ended Team Kraaken.
I became the bad guy for saying anything that could give a team an advantage , although we ALL claimed we would never do such things.

I did let the cat out of the bag , now I'm the bad guy .. go figure.
I wanted a FIXED v2 w/o any bugs.

Just sorry ALL bugs were not fixed at that time.

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://202.151.82.243:2002
Coconut Telegraph (ICQ)# 14340614
Founding Member -=[Team Kraaken]=- Winners of Gridwars 2010 - Ka Pla
Image

Image
Image
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Mon Mar 23, 2020 6:02 am
Profile ICQ WWW
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post Re: File lock bug used in tag and planetary invasion.
Vid Kid wrote:
I wanted a FIXED v2 w/o any bugs.
That would be really nice. Maybe if JP's new project does well he will be able to invest some time in Classic TradeWars.

The main question i have is weather or not the "Tag" bug is being used intentionally by the invading team, or if it is a sequence of defensive moves that is actually causing the file lock. I tend to think it is the latter, since Hammer says he just did a solo PE the last time the bug was triggered.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Mon Mar 23, 2020 3:46 pm
Profile ICQ YIM WWW
Lieutenant J.G.

Joined: Mon Dec 01, 2014 5:39 pm
Posts: 409
Unread post Re: File lock bug used in tag and planetary invasion.
Micro wrote:
Vid Kid wrote:
I wanted a FIXED v2 w/o any bugs.
That would be really nice. Maybe if JP's new project does well he will be able to invest some time in Classic TradeWars.

The main question i have is weather or not the "Tag" bug is being used intentionally by the invading team, or if it is a sequence of defensive moves that is actually causing the file lock. I tend to think it is the latter, since Hammer says he just did a solo PE the last time the bug was triggered.


We should try and replicate this. I've seen this happen surprisingly irregularly to be honest. I don't play many games mind you, but when I Was playing in casual games almost never saw this. Only in tournaments or larger games.

The previous time it happened to me was some time ago and that one I definitely did do Mass Enter Xport - however this time, I was sending people through solo.

Just having 20+ accounts on the TWGS might assist in causing the lock. Who know's how the main game loop works?


Mon Mar 23, 2020 5:15 pm
Profile
Lieutenant
User avatar

Joined: Tue Dec 17, 2002 3:00 am
Posts: 500
Location: Virginia
Unread post Re: File lock bug used in tag and planetary invasion.
Hammer_2 wrote:
Micro wrote:
Vid Kid wrote:
I wanted a FIXED v2 w/o any bugs.
That would be really nice. Maybe if JP's new project does well he will be able to invest some time in Classic TradeWars.

The main question i have is weather or not the "Tag" bug is being used intentionally by the invading team, or if it is a sequence of defensive moves that is actually causing the file lock. I tend to think it is the latter, since Hammer says he just did a solo PE the last time the bug was triggered.


We should try and replicate this. I've seen this happen surprisingly irregularly to be honest. I don't play many games mind you, but when I Was playing in casual games almost never saw this. Only in tournaments or larger games.

The previous time it happened to me was some time ago and that one I definitely did do Mass Enter Xport - however this time, I was sending people through solo.

Just having 20+ accounts on the TWGS might assist in causing the lock. Who know's how the main game loop works?


It was absolutely reproduced, intentionally, multiple times by one of the teams in ICE a few years back, I think maybe 2016 or 2015?

At this point I don't remember who the guilty parties even were, but they used it intentionally on several occasions in that tourney.

_________________
TOURNAMENT WINNER: ICE 2017 - ICE 2019 - SUMMER SPLASH 2019 - XMAS TOURNEY 2019


Mon Mar 23, 2020 10:51 pm
Profile ICQ
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post Re: File lock bug used in tag and planetary invasion.
Hammer_2 wrote:
Just having 20+ accounts on the TWGS might assist in causing the lock. Who know's how the main game loop works?

It is more a matter of having more than one player in the same sector at the same time. I don't know the details of the main game loop, but TWGS launches an independent process for each player. Each instance is a separate copy of TW2002 and they communicate by a shared memory file. Only one player can modify a database record at the exact same time. The fix would be for the next player to wait for the record to unlock, in a queue of sorts. Instead of kicking the players out of the game there should just be a delay of a few milliseconds for the second player until the record unlocks.

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Tue Mar 24, 2020 5:38 am
Profile ICQ YIM WWW
Lieutenant
User avatar

Joined: Tue Dec 17, 2002 3:00 am
Posts: 500
Location: Virginia
Unread post Re: File lock bug used in tag and planetary invasion.
Micro wrote:
Hammer_2 wrote:
Just having 20+ accounts on the TWGS might assist in causing the lock. Who know's how the main game loop works?

It is more a matter of having more than one player in the same sector at the same time. I don't know the details of the main game loop, but TWGS launches an independent process for each player. Each instance is a separate copy of TW2002 and they communicate by a shared memory file. Only one player can modify a database record at the exact same time. The fix would be for the next player to wait for the record to unlock, in a queue of sorts. Instead of kicking the players out of the game there should just be a delay of a few milliseconds for the second player until the record unlocks.


Well, that's not really the answer - using thread safe code is the answer - which under the covers involves some degree of locking, yes, but it can be done in near real time. A single, truly multithreaded application would be the way to go.

A few milliseconds means the different between life and death with modern network ping times. That is an eternity in twx. My scripts that use timing techniques for things like foton and gridding operate at the microsecond level.

_________________
TOURNAMENT WINNER: ICE 2017 - ICE 2019 - SUMMER SPLASH 2019 - XMAS TOURNEY 2019


Tue Mar 24, 2020 7:03 am
Profile ICQ
Ambassador
User avatar

Joined: Wed Apr 20, 2011 1:19 pm
Posts: 2428
Location: Oklahoma City, OK 73170 US
Unread post Re: File lock bug used in tag and planetary invasion.
Shadow wrote:
Well, that's not really the answer - using thread safe code is the answer - which under the covers involves some degree of locking, yes, but it can be done in near real time. A single, truly multithreaded application would be the way to go.
We are not dealing with threads here. Each player is in an independent process. Unlike threads, each process has no idea what is happening in another process. Shared memory files are no longer used in modern programming, but that is how TW2002 was written. The HVS MBBS version is very different and might be thread based. MBBS games are written as .dll files that are loaded into the BBS. I will have to fire up my MBBS and see how many processes it is using per player.

Shadow wrote:
A few milliseconds means the different between life and death with modern network ping times. That is an eternity in twx. My scripts that use timing techniques for things like foton and gridding operate at the microsecond level.
IMO that is not really how the game is supposed to be played. Photon hits should not be based on whoever has the best ping. I like the delay features that JP added to version 2, but everyone screams bloody murder if you turn them on. I also agree with Cruncher that planets should not be able to move faster than ships. Silly Me!

_________________
Regards,
Micro

Website: http://www.microblaster.net
TWGS2.20b/TW3.34: telnet://twgs.microblaster.net:2002

ICQ is Dead Jim! Join us on Discord:
https://discord.gg/frrjg6r


Tue Mar 24, 2020 8:12 am
Profile ICQ YIM WWW
Lieutenant
User avatar

Joined: Tue Dec 17, 2002 3:00 am
Posts: 500
Location: Virginia
Unread post Re: File lock bug used in tag and planetary invasion.
Shadow wrote:
A few milliseconds means the different between life and death with modern network ping times. That is an eternity in twx. My scripts that use timing techniques for things like foton and gridding operate at the microsecond level.
Micro wrote:
IMO that is not really how the game is supposed to be played. Photon hits should not be based on whoever has the best ping. I like the delay features that JP added to version 2, but everyone screams bloody murder if you turn them on. I also agree with Cruncher that planets should not be able to move faster than ships. Silly Me!


Well, now there are two of you that agree on that point. Keep waiting long enough and maybe that will be a majority :) Or start turning on delays and banning mobile planets and we'll get to that level of players *really* fast.

With the exception of people like Hammer (who just buys a local VPS and has the best ping times from his client anyway), there should not be significant difference in ping times with modern broadband. The issue isn't ping times, it's coding ability - the good scripts that use timing and prediction generally aren't public. Which some will consider unfair, but being a better coder, or a better player, or having more time at keys, are all "unfair" -- it really comes down to the players who are most committed end up winning the most.

_________________
TOURNAMENT WINNER: ICE 2017 - ICE 2019 - SUMMER SPLASH 2019 - XMAS TOURNEY 2019


Tue Mar 24, 2020 8:22 am
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.