Running earthworm_7.10 on WSL1

108 views
Skip to first unread message

Jonathan Schmidt

unread,
Aug 8, 2023, 12:39:44 PM8/8/23
to Earthworm Community Forum
Hello All,
I am trying to set up Earthworm on a Dell laptop with Windows 10 using Windows Subsystem Linux (WSL). I am setting this up for testing modules prior to installing them on our production EW.  Despite the laptop being a Windows OS system, I'd like to leverage the WLS function since our production system is Linux based (Ubuntu).  I am using WSL1 as opposed to WSL2 on this laptop because WSL2 creates a virtual machine for the Linux system that doesn't interface with an active VPN to access my institutions network (some conflict with the IP of the Windows system and the VM having a different IP).  I'll also note I have set it up in the users home directory rather than in the systems /opt/ directory and have changed values in ew_linux.bash accordingly. I have walked through setting up the EW program, and I believe that I have everything set up appropriately, but when I try to run it with "startstop", the EW program fails to start and I get the following output:
-------------------------------------
startstop: Using config file startstop_unix.d
20230808_UTC_14:00:30 startstop: process <copystatus> <27269> started.
copystatus copystatus WAVE_RING
copystatus copystatus IN_RING
20230808_UTC_14:00:30 startstop: process <copystatus> <27270> started.
ERROR: tport_attach shmget ->header (22; Invalid argument) Region: 1000
ERROR: tport_attach shmget ->header (22; Invalid argument) Region: 1037
20230808_UTC_14:00:30 startstop: process <statmgr> <27271> started.
statmgr statmgr statmgr.d
export_generic export_generic export_generic.d
20230808_UTC_14:00:30 LoadTableEnvVariable(): nfiles 2
statmgr: Error opening descriptor file <slink2ew_MCKY1.desc>; exiting.
20230808_UTC_14:00:30 startstop: process <export_generic> <27272> started.
20230808_UTC_14:00:30 export_generic(MOD_EXPORT_GENERIC): Read command file <export_generic.d>
 Version 2.0 2018.05.03
ERROR: tport_attach shmget ->header (22; Invalid argument) Region: 1000
20230808_UTC_14:00:30 startstop: process <export_generic> <27273> started.
export_generic export_generic export_generic_wws.d
slink2ew slink2ew slink2ew.d
20230808_UTC_14:00:30 startstop: process <slink2ew> <27274> started.
20230808_UTC_14:00:30 export_generic(MOD_EXPORT_GENERIC_WWS): Read command file <export_generic_wws.d>
 Version 2.0 2018.05.03
ERROR: tport_attach shmget ->header (22; Invalid argument) Region: 1000
slink2ew slink2ew slink2ew_MCKY1.d
20230808_UTC_14:00:30 startstop: process <slink2ew> <27275> started.
20230808_UTC_14:00:30 startstop: process <slink2ew> <27276> started.
slink2ew slink2ew slink2ew_MCKY2.d
20230808_UTC_14:00:30 startstop: process <import_generic> <27277> started.
import_generic import_generic import_generic.d
slink2ew: Error opening command file <slink2ew_MCKY1.d>; exiting!
slink2ew: configure() failed
slink2ew: Error opening command file <slink2ew_MCKY2.d>; exiting!
slink2ew: configure() failed
20230808_UTC_14:00:31 slink2ew(MOD_SLINK2EW): Read command file <slink2ew.d>
20230808_UTC_14:00:31 could not find state file: /home/seismic/EW/opt/earthworm/run_working/params//slink126.state
ERROR: tport_attach shmget ->header (22; Invalid argument) Region: 1000
ERROR: tport_attach shmget ->header (2; No such file or directory) Region: 1005

                    EARTHWORM-64 SYSTEM STATUS

        Hostname-OS:            KGSip214 - Linux 4.4.0-19041-Microsoft
        Start time (UTC):       Tue Aug  8 14:00:30 2023
        Current time (UTC):     Tue Aug  8 14:00:31 2023
        Disk space avail:       27883900 kb
        Ring  1 name/key/size:  WAVE_RING / 1000 / 1024 kb
        Ring  2 name/key/size:  IN_RING / 1037 / 1024 kb
        Ring  3 name/key/size:  STATUS_RING / 1038 / 512 kb
        Startstop's Log Dir:    /home/seismic/EW/opt/earthworm/run_working/log/
        Startstop's Params Dir: /home/seismic/EW/opt/earthworm/run_working/param
        Startstop's Bin Dir:    /home/seismic/EW/opt/earthworm/earthworm_7.10/bi
        Startstop Version:      v7.10 2019-08-13 (64 bit)

         Process  Process               Class/    CPU
          Name      Id      Status     Priority   Used    Argument
         -------  -------   ------     --------   ----    --------
       startstop   27268    Alive         ??/ 0 00:00:00  -
      copystatus   27269    Zombie                        WAVE_RING STATUS_RING
      copystatus   27270    Zombie                        IN_RING STATUS_RING
         statmgr   27271    Zombie                        statmgr.d
  export_generic   27272    Zombie                        export_generic.d
  export_generic   27273    Zombie                        export_generic_wws.d
        slink2ew   27274    Zombie                        slink2ew.d
        slink2ew   27275    Zombie                        slink2ew_MCKY1.d
        slink2ew   27276    Zombie                        slink2ew_MCKY2.d
  import_generic   27277    Zombie                        import_generic.d

   Press return to print Earthworm status, or
   type restart nnn where nnn is proc id or name to restart, or
   type quit<cr> to stop Earthworm.

