commit_memory Operation not permitted?

Any questions? Need some help?
Post Reply
omnigamer
Donor
Posts: 2
Joined: 30 Apr 2016, 18:25

commit_memory Operation not permitted?

Post by omnigamer »

Been having an issue that I think must be related to permissions; I try to run the amc script in filebot as part of a process that triggers after a transmission torrent finishes downloading, but I get the following error when it tries to run:

Code: Select all

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f65d882b000, 2555904, 1) failed; error='Operation not permitted' (errno=1)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid884134.log
Unfortunately, the tmp file is either never created or immediately gets cleaned up, so no info there unfortunately.

I can run the exact same invocation of the amc as root with no issues. I'll paste the script I use to invoke amc from transmission below. I'm not aware of any permissions java needs to create memory, so I'm very confused about what could be going on here.

Code: Select all

#!/bin/sh

# Input Parameters
ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
ARG_NAME="$TR_TORRENT_NAME"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="/mnt/array/data"

if [[ "$TR_TORRENT_DIR" == "$CONFIG_OUTPUT/Downloads/Movies" ]]; then
    ARG_LABEL="Movie"
elif [[ "$TR_TORRENT_DIR" == "$CONFIG_OUTPUT/Downloads/Music" ]]; then
    ARG_LABEL="Music"
fi

if [[ "$ARG_LABEL" == "Music" ]]; then
    #beet import /mnt/array/data/Downloads/Music
    true
elif [[ "$ARG_LABEL" != "N/A" ]]; then
    /usr/bin/filebot -script fn:amc --output "$CONFIG_OUTPUT" --action clone --conflict override -non-strict --log-file /tmp/amc.log --def unsorted=y music=y artwork=y subtitles="en" plex="redacted" kodi="redacted" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" "exec=chmod -R 755 '{folder}'" "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} - {s}x{e.pad(2)} - {t}{'.'+lang}" "movieFormat=Movies/{n} ({y})/{n} ({y}){'.'+lang}" "musicFormat=Music/{n}/{album+'/'}{pi.pad(2)+' '}{t}"
fi
User avatar
rednoah
The Source
Posts: 20867
Joined: 16 Nov 2011, 08:59

Re: commit_memory Operation not permitted?

Post by rednoah »

:?: Are you using a shared hosting environment?


:idea: The issue is likely unrelated to file system permissions. The error message strongly suggests that you don't have enough available RAM, or that the OS refuses to give RAM to your processes. This is a generic error unrelated to FileBot specifically, so a general Google search should give you some clues.


:idea: If you're using a shared hosting environment, then the OS my report hundreds of GB of available RAM, but then refuse to allocate it to your programs due to shared resource limits. In this case, you may need to use the JAVA_OPTS environment variable to manually set the appropriate memory limit (ask your hosting provider for the exact limits they impose) for the java process.


e.g.

Code: Select all

export JAVA_OPTS="-Xmx256m"
filebot -script fn:sysinfo


EDIT:

:idea: Not being able to write error logs to /tmp is probably a file system permissions problem though. You can probably change the default crash dump file location via some environment variable.
:idea: Please read the FAQ and How to Request Help.
Post Reply