getgauge / gauge-java

Java runner for Gauge
https://gauge.org
Apache License 2.0
91 stars 47 forks source link

Failed to start gauge API - 0.8.1 is failing on alpine images #674

Closed haroon-sheikh closed 2 years ago

haroon-sheikh commented 2 years ago

Describe the bug Failed to start gauge API - 0.8.1 is failing on alpine images

To Reproduce Steps (or project) to reproduce the behavior:

  1. Update the gauge-java version to 0.8.1 in https://github.com/getgauge-examples/java-maven-selenium
  2. Run the following
docker run --rm -it -v $(pwd):/usr/src/app -v /Users/${USER}/.m2:/root/.m2 sitture/docker-gauge-java:1.4.3 mvn gauge:validate

Error:

[Gauge]
Failed to start gauge API: Error occurred while waiting for runner process to finish.
Error : exit status 1

Get Support ----------------------------
    Docs:          https://docs.gauge.org
    Bugs:          https://github.com/getgauge/gauge/issues
    Chat:          https://github.com/getgauge/gauge/discussions

Your Environment Information -----------
    linux, 1.4.3, f98dd40
    html-report (4.1.4), java (0.8.0), reportportal (1.13.0), screenshot (0.1.0), xml-report (0.2.3)
➜  java-maven-selenium git:(master) ✗ docker run --rm -it -v $(pwd):/usr/src/app -v /Users/${USER}/.m2:/root/.m2 sitture/docker-gauge-java:1.4.3 gauge -v          
Gauge version: 1.4.3
Commit Hash: f98dd40

Plugins
-------
html-report (4.1.4)
java (0.8.0)
reportportal (1.13.0)
screenshot (0.1.0)
xml-report (0.2.3)

Additional context Add any other context about the problem here.

i-whammy commented 2 years ago

Hi @haroon-sheikh , it seems the version of gauge-java is 0.8.0 in the log you attached. Is this as what you intended?

haroon-sheikh commented 2 years ago

Good spot @i-whammy. That was just me testing with different versions, the same issue persists with 0.8.1

[INFO] --- gauge-maven-plugin:1.4.2:validate (default-cli) @ active_admin ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000003efe, pid=103, tid=108
#
# JRE version: OpenJDK Runtime Environment (11.0.14+9) (build 11.0.14+9-alpine-r0)
# Java VM: OpenJDK 64-Bit Server VM (11.0.14+9-alpine-r0, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  0x0000000000003efe
#
#
No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /usr/src/app/hs_err_pid103.log
[thread 125 also had an error]
[thread 129 also had an error]
[thread 126 also had an error]
[thread 128 also had an error]
#
# If you would like to submit a bug report, please visit:
#   https://gitlab.alpinelinux.org/alpine/aports/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Error occurred while waiting for runner process to finish.
Error : exit status 1
Error ----------------------------------

[java]
process /usr/bin/java with pid 103 quit unexpectedly. signal: aborted

[Gauge]
Failed to start gauge API: Error occurred while waiting for runner process to finish.
Error : exit status 1

Get Support ----------------------------
    Docs:          https://docs.gauge.org
    Bugs:          https://github.com/getgauge/gauge/issues
    Chat:          https://github.com/getgauge/gauge/discussions

Your Environment Information -----------
    linux, 1.4.3, f98dd40
    html-report (4.1.4), java (0.8.1), reportportal (1.13.0), screenshot (0.1.0), xml-report (0.2.3)
haroon-sheikh commented 2 years ago

@sriv have you had a chance to look at this? is there anything I can do to help please?

haroon-sheikh commented 2 years ago

Related to https://github.com/grpc/grpc-java/issues/8751 since the grpc bump e1fbe2a3fd88eeef550b647794acdae512cdd556

The workaround is to add the following to alpine/Dockerfille:

RUN apk add gcompat

ENV LD_PRELOAD=/lib/libgcompat.so.0
haroon-sheikh commented 2 years ago

@zabil @sriv Do you think we can downgrade the grpc version to < 1.42.x? The workaround above works for gauge but break anything else running within the image?

zabil commented 2 years ago

Thanks for investigating @haroon-sheikh please feel free to send a pull request for the downgrade and let's take a call.