Page 1 of 2

Huge TunerStudioAppDebug.txt file

Posted: Sat Jun 17, 2017 3:32 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 9:48 am
by LT401Vette
Not a clue, especially not without knowing what was in the file.

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 12:55 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 1:48 pm
by jsmcortina
Use 'head' from Cygwin?

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

James

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 3:37 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 3:48 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Mon Jun 19, 2017 3:55 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 7:20 am
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.

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 8:29 am
by jsmcortina
Something went badly wrong with TS for Jean though - how to fix it ?

James

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 10:47 am
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?

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 11:10 am
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?

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 11:36 am
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Tue Jun 20, 2017 1:38 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Wed Jun 21, 2017 12:40 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Wed Jun 21, 2017 9:17 pm
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.

Re: Huge TunerStudioAppDebug.txt file

Posted: Wed Jun 21, 2017 9:58 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Wed Jun 21, 2017 10:52 pm
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

Re: Huge TunerStudioAppDebug.txt file

Posted: Thu Jun 22, 2017 11:47 am
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.

Re: Huge TunerStudioAppDebug.txt file

Posted: Thu Jun 22, 2017 12:56 pm
by jsmcortina
Good idea. Sounds like standard syslogd behaviour.

"Last message repeated 50000 times."

James

Re: Huge TunerStudioAppDebug.txt file

Posted: Thu Jun 22, 2017 1:08 pm
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