Huge TunerStudioAppDebug.txt file

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

Phil,

I don't know if you do any check on this but today I almost crashed my system because for some reason the TunerStudioAppDebug.txt had reached about 450GB. TS was simply open without an open project. I obviously did not open the file to see what was in there because that would have crashed my system.

This could be a serious problem which should never happen. Any idea what could have caused this? I'm running v3.0.23 on Win7 and I had _not_ enabled the comm debug log.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

Not a clue, especially not without knowing what was in the file.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

So you don't put any limit on the file size? Anything I can do other that always checking that file size and not leaving TS open? It just happened within a day.

I understand that without knowing what's in the file there's not much you can do about finding what the cause is. However, it would have been difficult for me to manipulate this in any way. It actually did make it to my backup, which is an annoyance in and of itself, so I could restore it somewhere before I purge that backup (which will also mean I need to purge everything else in that backup). But I'm not sure I can do anything with it in Windows without crashing the system.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by jsmcortina »

Use 'head' from Cygwin?

E.g.
head -10000 TunerStudioAppDebug.txt > snippet

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

The problem with head is that this file was relatively old so it might have a few MBs of useless data at the beginning. I was thinking of using 'tail' but apparently it chokes on files over 2GB.

If Phil think it's useful, I have seen other solutions so I can try a few and send a certain amount of the tail end of the file. If it's not going to be looked at, I won't bother because that will be a few hours of work just to get the file from the backup. I don't have a local disk that has enough free space to safely handle the file so it will have to be a remote disk with the resulting slow recovering speed.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by jsmcortina »

racingmini_mtl wrote:The problem with head is that this file was relatively old so it might have a few MBs of useless data at the beginning. I was thinking of using 'tail' but apparently it chokes on files over 2GB.
You could use "head" to create a 2GB file and then "tail" to grab the end of that.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

Valid point. It still leaves the issue of getting the file from the backup which is going to be many hours. So I won't attempt that unless I get a reply from Phil that he is interested in investigating this.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

TS only manages file size on start up. If the app debug file is greater than 5 MB it deletes it and starts a new one.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by jsmcortina »

Something went badly wrong with TS for Jean though - how to fix it ?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

I can't even begin to imagine what would be in a 450 GB file TunerStudioAppDebug.txt

Does it come back when deleted or renamed?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

Interesting if the file was old..
As said, TS should delete it on start up when ever it is over 5 MB, so normally it gets delete pretty regularly.
It almost seems as if TS wasn't able to delete it for some reason, so appended to it?
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

Looking at the code, if it fails to delete the file, it would just append to it.
Also there can be no warning that the delete attempt failed.

Any chance the file has write permissions but not delete?
Still it would take quite a while even with Comm Debug on to get to 450 GB
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

It did not happen over a very long period of time. At most over a few days. I often leave TS open (with no active project) and my computer is on all the time with backups being made every night.

I just noticed that the disk drive that has my backup just lost around 500GB and I was curious and concerned. Then I saw that my main disk was full which freaked me out and I got some messages about the disk being full. After some time looking for a new huge file, I realised where the issue was and quickly deleted the file before Windows crashed.

And there is no permission issue because I delete the file relatively often when I need to check some CAN comm issues and I was able to delete the huge file without changing any setting. However, I did not try to restart TS after I discovered which file was the culprit so it might have been deleted if I had done so instead of deleting the file manually.

I'll try to restore the file from the backup but that may take me some time because I need to make sure I have enough free space on some disk and make sure that it doesn't take up too many resources (system and network) because that is my work computer.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

Phil,

I have restored the file. Actually, the issue had started the previous day so I was able to restore a file that was 'only' 100GB. The file is filled with this error message:

java.io.IOException: serialPort COM6 not open

I checked with a 460MB file and there is nothing else at the end of the file (as far as I can see from scrolling in a text editor).

I have compressed version of the original file up until this started with the first few instances of the error message that I will be emailing you (about 3MB compressed to 180k). I don't see anything obvious before this started but you may be able to see something.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
LT401Vette
Super MS/Extra'er
Posts: 12697
Joined: Sat Jul 16, 2005 8:07 am
Location: Moorseville, NC
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by LT401Vette »

It sounds like some action has TS go into a hard loop where it rapidly keeps trying to connect to a bad port.
At 450GB in a day it would be quite rapid.
I'll have to see if I can figure out what action triggers this.
Hints welcome.
Phil Tobin
EFI Analytics, helping to simplify EFI
Next Generation tuning software.
Supporting all MegaSquirt versions and firmwares.
http://www.TunerStudio.com
http://www.efiAnalytics.com/MegaLogViewer/
Support the firmware running your engine:
http://www.msextra.com/doc/donations.html
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

One thing I remember doing (and I just checked the log files and that was done just before this started) is that I started a datalog and instead of using ctrl-B to stop the log I used ctrl-L by mistake. It opened a new dialog to start a log but I simply canceled the new log. And logging stopped. Could that have created the issue?

By the way, COM6 is a valid port and that was the port used for what I mention above.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

Actually, ignore my previous message. I just checked again and the log I mention was done after the problem started. So that means TS was perfectly usable while the issue was going on. And I have been able to find that normal messages were still written in the TunerStudioAppDebug.txt file. As for the point of using COM6, that's not quite true because that port is an FTDI device so TS was using the FTDI interface while the COM6 error message was going.

One thing that may have been done was that I did use Mini-Term with COM6 and that would have been before the issue started. I did not get any error message or any indication of something bad happening. And I did not leave it open for very long nor did I use it while another project was open using the FTDI interface for the same port.

It's hard to think how this could have started because there was absolutely no indication that anything had happened and TS was just working normally. I used it for hours after this started (and before). So I don't know which actions I took could have been the trigger.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
BigBlockMopar
Experienced MS/Extra'er
Posts: 372
Joined: Sat Dec 31, 2011 6:10 am
Location: Netherlands
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by BigBlockMopar »

Just shooting an idea here; Maybe incorporate a log-rule that prevents writing to the log, if the newest message is the same as the last one (except for the timestamp).
And perhaps then occassionally show a log-entry that the last error message occured n-number of times in a period of x-seconds.
Daily driver: 1973 Dodge Dart - 360ci engine - 11.3:1cr - MS3x - ignition only. 42RH/A500 OD+LU transmission / 3.23 gears
--------------
Website: https://www.bigblockmopar.nl/
YouTube Channel: https://www.youtube.com/c/BigBlockMopar
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by jsmcortina »

Good idea. Sounds like standard syslogd behaviour.

"Last message repeated 50000 times."

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Huge TunerStudioAppDebug.txt file

Post by racingmini_mtl »

jsmcortina wrote:"Last message repeated 50000 times."
Just to give an idea, I created a few files using head and with 10000000 (10 million) lines that resulted in a 460MB file. That means the 450GB would have around 10 billion lines almost all of which would be the same single line error message shown in my previous message (which makes sense counting the number of characters in that error message).

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
Post Reply