failed to map segment from shared object when /tmp is mounted with noexec

オープン
#240 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
backend

調査の方向性

The issue provides a Java README sample but names no implementation files or tests. Start by locating how Snappy extracts and loads its native shared library, then check whether the temporary directory can be configured or documented for noexec mounts. Done means the behavior is addressed and verified, or the limitation and workaround are clearly documented.

索引モデルが issue の本文から書いたものです。

説明

Currently if you mount the /tmp folder with the noexec option you get

/tmp/snappy-1.1.4-6321baa3-1a72-41b6-bbbc-2b1a642bc8c8-libsnappyjava.so: /tmp/snappy-1.1.4-6321baa3-1a72-41b6-bbbc-2b1a642bc8c8-libsnappyjava.so: failed to map segment from shared object: Operation not permitted
--
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)

This is true even with the sample code from the README

package test;

import java.io.IOException;
import org.xerial.snappy.Snappy;

/**
 * Snappy example
 *
 */
public class App
{
    public static void main( String[] args ) throws IOException {
        String input = "Hello snappy-java! Snappy-java is a JNI-based wrapper of "
                + "Snappy, a fast compresser/decompresser.";
        byte[] compressed = Snappy.compress(input.getBytes("UTF-8"));
        byte[] uncompressed = Snappy.uncompress(compressed);

        String result = new String(uncompressed, "UTF-8");
        System.out.println(result);
    }
}

Is this expected and should be documented?
Or is there something that can be done to prevent requiring the exec option for tmp

主要言語
Java
スター
1.1k
フォーク
261
平均マージ
2分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xerial/snappy-java のほかの issue

xerial/snappy-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。