ArcticaProject / nx-libs

nx-libs
Other
120 stars 39 forks source link

logfile corruption #1006

Open uli42 opened 3 years ago

uli42 commented 3 years ago

When enabling DEBUG in Compext.c an Clipboard.c the logfile seems to get corrupted. Norm Green saw this:

I can see from /proc that there are 3 different file descriptors open for the log file session.log: 2 (stderr), 6 and 11. I suspect there is some thread-unsafe behavior causing overwrites.

and

Sorry, that's all there is. It was 20 gb (!) in size most of which was binary 0s for some reason. The current log is already 8 GB and is also mostly binary 0s.

uli42 commented 3 years ago

A suspended session has only file descriptors while a running session has three.

uli42 commented 3 years ago

The third fd appearing after a reconnect is the one that is referred to by the errors= parameter of the options file.

uli42 commented 3 years ago

x2gostartagent defines a SESSION_LOG which is used both for the x2goagent errors file (errors= in the options file) and the redirection of stderr. In addition nxagent clones stderr's file descriptor to be used as the clients log file (which would be clients= in the options file but is only used during startup and the overwritten by stderr).

lkraav commented 3 years ago

Yes, I can see such a logfile in my current session, 8G large already. Is this still an issue in nx-3.5.99.26? From forum, it seemed like .26 would resolve it.

uli42 commented 3 years ago

No, this issue is about a corruption (many 0-bytes in the logfile). What is fixed in 3.5.99.26 is HUGE logfiles due to some forgotten debug statement in the code.

On Mon, Mar 8, 2021 at 10:11 AM Leho Kraav notifications@github.com wrote:

Yes, I can see such a logfile in my current session, 8G large already. Is this still an issue in nx-3.5.99.26? From forum, it seemed like .26 would resolve it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

uli42 commented 2 years ago

This is a bug in x2goserver which is tracked here: https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=1537

A fix has been applied an will be included in the next release (4.1.0.4)