Jump to content
The Dark Mod Forums

Linux crash: High Expectations


Recommended Posts

A couple of users have pretty consistent crashes with High Expectations. I have also experienced crashes with Windows on my own machine, but very rarely.  I have a debug build of 2.11, but I haven't been able to get it to crash under that yet.

I've attached the logs that @irisx has provided, and @DavyJones has the exact same issue.  The only thing that stood out to me was in the qconsole.log:

The ambient 'snd_tunnels' (underground_forelone_loop_z) for location 'location_tunnels' is now playing.
Getting threadname failed, reason: No such file or directory (2)
--------- Game Map Shutdown ----------

@irisx did you say you also have some trace file?

Do any other Linux users have this problem (or not)?  The issue seems to occur about 1.5 seconds after the FM starts, or as soon as you start to provide input (move the mouse or start walking, etc).

 

qconsole.log Darkmod.log

Link to comment
Share on other sites

I confirm the same behaviour that @DavyJones is reporting: starting from a fresh install of the mission and not doing anything like moving the mouse or pressing a key, results in an immediate crash.

If I move around upon start, most of the time (but not always) the mission continues normally. Once this happens, there are no crashes upon subsequent restarts or reloads.

In addition to the above logs, I have generated a strace -F trace file of the crash, in case somebody (e.g. @nbohr1more ) could get some useful information from it. It is around ~15MB (gzipped), any suggestions on how to send it?

Link to comment
Share on other sites

@irisx I believe our bug-tracker will accept files of that size:

https://bugs.thedarkmod.com/my_view_page.php

Otherwise we will gladly accept a Google Drive or Dropbox ( etc ) link.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

2 hours ago, irisx said:

Thanks for the fast reply, this Google Drive link should work:

High Expectations Linux crash - strace -F log

Thanks!

Are you running TDM with elevated privileges?

 

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Quote

Are you running TDM with elevated privileges?

Well, none that I'm aware of 😀

I am not running as root nor have any suid/sgid executables in the TDM folders. On the other hand, nVidia's binary modules have been known to do strange stuff from time to time, and they do run with elevated privileges.

Link to comment
Share on other sites

Something is causing ALSA audio errors. One thing that modern Linux versions have issues with is running audio as a privileged user.

Do you use pipewire or pulse?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Hmm:

 

[pid 88402] write(2, "[ALSOFT] (EE) Failed to set Ster"..., 61[ALSOFT] (EE) Failed to set Stereo, got 5.1 Surround instead
) = 61

 

Please post your Darkmod.cfg and the results of:

( Open console ) CTRL+ALT+ ~  ( tilde )

condump audiocrash.txt

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I gave it a try, and mine crashed with the same segfault the first time I tried.  I've attempted to reproduce it while running under GDB and haven't gotten it to crash again yet.  Each time I started it it up the same way without moving.

I did a little source code snooping and the only places I found that would print out that particular message "Getting threadname failed" would be where Sys_GetThreadName is called to print out some information when a mutex is busy, deadlocked, or not locked when it should be; or also when a thread is destroyed.

If I manage to catch a backtrace I'll share it here or on the bug tracker.

  • Like 1
Link to comment
Share on other sites

1.5 seconds after start is probably the time when script functions are called.
Or some other post-spawn activity.

Someone can also share LInux debug symbols for 2.11 release (they should be in assets repo somewhere inside devel).
This way we can probably see stacktrace.

Also keep in mind that the threadname message might be not the error itself, but some issue happening when game tries to throw exception or stop something after the issue has already happened.

Link to comment
Share on other sites

I have on Linux Ubuntu and cinnamon Linux desktop no up crashes Intel CPU 10 gen Geforce 1060 6gb ram 16 rams SSD my computer boots in 11 seconds about 5000 MB write 6000 read I thought that the SSD is too fast so that some scripts are not started properly but no falls

Link to comment
Share on other sites

On 5/2/2023 at 9:16 AM, stgatilov said:

Someone can also share LInux debug symbols for 2.11 release (they should be in assets repo somewhere inside devel).
This way we can probably see stacktrace.

Who would need to do what for this? Who can access the assets repo?  Once we got the files, what needs to happen then? It sounds like a useful suggestion, but not really sure how to progress it...

Edited by Frost_Salamander
Link to comment
Share on other sites

The source code has the debug symbols, you just have to compile your own executable (etc) rather than use the one from the installer. I tried to replicate on my Linux Mint desktop while in debug but thus far cannot get it to crash.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

6 hours ago, nbohr1more said:

The source code has the debug symbols, you just have to compile your own executable (etc) rather than use the one from the installer. I tried to replicate on my Linux Mint desktop while in debug but thus far cannot get it to crash.

@nbohr1more can provide you debug symbols from the assets SVN repo (for 2.11 release only, not for dev builds). They are zipped inside devel/release directory. I don't have my main PC available right now, can't do it.

Then you can run "gdb ./thedarkmod.x64", within gdb execute "add-symbol-file ./thedarkmod.x64.debug", and run the program to reproduce your issue.

  • Like 1
Link to comment
Share on other sites

5 hours ago, stgatilov said:

@nbohr1more can provide you debug symbols from the assets SVN repo (for 2.11 release only, not for dev builds). They are zipped inside devel/release directory. I don't have my main PC available right now, can't do it.

