PlusMinus0 / headless-jd2-docker

Headless JDownloader 2 Docker Container
31 stars 38 forks source link

Java8 with alpine crash #20

Closed project0 closed 5 months ago

project0 commented 6 years ago

seems the latest jre8-alpine image has some issues with muslc, my container keeps crashing:

Oct 04 18:57:49 stardust kernel: audit: type=1130 audit(1538672269.809:99): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-1847-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Oct 04 18:57:58 stardust systemd-coredump[1848]: Process 1257 (java) of user 0 dumped core.

                                                 Stack trace of thread 639:
                                                 #0  0x00007fe3dd305fbb n/a (ld-musl-x86_64.so.1)
                                                 #1  0x00007fe3dca4269f n/a (/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libjvm.so)
PlusMinus0 commented 6 years ago

Is this related to #21 ?

project0 commented 6 years ago

could be, i recognised my behaviour/exception starting when JD finishes the CRC checks, but i did not saw high amount of memory usage or OOMs.

mr-bolle commented 5 years ago

It seams like a java runtime issue. And i can eproduce this issue if i extract a archive with the jdownloader addon

jd2 | THREAD: 21448 jd2 | 21448|Log.L.log 10/27/18 12:40:16 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.blacklistpatterns.json jd2 | 21448|Log.L.log 10/27/18 12:40:16 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.passwordlist.json jd2 | 21448|Log.L.log 10/27/18 12:40:17 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.deepextractionblacklistpatterns.json jd2 | # jd2 | # A fatal error has been detected by the Java Runtime Environment: jd2 | # jd2 | # SIGSEGV (0xb) at pc=0x0000000000091c66, pid=14, tid=0x00007f349f9f0ae8 jd2 | # jd2 | # JRE version: OpenJDK Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11) jd2 | # Java VM: OpenJDK 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops) jd2 | # Derivative: IcedTea 3.8.0 jd2 | # Distribution: Custom build (Wed Jun 13 18:28:11 UTC 2018) jd2 | # Problematic frame: jd2 | # C 0x0000000000091c66 jd2 | # jd2 | # Core dump written. Default location: //core or core.14 jd2 | # jd2 | # An error report file with more information is saved as: jd2 | # /tmp/hs_err_pid14.log jd2 | # jd2 | # If you would like to submit a bug report, please include jd2 | # instructions on how to reproduce the bug and visit: jd2 | # http://icedtea.classpath.org/bugzilla jd2 | # jd2 | /opt/JDownloader/startJD2.sh: line 25: 14 Segmentation fault su-exec ${USER}:${GROUP} "$@"

docker stats jd2

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
1883ff65ed4b jd2 0.00% 16.36MiB / 11.64GiB 0.14% 5.75MB / 224kB 163MB / 1.8GB 3
cremor commented 5 years ago

I get the same error when a RAR archive with a password is extracted. Any chance to get that fixed @PlusMinus0 ?

mr-bolle commented 5 years ago

Hi,

i found maybe a solution, @jlesage wrote into his dockerfile a workaround about the extraction issue with a alpine image. I try now his image, and i can extract winrar archive with password, and jdownloader don't crash.

############################################################################## 7-Zip-JBinding Workaround JDownloader works well with the native openjdk8-jre package. There is one exception: the auto archive extractor. This feature uses 7-Zip-JBinding, which provides a platform-specific library (.so). The one for Linux x86_64 has been compiled against glibc and this is not loading correctly on Alpine.

To work around this issue (until we get a proper support of 7-Zip-JBinding on Alpine), we need to:

  • Get glibc, by using the glibc version of the baseimage.
  • Use Oracle JRE, to have a glibc-based Java VM. ##############################################################################
PlusMinus0 commented 5 years ago

Sorry for being so quiet, I didn’t find the time needed to fix the changes.

For now I created a dev branch an added dev images dev-alpine and dev-debian. Please check if debian works. I didn’t change a whole lot in the alpine image so this should still fail.

@mr-bolle I'll look into the fix for alpine tomorrow.

Klizzy commented 5 years ago

It seams like a java runtime issue. And i can eproduce this issue if i extract a archive with the jdownloader addon

jd2 | THREAD: 21448 jd2 | 21448|Log.L.log 10/27/18 12:40:16 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.blacklistpatterns.json jd2 | 21448|Log.L.log 10/27/18 12:40:16 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.passwordlist.json jd2 | 21448|Log.L.log 10/27/18 12:40:17 PM - FINER [ org.appwork.loggingv3.LogV3(finer) ] -> Read Config(File): /opt/JDownloader/cfg/org.jdownloader.extensions.extraction.ExtractionExtension.deepextractionblacklistpatterns.json jd2 | # jd2 | # A fatal error has been detected by the Java Runtime Environment: jd2 | # jd2 | # SIGSEGV (0xb) at pc=0x0000000000091c66, pid=14, tid=0x00007f349f9f0ae8 jd2 | # jd2 | # JRE version: OpenJDK Runtime Environment (8.0_171-b11) (build 1.8.0_171-b11) jd2 | # Java VM: OpenJDK 64-Bit Server VM (25.171-b11 mixed mode linux-amd64 compressed oops) jd2 | # Derivative: IcedTea 3.8.0 jd2 | # Distribution: Custom build (Wed Jun 13 18:28:11 UTC 2018) jd2 | # Problematic frame: jd2 | # C 0x0000000000091c66 jd2 | # jd2 | # Core dump written. Default location: //core or core.14 jd2 | # jd2 | # An error report file with more information is saved as: jd2 | # /tmp/hs_err_pid14.log jd2 | # jd2 | # If you would like to submit a bug report, please include jd2 | # instructions on how to reproduce the bug and visit: jd2 | # http://icedtea.classpath.org/bugzilla jd2 | # jd2 | /opt/JDownloader/startJD2.sh: line 25: 14 Segmentation fault su-exec ${USER}:${GROUP} "$@"

docker stats jd2

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O 1883ff65ed4b jd2 0.00% 16.36MiB / 11.64GiB 0.14% 5.75MB / 224kB 163MB / 1.8GB 3

I had exactly the same issue with the latest docker image (2018/08/30 downloaded). I created one container from the dev-debian image like suggested and it fixes the issue. I no longer have unexpected shutdowns on extraction of archives with a password. Thank you guys for the fix and keep up the good work! 👍🏻

edit: just tested it successfully with the newest latest version. The error don't occurs there

mr-bolle commented 5 years ago

@klizzy could you try to use the image from jlesage https://github.com/jlesage/docker-jdownloader-2 i don't have any issues if i extract downloads

Klizzy commented 5 years ago

@Klizzy could you try to use the image from jlesage https://github.com/jlesage/docker-jdownloader-2 i don't have any issues if i extract downloads

@mr-bolle thanks for the tip, but i want to use the headless version. The latest docker images works now as intended.

mr-bolle commented 5 years ago

Thanks for your feedback, the current latest version use Debian with the Java 11 runtime.

With the container from jlesage you can also run jdownloader as headless server. You can set the my jdownloader account with a VNC client.

CLARENNE-Q commented 4 years ago

same issue: /opt/JDownloader/startJD2.sh: line 25: 11 Segmentation fault (core dumped) su-exec ${USER}:${GROUP} "$@"