-------------------------------------

The error seems to be centered around the
"ERROR: tport_attach shmget ->header (22; Invalid argument)..."

I'll note that in the configuration documentation, it indicates that for Linux systems that the System Shared Memory needs to be set in the /etc/sysctl.conf file, and that the SHMMAX and SHMALL need to be set to = "134217728" if what is present in the file is lower than that value. In the sysctl.conf file on my WSL1 system, neither shmmax and shmall values are entries in that file. However, when I go to the /proc/sys/kernel/ directory, I see that a shmmax file exists with a value of "4294967295", but no shmall file exists. Running  the command "ipcs -l" in the terminal, I get the following:
-------------------------------------
ipcs -l

unable to fetch message limits

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 18014398509481983
max total shared memory (kbytes) = 18014398509481980
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 32000
max semaphores per array = 32000
max semaphores system wide = 1024000000
max ops per semop call = 500
semaphore max value = 32767

-------------------------------------

Based on the "ipcs -l" output, I don't believe the max/min seg sizes are causing EW crash. Any help debugging this issue would be greatly appreciated.

Cheers,
Jon S

Robert Beer

unread,
Aug 8, 2023, 4:37:24 PM8/8/23
to earthwo...@googlegroups.com
Jonathan,

This does not address your specific problem, but may be a better path forward for you.  Consider installing Oracle VirtualBox and running the Earthworm software in a Linux VM.  That way you can better mirror the production Linux environment.

--
--
You received this message because you are subscribed to the Google
Groups "Earthworm Community Forum" group.
 
To post to this group, send an email to earthwo...@googlegroups.com
 
To unsubscribe from this group, send an email to
earthworm_for...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/earthworm_forum?hl=en

---
You received this message because you are subscribed to the Google Groups "Earthworm Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to earthworm_for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/earthworm_forum/923771f1-aab7-46fe-b165-0eaadc404911n%40googlegroups.com.


--
Bob Beer <r-b...@onu.edu>

Stefan Lisowski

unread,
Aug 8, 2023, 4:43:07 PM8/8/23
to earthwo...@googlegroups.com, Robert Beer
I agree with Robert's suggestion. Don't mirror a production Linux system
with WSL, use Virtualbox or VMWare. WSL has a bunch of quirks that you
won't see with a VM.

As to the actual answer to your question; I'm not sure; I would expect
WSL could create shared memory that Earthworm could work with, but it
has been a while since I used WSL so I don't recall how far I got with it.

Stefan
> /startstop: Using config file startstop_unix.d
>    type quit<cr> to stop Earthworm./
> -------------------------------------
>
> The error seems to be centered around the
> "ERROR: tport_attach shmget ->header (22; Invalid argument)..."
>
> I'll note that in the configuration documentation, it indicates that
> for Linux systems that the System Shared Memory needs to be set in
> the /etc/sysctl.conf file, and that the SHMMAX and SHMALL need to be
> set to = "134217728" if what is present in the file is lower than
> that value. In the sysctl.conf file on my WSL1 system, neither
> shmmax and shmall values are entries in that file. However, when I
> go to the /proc/sys/kernel/ directory, I see that a shmmax file
> exists with a value of "4294967295", but no shmall file exists.
> Running  the command "ipcs -l" in the terminal, I get the following:
> -------------------------------------
> /ipcs -l
>
> unable to fetch message limits
>
> ------ Shared Memory Limits --------
> max number of segments = 4096
> max seg size (kbytes) = 18014398509481983
> max total shared memory (kbytes) = 18014398509481980
> min seg size (bytes) = 1
>
> ------ Semaphore Limits --------
> max number of arrays = 32000
> max semaphores per array = 32000
> max semaphores system wide = 1024000000
> max ops per semop call = 500
> semaphore max value = 32767/
> -------------------------------------
>
> Based on the "ipcs -l" output, I don't believe the max/min seg sizes
> are causing EW crash. Any help debugging this issue would be greatly
> appreciated.
>
> Cheers,
> Jon S
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
>
> To post to this group, send an email to
> earthwo...@googlegroups.com
> <mailto:earthwo...@googlegroups.com>
>
> To unsubscribe from this group, send an email to
> earthworm_for...@googlegroups.com
> <mailto:earthworm_forum%2Bunsu...@googlegroups.com>
>
> For more options, visit this group at
> http://groups.google.com/group/earthworm_forum?hl=en
> <http://groups.google.com/group/earthworm_forum?hl=en>
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to earthworm_for...@googlegroups.com
> <mailto:earthworm_for...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/earthworm_forum/923771f1-aab7-46fe-b165-0eaadc404911n%40googlegroups.com <https://groups.google.com/d/msgid/earthworm_forum/923771f1-aab7-46fe-b165-0eaadc404911n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Bob Beer <r-b...@onu.edu <mailto:r-b...@onu.edu>>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
>
> To post to this group, send an email to earthwo...@googlegroups.com
>
> To unsubscribe from this group, send an email to
> earthworm_for...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/earthworm_forum?hl=en
> <http://groups.google.com/group/earthworm_forum?hl=en>
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Earthworm Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to earthworm_for...@googlegroups.com
> <mailto:earthworm_for...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/earthworm_forum/CAO8K9dc6_1HMwM70ovW%3Dy6eYyrkrwVTrycAwW8S4MsK6rvTUdA%40mail.gmail.com <https://groups.google.com/d/msgid/earthworm_forum/CAO8K9dc6_1HMwM70ovW%3Dy6eYyrkrwVTrycAwW8S4MsK6rvTUdA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--








*To follow ISTI news and updates please subscribe to our newsletter
"the isti letter" at  https://www.isti.com/newsletter-sign-up
<https://www.isti.com/newsletter-sign-up>.*





Jonathan Schmidt

unread,
Aug 9, 2023, 10:23:06 AM8/9/23
to Earthworm Community Forum
Thanks Robert and Stefan for the suggestion. I will see if I can get a virtual boxes to work on that machine and report back. Just a quick update that might be helpful to anyone else in this situation regarding WLS. I have a primary workstation that runs Windows 11 with WSL2 and after walking through the same configuration steps as I had with the laptop setting up EW on the WLS2's Ubuntu distribution, I was able to get a working version of EW. I suspect WSL2 worked over WSL1 because it does create a VM similar to the programs Robert suggested. I don't believe WSL1 (to my understanding) is permitted by the Windows OS to allocates memory or other hardware appropriately where an EW distro can run properly. 

That said, I think there may still be an issue with trying to use a VPN and the VM, which is what I was hoping using WSL1 would avoid. The more I dig into this however, it may be an unavoidable issue... 
Thanks again for the help!

Jon S

Reply all
Reply to author
Forward
0 new messages