Bug Relay browser not loading correctly on updated system

kazgar

New member
Hello,

Unsure if it a real bug, but don't know where to ask. but have recently upgraded to Fedora Core 35/Firefox 95, and the relay browser is showing weird behavior. I hit the button or type "relay" and can see the OS trying to launch a Firefox process to open game.php as normal, but the page never loads properly.

The weirder bit is if I then close/logout of kolmafia, it attempts to open up the relay browser I launched (which then fails as Mafia isn't running anymore). If I launch it multiple times in session, none of them work, but they all attempt to open upon exit, ie 3 goes at "relay" means 3 tabs open in firefox on exit.

When Mafia is running the Relay browser does work if I manually type the url, so its not game breaking, so its highly likely something on my end, but not even sure where to start looking, and am wondering if anyone else has seen this issue.

This is running r26008 on openjdk 17.

Thanks
 

kazgar

New member
That was my first thought, but didn't have a problem back at that change. It does try to launch the browser, and then when I exit kolmafia all the things i tried to launch actually launch. So the Mafia->browser path seems to be correct.
 

kazgar

New member
I seem to get these sorts of errors in mafia, possibly on the exit when it actually tries to launch the browser:

java.io.FileNotFoundException: /home/<username>/.kolmafia/relay (Is a directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at net.java.dev.spellcast.utilities.DataUtilities.getInputStream(DataUtilities.java:246)
at net.java.dev.spellcast.utilities.DataUtilities.getReader(DataUtilities.java:146)
at net.sourceforge.kolmafia.request.RelayRequest.sendLocalFile(RelayRequest.java:676)
at net.sourceforge.kolmafia.request.RelayRequest.handleSimple(RelayRequest.java:3227)
at net.sourceforge.kolmafia.request.RelayRequest.run(RelayRequest.java:3242)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:241)
at net.sourceforge.kolmafia.RequestThread.postRequest(RequestThread.java:206)
at net.sourceforge.kolmafia.webui.RelayAgent.readServerResponse(RelayAgent.java:455)
at net.sourceforge.kolmafia.webui.RelayAgent.performRelay(RelayAgent.java:103)
at net.sourceforge.kolmafia.webui.RelayAgent.run(RelayAgent.java:82)

I'll try to get more specifics of when it occurs.
 

kazgar

New member
That looks like it's trying to launch http://127.0.0.1:60080/ (note no game.php). Hm.

Do you have an ipv4 localhost address? I'd expect so, but I've seen otherwise before.
Yeah i noticed the 127.0.0.1 isn't working, but game.php does manually (after firing up the relay browser)

ip addr show lo
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever

Just checked the firewall and it seems open on loopback to work. The other thing that's failing is the "lookup" command that lauches the wiki, same thing, process seems to fire, but no tab opens. When I close mafia, it then fires.
 

heeheehee

Developer
Staff member
Hm. It sounds to me like one of the Java threads is getting stuck, but I'm not sure how.

Can you grab a thread dump?

Something like
Bash:
$ jstack $(jps | grep KoLmafia | cut -f 1 -d' ')
should do the trick.
 

kazgar

New member
jstacks attached (zipped)

First one was after breakfast and a couple of commands, second was after running a relay command from gcli, and a lookup command.
 

Attachments

  • jstack.zip
    11.5 KB · Views: 2

heeheehee

Developer
Staff member
Hm. So, in particular I was looking to see if something in Mafia code was locking up. That doesn't seem to be the case (only instances of kolmafia are in MemoryUsageMonitor (monitoring, um, memory usage), CommandDisplayFrame (waiting for the next command, and RelayServer (for actually serving requests). Nothing obvious I can find that's hanging even when looking beyond that, although obviously I didn't look into all 100+ threads.

And you mentioned in your first post that you can actually see the OS spawning a firefox process?

I don't think it's a Mafia bug at this point, but it is... strange. I can't reproduce with openjdk17 (or 11), with firefox-developer-edition / chromium. (I'm not on Fedora Core though.)

What desktop environment (and/or window manager) are you using? I wouldn't expect that to be relevant either, but... we've seen issues in the past from users who don't have certain Gnome libraries (although in that case it fails unilaterally).
 

kazgar

New member
Didn't think it was a mafia bug, but was a decent place to start. Running Mate as environment, but should have all of gnome installed. Will test there at a future time. Mate has the old gnome 2 style taskbar still, so can see my firefox process/tab. And when I run relay I see one that says "opening game.php" and in theory it should close as it actually open a new tab in firefox, but it just drops away.

Thanks for your help I'll keep looking, and it doesn't stop me using Mafia.
 

heeheehee

Developer
Staff member
Wait, "opening game.php" is a separate process from firefox? Do you know what the underlying process is?
 
Top