pilosa server fail to run on WSL
For bugs, please provide the following:
What's going wrong?
When I run the pilosa server I get the following error:
running server: opening server: opening TranslateFile: creating Mmap (size: 10737418240): exec format error
What was expected?
I was expecting the server to start successfully
Steps to reproduce the behavior
Installed WSL on Windows 10
$ uname -a Linux DESKTOP-9NCHT5L 4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
Install Pilosa for Linux ( as per documentation -- extract and copy binary file version 1.4.0)
$pilosa server
Information about your environment (OS/architecture, CPU, RAM, cluster/solo, configuration, etc.)
OS/architecture
$ uname -a Linux DESKTOP-9NCHT5L 4.4.0-18362-Microsoft #1049-Microsoft Thu Aug 14 12:01:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
CPU
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 36 bits physical, 48 bits virtual CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Core(TM) i7-8700T CPU @ 2.40GHz Stepping: 10 CPU MHz: 2400.000 CPU max MHz: 2400.0000 BogoMIPS: 4800.00 Virtualization: VT-x Hypervisor vendor: Windows Subsystem for Linux Virtualization type: container Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulq dq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand la hf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt ibrs ibpb stibp ssbd
Memory
$ inxi -m Memory: RAM: total: 31.78 GiB used: 15.04 GiB (47.3%) RAM Report: unknown-error: dmidecode was unable to generate data
For feature requests, please provide the following:
Description
Success criteria (What criteria will consider this ticket closeable?)
@akramassaf - pilosa does not work well on windows (mainly because of mmap), so if it's doable (if you integrate pilosa in your service/app), you can try to call:
import "github.com/pilosa/pilosa/syswrap"
func init() {
syswrap.SetMaxMapCount(0)
}
Maybe it can help.
Thank you Kuba for the update. I am in my initial assessment of the library and just started to test with it on my Windows machine. I assumed that it works on Windows, based on some reference to WSL in the official documentation. I will try your suggestion once I progress further in my trials. It worked perfectly on my native Linux machine.
We should remove those references, I don't think it will work well even with Kuba's workaround... there are a number of bits which call mmap that aren't controlled by that parameter.