https://bugs.winehq.org/show_bug.cgi?id=52521
Bug ID: 52521 Summary: RMS Express: Intermittent TCP connections between program components Product: Wine Version: 7.1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: eric.wheez@gmail.com Distribution: ---
Context: RMS Express is a "Email over Radio" email-like client that interfaces with sound modems (sound is then sent over radio to listening stations), much like the old dial-up modems of the 1990's. Its modems are separate programs that connect to it over local TCP.
Problem: I would technically call this a minor bug, but since many users of this program don't like using computers and might not try closing and re-running RMS Express, I would consider it basically a 'crash' for this program. RMS Express's code can be peeked at with ILspy and ARDOP (one of the modem programs) is open-source (available by joining https://ardop.groups.io/g/main - and then later joining ardop.groups.io/g/developers )
System: - Happens on Debain 10/x86 (VMWare) & on RPi4/armv7l (see https://github.com/WheezyE/Winelink/) - Using wine-devel-7.1 (has been present since at least wine-devel-5.19 - haven't tried earlier than that) - Happens whether using wine-mono or .NET 4.6 (so we can rule out a wine-mono bug)
Installation: If you're interested, here are some quick install commands & notes.
``` # Set up wine # NOTE: wine-mono is also required for RMS Express! winetricks -q win7 sound=alsa # for RMS Express winetricks -q vb6run pdh_nt4 win7 sound=alsa # for VARA
# Install RMS Express & VARA HF/FM (no matter what their version numbers are) # NOTE: ARDOP, VARA HF, & VARA FM need the user to configure soundcards after installation. mkdir rmsdownloads 2>/dev/null; cd rmsdownloads sudo apt-get install curl megatools p7zip-full -y # Download / extract RMS Express echo -e "\nDownloading and installing RMS Express . . .\n" wget -q -r -l1 -np -nd -A "Winlink_Express_install_*.zip" https://downloads.winlink.org/User%20Programs 7z x Winlink_Express_install_*.zip -o"WinlinkExpressInstaller" wine WinlinkExpressInstaller/Winlink_Express_install.exe /SILENT
# Download / extract VARA HF echo -e "\nDownloading VARA HF . . .\n" VARAHFLINK=$(curl -s https://rosmodem.wordpress.com/ | grep -oP '(?=https://mega.nz).*?(?=" target="_blank" rel="noopener noreferrer">VARA HF v)') # Find the mega.nz link from the rosmodem website no matter its version, then store it as a variable megadl ${VARAHFLINK} 7z x VARA\ HF*.zip -o"VARAHFInstaller" wine VARAHFInstaller/VARA\ setup*.exe /SILENT
# Download / extract VARA FM echo -e "\nDownloading VARA FM . . .\n" VARAFMLINK=$(curl -s https://rosmodem.wordpress.com/ | grep -oP '(?=https://mega.nz).*?(?=" target="_blank" rel="noopener noreferrer">VARA FM v)') # Find the mega.nz link from the rosmodem website no matter its version, then store it as a variable megadl ${VARAFMLINK} 7z x VARA\ FM*.zip -o"VARAFMInstaller" wine VARAFMInstaller/VARA\ FM\ setup*.exe /SILENT cd .. rm -rf rmsdownloads # NOTE: RMS Express requires a free user account, which you can sign up for on first run of the program. ```
Terminal output: The terminal output segments when ARDOP connects to RMS Express (vs when ARDOP fails to connect to RMS Express) look basically identical (process numbers -and also the address in ImmReleaseContext- change every run)
Connects: ---snip--- 0238:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0238:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0238:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0238:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0238:fixme:imm:ImeSetActiveContext (0x2596c8, 1): stub 0238:fixme:imm:ImmReleaseContext (000200E4, 002596C8): stub ---snip---
Doesn't connect: ---snip--- 0288:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION 0288:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0288:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0288:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\windows\system32\tzres.dll", (null), 0021E7F8, 00258AF8, 0021E7FC, 0021E7F0 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0060:fixme:nsi:ipv6_forward_enumerate_all not implemented 0288:fixme:imm:ImeSetActiveContext (0x2596c8, 1): stub 0288:fixme:imm:ImmReleaseContext (000300EC, 002596C8): stub ---snip---
I'm excited to say I got this program working on Android (without root) recently thanks to box86/Termux/PRoot https://youtu.be/FkeP_IW3GGQ?t=23 . Lots of ham radio operators are using really old Windows PC's to run this software on their message servers. Many people want to take this software with them in a backpack too (without getting an expensive Windows tablet) or strapped to their radio on a Raspberry Pi, and I think solving this weird intermittent TCP connection issue in Wine could help make using wine with RMS Express pretty popular.
https://bugs.winehq.org/show_bug.cgi?id=52521
Eric eric.wheez@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://github.com/WheezyE/ | |Winelink/issues/17#issuecom | |ment-1030639648 Distribution|--- |Debian URL| |https://winlink.org/
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #1 from Eric eric.wheez@gmail.com --- Created attachment 71819 --> https://bugs.winehq.org/attachment.cgi?id=71819 Connected this time
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #2 from Eric eric.wheez@gmail.com --- Created attachment 71820 --> https://bugs.winehq.org/attachment.cgi?id=71820 Didn't connect this time
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #3 from Eric eric.wheez@gmail.com --- And with all that, I just realized that I didn’t actually describe the problem in my main post: RMS Express tells these modem programs to run, but sometimes doesn’t establish a connection with them. This happens with ARDOP, VARA HF, and with VARA FM. It doesn’t happen if VARA Chat (different frontend program like RMS Express) runs and connects to the same modem programs (VARA HF or VARA FM).
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #4 from Eric eric.wheez@gmail.com --- This is with RMS Express 1.6.0.0. The program gets updates almost weekly and Winlink.org doesn't post links to older versions.
https://bugs.winehq.org/show_bug.cgi?id=52521
Eric eric.wheez@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.wheez@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #5 from Eric eric.wheez@gmail.com --- I believe we found the cause of these intermittent TCP connection problems! Unfortunately we think it's a problem with how Linux handles the TIME_WAIT state for open ports, so I believe this isn't a Wine bug after all.
More info here: 1. Linux TCP ports enter a TIME_WAIT state after the last connection on them is terminated. Apparently to prevent DoS attacks & also to prevent packet loss in some edge cases. 2. The state of each TCP port can be viewed with netstat | grep tcp. VARA's localhost:8300/localhost:8301 ports enter ESTABLISHED state when an RMS Express VARA HF P2P session is first opened. Then, as soon as VARA HF is closed, the 8300/8301 ports enter TIME_WAIT state for Linux OS's. I timed how long the ports stay in TIME_WAIT to be about 60 seconds. Then the ports disappear from netstat (they close & can be re-used again). 3. While ports 8300/8301 are in TIME_WAIT, VARA HF will currently not attempt to connect to them. We believe that this is the cause of our issue. Said another way: If VARA is run, then VARA is closed, then VARA is run again, VARA will not re-establish a connection to RMS Express (or any other controller program over TCP) within this 60-second window. https://github.com/WheezyE/Winelink/issues/52#issuecomment-1279390072
https://bugs.winehq.org/show_bug.cgi?id=52521
Eric eric.wheez@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|UNCONFIRMED |RESOLVED
--- Comment #6 from Eric eric.wheez@gmail.com --- Georges Auberger (WH6AZ / Island Magic) et al, have created an open-source TCP port daemon for the VARA TNC (which this problem primarily affects) to help re-connect to ports more quickly. See VARAnny on github: https://github.com/islandmagic/varanny
https://bugs.winehq.org/show_bug.cgi?id=52521
--- Comment #7 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=52521
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Austin English austinenglish@gmail.com --- Actually closing.