Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Daidalos Team discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=202)
-   -   Il-2 Dedicated Server mission load problems (http://forum.fulqrumpublishing.com/showthread.php?t=41703)

Pfeil 02-18-2014 03:48 PM

Quote:

strace -eopen wineconsole --backend=curses /home/david/Servers/il2-4.12/drive_d/il2server/il2server.exe > logfile.txt
Unless there's another method you're looking for, ">" will redirect output from stdout(which is normally printed to the console) to a file. You can also use ">>" to append a file.

This is true for BASH, can't guarantee it to work with other shells. Note that this means you won't see the output in your console.


EDIT: Or, what The_WOZ said.

TheGrunch 02-18-2014 07:49 PM

Thanks guys.

Unfortunately wineconsole segfaults under strace, but I ran it against the server PID instead.

Here is the output from strace -efile -olog.txt -p <server process ID> filtered by the lines which mention the missions directory:

Text Field
File Chooser

Code:

stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/DCG/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/Pacific Fighters/03.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters/03.mis", {st_mode=S_IFREG|0755, st_size=2401, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/FBDj/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0

stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/DCG/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/DCG/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/DCG/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/Pacific Fighters/03.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters/03.mis", {st_mode=S_IFREG|0755, st_size=2401, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/Net/dogfight/Pacific Fighters/03.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/Net/dogfight/Pacific Fighters/03.mis", {st_mode=S_IFREG|0755, st_size=2401, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/FBDj/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/missions/FBDj/dcgmission.mis", 0x33eee4) = -1 ENOENT (No such file or directory)
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/home/david/.wine/dosdevices/z:/home/david/Servers/il2-4.12/drive_d/il2server/Missions/FBDj/dcgmission.mis", {st_mode=S_IFREG|0755, st_size=27906, ...}) = 0

If you'd like to see the entire file, it can be found here. Interestingly, it looks like Il-2 internally believes its missions directory to be "missions" rather "Missions" as it tries this first every time!

My initial suspicion was that the problem might be caused by the fact that wine is loading everything relative to Z:, but running the server with "env WINEPREFIX=/home/david/Servers/il2-4.12/ wineconsole D:/il2server/il2server.exe" still exhibited the bug so I guess it must be something else!

TheGrunch 03-22-2014 06:06 PM

Finally solved this problem!

The mission file selection process via file chooser relies upon having network share access to the mission files.

The files were being locked via Samba from the Il-2 SSD client, and therefore when the server came to load them, they were unavailable for reading.

This is strange because the files are not "read" by my program, they are simply selected, so they shouldn't be locked. This may have something to do with opportunistic locking by the Windows Samba client process.

EDIT: Yep, confirmed it. When I add this to my share in my smb.conf it fixes it:

Code:

veto oplock files = /*.mis/

Pfeil 03-22-2014 08:54 PM

Good to hear you found the cause, I know bugs that seemingly have no reason to occur are massively frustrating.

Frankly I'm not surprised that you'd run into problems with Windows and Samba. I won't go ranting about it, but ever since Vista the SMB implementation has gotten less and less usable(and don't get me started on file permissions, talk about trading usability for false security).

TheGrunch 03-24-2014 05:38 PM

Tell me about it, apparently the specific reason for this problem is the use of the force user option in samba configuration:

Quote:

Samba includes an smb.conf parameter called force user that changes the user accessing a share from the incoming user to whatever user is defined by the smb.conf variable. If oplocks is enabled on a share, the change in user access causes an oplock break to be sent to the client, even if the user has not explicitly loaded a file.
Oh well! At least now I know this is not a bug in my code and can start working on the mission cycle scheduler. :grin:


All times are GMT. The time now is 05:53 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.