-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errno::ESPIPE Illegal seek -- Docker container errrors #2034
Comments
Hi @andrewsheelan! Can you try to build truffleruby and your rails app on top of Debian image? Also, please don't use multi-stage builds (until we find out the cause of the original issue) in order to avoid problems with data reusing. Dockerfile: FROM debian
RUN apt-get update
RUN apt-get install -y locales
RUN dpkg-reconfigure locales
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN echo "LANG=en_US.UTF-8" >> /etc/locale.conf
RUN locale-gen en_US.UTF-8
RUN apt-get install -y vim
ARG GRAAL_VERSION
ARG JDK_VERSION
RUN set -xeu && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates `# stays, not having this is just not useful` \
curl \
&& \
mkdir /graalvm && \
curl -fsSL "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAAL_VERSION}/graalvm-ce-${JDK_VERSION}-linux-amd64-${GRAAL_VERSION}.tar.gz" \
| tar -zxC /graalvm --strip-components 1 && \
find /graalvm -name "*src.zip" -printf "Deleting %p\n" -exec rm {} + && \
{ test ! -d /graalvm/legal || tar czf /graalvm/legal.tgz /graalvm/legal/; } && \
{ test ! -d /graalvm/legal || rm -r /graalvm/legal; } && \
rm -rf /graalvm/man `# does not exist in java11 package` && \
echo Cleaning up... && \
apt-get remove -y \
curl \
&& \
apt-get autoremove -y && \
apt-get clean && rm -r "/var/lib/apt/lists"/* && \
echo 'PATH="/graalvm/bin:$PATH"' | install --mode 0644 /dev/stdin /etc/profile.d/graal-on-path.sh && \
echo OK
# This applies to all container processes. However, `bash -l` will source `/etc/profile` and set $PATH on its own. For this reason, we
# *also* set $PATH in /etc/profile.d/*
# Maven and GraalVM settings
RUN apt-get update
RUN apt-get install -y wget unzip
RUN wget http://us.mirrors.quenda.co/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip
RUN unzip apache-maven-3.6.3-bin.zip
ENV PATH=/apache-maven-3.6.3/bin:/graalvm/bin:$PATH
# truffleruby deps & setup
RUN apt-get update
RUN apt-get install -y make gcc libssl-dev libz-dev
RUN gu install ruby
RUN /graalvm/languages/ruby/lib/truffle/post_install_hook.sh
RUN mkdir /app
RUN gem install bundler -v '~> 2'
RUN apt-get install -y git
RUN apt-get install -y sqlite3 libsqlite3-dev
WORKDIR /app and version: '3.4'
services:
graalvm: &graalvm
image: graalvm:0.0.1-dev
build:
context: .
dockerfile: ./Dockerfile
args:
- GRAAL_VERSION=20.1.0
- JDK_VERSION=java11
volumes:
- .:/app:cached
- bundle:/bundle
- ~/.ssh:/root/.ssh:ro
tmpfs:
- /tmp
environment:
- BUNDLE_PATH=/bundle
- HISTFILE=/bundle/.bash_history
- PRY_HISTFILE=/bundle/.pry_history
- JAVA_HOME=/graalvm
- SL_BUILD_NATIVE=false
networks:
default:
stdin_open: true
tty: true
runner:
<<: *graalvm
entrypoint: /bin/bash
volumes:
bundle:
graalvm:
networks:
default: |
@ssnickolay still seeing the same error when I do a bundle install |
@andrewsheelan is this error happen in the beginning of bundle execution or with particular gem installation? |
@ssnickolay this happens pretty randomly while fetching gem metadata and looking up gems so yeah in the beginning of bundle execution. Individual gem installations works fine. |
@andrewsheelan can you share your |
Gemfilesource 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] Gemfile.lock
|
@ssnickolay attached. |
That might be due to #1895 (fixed on master). |
I guess the main problem is #62 By steps (with my
I stopped the experiment since there are no truffleruby related problems (except nokogiri issue, but this is a common problem). |
Nokogiri should work fine, I don't think it's the issue here. There is a lseek() call here:
which seems to cause that Illegal seek (Errno::ESPIPE) .
I'll try to reproduce. I tried outside Docker once but couldn't reproduce. |
I've looked at this and it's a bit puzzling. For now I've cleaned up code related to that to help make this error clearer. |
@eregon when this is ready I can pull the latest and re-run the test. Thanks. |
762197b is the cleanup. I'd like to get #1414 fixed too so we get a more useful backtrace here, but not sure when that will be done. |
@eregon Pulled the latest and was able to build it. Thanks.
Am trying to do some performance comparisons. I did face issues when installing stackprof gem. Will do some more testing and keep you guys posted. For now we're good. Also thanks to @ssnickolay . I'll use your dockerfile as well once we have the official release. |
Thanks for checking. I'd like to close this issue since the bug seems resolved now. |
This seems to happen again: #2012 (comment) |
@petenorth Could you tell me how to reproduce #2012 (comment) and try to run it that way again? That issue still exists, but rerunning should give more information due to the backtrace including the core libraries files now. |
@eregon I hacked an existing github workflow https://github.com/petenorth/decimal-rounding-ruby/blob/master/.github/workflows/ruby.yml
|
Just kicked off another run and it seems to be fine https://github.com/petenorth/decimal-rounding-ruby/runs/891326461?check_suite_focus=true |
It seems transient (seemed to happen at different points in time in past reports, not always during installing the same gem) and probably needs to install many gems to increase the chance to hit I think. |
Happened here too:
|
* The existing write buffering from Rubinius is buggy, complicated, and missing synchronization. Write buffering does not seem needed in Ruby (unlike read buffering). It also caused an extra copy of the bytes. * Also makes it easier to reason about RDWR IOs since now there cannot be both directions using the same buffer. * Ensure every usage of @ibuffer is guarded by #ensure_open_and_readable or handles @ibuffer being nil. * Fixes oracle#2034
This should be fixed by 18089f0, since it removes that entire code path. |
Am trying to truffleruby convert - my dockerized rails enviroment
Here's my new Dockerfile with verbose enabled:
Dockerfile
Here's the error am receiving:
The text was updated successfully, but these errors were encountered: