On 22/05/26 11:20AM, Omar Polo wrote:
> Hello ports,
> 
> now that we have an updated jna, here's the port that I was working on:
> 
> % pkg_info opensearch
> Information for inst:opensearch-1.3.2
> 

I tested this on my amd64 box, the package can be built, but I'm unable to 
start it:

# doas -u _opensearch /usr/local/opensearch/bin/opensearch

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for Failed to 
commit area from 0x00000000c0000000 to 0x0000000100000000 of length 1073741824.
# An error report file with more information is saved as:
# /var/log/opensearch/hs_err_pid11809.log
error:
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 
1073741824, 0) failed; error='ENOMEM' (errno=12)
        at 
org.opensearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:139)
        at 
org.opensearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:101)
        at 
org.opensearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:72)
        at 
org.opensearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:152)
        at 
org.opensearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:110)

(full log file was sent off-list)

I've bumped the maxfiles, login class and allocated 22GB of RAM to this test 
box:

$ sysctl | grep files    
kern.maxfiles=65535

$ vmstat                                                                        
                                  
 procs    memory       page                    disks    traps          cpu
 r   s   avm     fre  flt  re  pi  po  fr  sr wd0 cd0  int   sys   cs us sy id
 1  73  224M  19920M 5988   0   0   0   0   0 144   0  167  8965 1401  4  5 91

login.conf:

opensearch:\
        :openfiles=65536:\
        :tc=daemon:

I also tried:

opensearch:\
        :datasize-cur=infinity:\
        :datasize-max=infinity:\
        :openfiles-max=16384:\
        :openfiles-cur=16384:\
        :tc=daemon:

... but the errors remain

If I try to start it with rcctl, it will fail after a few seconds:

$ doas rcctl start opensearch; sleep 10; doas rcctl check opensearch;
opensearch(ok)
opensearch(failed)

Have I missed something?

Reply via email to