Then you can run "gdb ./thedarkmod.x64", within gdb execute "add-symbol-file ./thedarkmod.x64.debug", and run the program to reproduce your issue.

@AluminumHaste can you attach this? If not I can upload this tonight.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

8 hours ago, stgatilov said:

can provide you debug symbols from the assets SVN repo (for 2.11 release only, not for dev builds). They are zipped inside devel/release directory. I don't have my main PC available right now, can't do it.

Then you can run "gdb ./thedarkmod.x64", within gdb execute "add-symbol-file ./thedarkmod.x64.debug", and run the program to reproduce your issue.

Maybe I could try this too, since I'm more or less able to consistently reproduce the crash?

Link to comment
Share on other sites

I got it to crash on my Windows debug build. I clicked 'debug', and in VS I was able to see the stack trace:

https://drive.proton.me/urls/B06A4E8MV4#2lezsq0gsgfd

I think I might know what that is.  The entity in question is a door (atdm:arched01_111x40_left) that I didn't want to be openable.  If I remember correctly, the usual tricks weren't working (making it a func_static made it disappear, and making it non-frobable the AI were still using it).  So I changed the spawnclass to an idStaticEntity. Because it was a prefab, I think I thought it was a custom brush door as well.  I see now it's just using a model, so I can probably just change it to that.

Anyways, those are all my excuses.  I'll fix this and send out a new version that someone can test.

 

 

Edited by Frost_Salamander
  • Like 1
Link to comment
Share on other sites

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

16 hours ago, Frost_Salamander said:

I think I might know what that is.  The entity in question is a door (atdm:arched01_111x40_left) that I didn't want to be openable.  If I remember correctly, the usual tricks weren't working (making it a func_static made it disappear, and making it non-frobable the AI were still using it).  So I changed the spawnclass to an idStaticEntity.

My guess would be:

  • the door generates visual stims that AI can notice
  • the stim has "AIUse" spawnarg which specifies its type, which is 7 = "AIUSE_DOOR"
  • the AI code casts the stim source entity to CFrobDoor, which it is not -> crash

Here is the place with non-checking cast:

	else if (aiUseType == EAIuse_Door)
	{
		// grayman #2866 - in the interest of reducing stim processing for closed doors,
		// add a check here to see if the door is closed. Otherwise, a closed door will
		// ping every AI w/in its radius (500) but the AI won't shut it down until it
		// can see the door. A guard not patrolling will receive endless pings unless
		// we shut it down here.

		CFrobDoor* door = static_cast<CFrobDoor*>(stimSource);
		if ( !door->IsOpen() )
		{
			door->DisableStim(ST_VISUAL); // it shouldn't be pinging anyone until it's opened
			return;
		}

Supposedly, you changed the entity C++ class from door to static entity, but did not remove the "AIUse" spawnarg.

Maybe we should add IsType check here and do Error if it is incorrect.

  • Like 1
Link to comment
Share on other sites

The ability to change the spawnclass definitely feels like something that you should only do if you know what you are doing (which I clearly don't).

Also, @stgatilov any idea why the crash wouldn't happen every time, instead of sometimes?  The doors are there, and there is an AI that hangs around it the entire time.

Link to comment
Share on other sites

2 hours ago, Frost_Salamander said:

Also, @stgatilov any idea why the crash wouldn't happen every time, instead of sometimes?  The doors are there, and there is an AI that hangs around it the entire time.

It's probably nothing more that goes wrong, and reading wrong memory by itself does not crash often (it is usually valid memory page, and depending on the build its contents can be quite deterministic).

It is not the first time where such issues cause crashes on Linux while Windows build seems to work fine.
Also, we might have different compile settings: Linux build settings are pretty standard, while Windows ones have e.g. security buffer checks disabled. Even calling conventions are very different between Windows and Linux.

Most of C++ worshippers don't look any further than "we get undefined behavior here" 😁

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      I was playing Skyrim, got bored fast. Got back to The Dark Mod just for one mission, played "Somewhere above the City" which is not really a great mission but still good, as in above-average.
      My biggest regret is living in this country, where there's a heat wave, I am sweating at 20c and I really wish for temperatures below 5c.
      · 10 replies
    • Skaruts

      Is there something wrong with the forums lately, or is it my browser? I've been having trouble formatting posts, and just now I couldn't format anything at all.
      I'm using Vivaldi.
      Usually I have to: select text, click bold, nothing happens, select again, click bold, then it works. 
      Same for other stuff, like creating spoilers, bullet points, links. Nothing works the first time. 
      · 1 reply
    • STiFU

      Back from a spontaneous 1-week trip to Lanzarote with wife and son. I hope beta testing has been going well...
      · 1 reply
    • datiswous

      Whenever I eat fried chicken these days I think of this scene in The Black Mage..

      · 1 reply
    • Mortem Desino

      Even though I've been absent a long while, I still find myself dreamily wishing for the free time to do TDM mission development. When working on new research projects I'll find myself involuntarily thinking, "hee hee this could be a fun texture or readable or bit of map architecture." Or I find myself absentmindedly responding out loud to odd noises with a drunkguard-like "must've been rats!"
      · 3 replies
×
×
  • Create New...