Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59769

Testing a unix Pipe fails when run using kubernetes-jenkins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      I have a test which creates a (interprocess-channel) unix pipe, creates and attaches a client to the pipe, and asserts that it times out after X seconds if no data is emitted over the channel.

      When the test is executed via a custom PodTemplate, within the kubernetes-plugin's `container()` block, it fails with the following exception:

       14:00:41 ---- poll stdout ----
       14:00:41 running: "/opt/fst-wasi-sdk/bin/clang" "/home/jenkins/workspace/isolation/isolation/public/lucet-wasi/tests/guests/poll.c" "-target=wasm32-unknown-wasi" "sysroot=/opt/fst-wasi-sdk/share/wasi-sysroot" "-o" "/tmp/.tmpKDJhAm/out.wasm" "-Wall" "-Werror" "-Wl,-no-threads"
       14:00:41 thread 'poll' panicked at 'called `Result::unwrap()` on an `Err` value: ErrorMessage { msg: "runtime error: Runtime fault: FaultDetails { fatal: false, trapcode: Some(Unreachable), rip_addr: 140297967098212, rip_addr_details: Some(AddrDetails
      { in_module_code: true, file_name: Some(\"/tmp/.tmpKDJhAm/out.so\"), sym_name: None }
      ) }" } 

      However, ff I have the pipeline spawn the custom pod as per usual, but sleep() right before executing the test, allowing me to jump onto the container via kubectl, and then manually run the test (executing the same target called from the pipeline) it succeeds as expected. This test also succeeds if its executed using docker-server (non kubernetes)

      I have confirmed the user within the container being used is root, and permissions etc are correct. The file descriptor for the pipe gets created within /tmp/

      Test is creating a pipe using: https://docs.rs/nix/0.10.0/nix/unistd/fn.pipe.html

      GKE: 1.14.3-gke.11
      Jenkins: 2.190.1
      Kubernetes Plugin: 1.20.0

       

      Any ideas here?

            Unassigned Unassigned
            stigglor Jared Patterson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: