Skip to content
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

Terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' #8

Open
ChiefConversion opened this issue Apr 12, 2018 · 10 comments

Comments

@ChiefConversion
Copy link

Hello,
Firstly, thanks for sharing your code, it's a great help.

I'm currently setting up your scripts and more particularly LibreOffice on AWS lambda. However, when I want to execute soffice command to convert a document I have the following error:

_ { Error: Command failed: cd /tmp && ./instdir/program/soffice --headless --invisible --nodefault --nofirststartwizard --nolockcheck --nologo --norestore --convert-to pdf --outdir /tmp/ fileTest

terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'
terminate called recursively

Fatal exception: Signal 6
Stack:
/tmp/instdir/program/libuno_sal.so.3(+0x3ca00)[0x7ff76c8eba00]
/tmp/instdir/program/libuno_sal.so.3(+0x3cb70)[0x7ff76c8ebb70]
/lib64/libc.so.6(+0x35270)[0x7ff76c520270]
/lib64/libc.so.6(gsignal+0x37)[0x7ff76c5201f7]
/lib64/libc.so.6(abort+0x148)[0x7ff76c5218e8]
/var/lang/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xed)[0x7ff765a8faed]
/var/lang/lib/libstdc++.so.6(+0x5daf6)[0x7ff765a8daf6]
/var/lang/lib/libstdc++.so.6(+0x5c6b9)[0x7ff765a8c6b9]
/var/lang/lib/libstdc++.so.6(__gxx_personality_v0+0xd2)[0x7ff765a8cd82]
/var/lang/lib/libgcc_s.so.1(+0x10070)[0x7ff765829070]
/var/lang/lib/libgcc_s.so.1(_Unwind_Resume+0x59)[0x7ff7658296f9]
/tmp/instdir/program/libmergedlo.so(+0x2ef3cb1)[0x7ff76fa00cb1]
/tmp/instdir/program/libuno_sal.so.3(+0x16c62)[0x7ff76c8c5c62]
/tmp/instdir/program/libuno_sal.so.3(+0x3cb2f)[0x7ff76c8ebb2f]
/lib64/libc.so.6(+0x35270)[0x7ff76c520270]
/lib64/libc.so.6(gsignal+0x37)[0x7ff76c5201f7]
/lib64/libc.so.6(abort+0x148)[0x7ff76c5218e8]
/var/lang/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x15d)[0x7ff765a8fb5d]
/var/lang/lib/libstdc++.so.6(+0x5daf6)[0x7ff765a8daf6]
/var/lang/lib/libstdc++.so.6(+0x5db41)[0x7ff765a8db41]
/var/lang/lib/libstdc++.so.6(__cxa_rethrow+0x46)[0x7ff765a8ddd6]
/tmp/instdir/program/libmergedlo.so(_ZN12SvtSysLocaleC1Ev+0x33b)[0x7ff76f6d56db]
/tmp/instdir/program/libmergedlo.so(+0x1407a7b)[0x7ff76df14a7b]
/tmp/instdir/program/libmergedlo.so(+0x1eb9983)[0x7ff76e9c6983]
/tmp/instdir/program/libmergedlo.so(+0x1ec0359)[0x7ff76e9cd359]
/tmp/instdir/program/libmergedlo.so(+0x2ef54b6)[0x7ff76fa024b6]
/tmp/instdir/program/libmergedlo.so(_Z6SVMainv+0x22)[0x7ff76fa025a2]
/tmp/instdir/program/libmergedlo.so(soffice_main+0x8a)[0x7ff76e9ed54a]
/tmp/instdir/program/soffice.bin[0x4006eb]
/lib64/libc.so.6(_libc_start_main+0xf5)[0x7ff76c50cc05]
/tmp/instdir/program/soffice.bin[0x400721]

Do you have any idea? It seems that the lo.tar.gz contains a binary file that AWS lambda can't open. I tried to do the same thing on MAC OSX, and I have the following error:

./instdir/program/soffice: line 174: AWS/instdir/program/oosplash: cannot execute binary file
./instdir/program/soffice: line 174: AWS/instdir/program/oosplash: Undefined error: 0

I checked and this oosplash is present in the directory, I tried to change the permissions but it didn't work.
By the way, I don't have this issue when I use the standard LibreOffice distribution.

@vladholubiev
Copy link
Owner

@ChiefConversion this binary won't run on macOS X, it's compiled for Amazon Linux

This looks like a problem with your file. What format is it? From your logs looks like this file is without extension.

@ChiefConversion
Copy link
Author

It was a .txt file. However, I noticed something when I installed your packages on an Amazon Linux VM, and I tried to convert a document and I still have the same issue.
For example, if I try to run " ./instdir/program/soffice ", I have exactly the same issue. So I don't think that the issue is the format.
I changed the format to txt, and I have the same result.

@vladholubiev
Copy link
Owner

@ChiefConversion do you mind sharing that .txt file you tried? It's hard to help otherwise

@ChiefConversion
Copy link
Author

I tried several txt files for example, I just wrote 'Hello World' in the txt file, or I used this one https://github.com/vladgolubev/serverless-libreoffice/blob/master/src/libreoffice.js that I converted to .txt before.
Just to be sure about the lambda process, right now when I have a AWS lambda call, I upload lo.tar.gz from my S3 bucket (which contains your LibreOffice executable) that I store in the /tmp/ directory.
Then I use the following command to "unzip" it, "tar -xvzf lo.tar.gz", and then I can download my txt file to convert it.

@vladholubiev
Copy link
Owner

@ChiefConversion hmmmmm, are you using node.js Lambda environment? Or another language? That's the only thing which comes to my mind which may cause code behave differently in my and yours Lambda.

Also, did you try the latest compiled version? Either way, did you try previous/next version from here https://github.com/vladgolubev/serverless-libreoffice/releases ?

@ChiefConversion
Copy link
Author

Yes, I'm using node.js Lambda environment (8.10). Supposing the error comes from AWS lambda, I tried to run the conversion on Amazon Linux VM, and I have the same issue. So I don't think that the issue is with AWS Lambda and its environment.
I also tried all the lo.tar.gz available on this page https://github.com/vladgolubev/serverless-libreoffice/releases

@abridger21
Copy link

I'm having a similar issue trying to run LibreOffice in Lambda. It only seems to surface running under load. I know this is an older thread, but wondering if you ever figured out a solution?

@Hru28
Copy link

Hru28 commented Jul 25, 2019

I am running into the same issue. I have easier repro steps. Download LibreOffice-6.1 https://github.com/vladgolubev/serverless-libreoffice/releases. Decompress and compress using tar on Mac without making any changes. Test with the new compressed file in Lambda. The original downloaded file works but the one compressed on Mac does not.

@mrvisser
Copy link

Same here, running the compile.sh on a Lambda AMI, the resulting soffice binary on the CentOS machine gives the above error. That's for 6.2.1.2.

@randombluff
Copy link
Contributor

randombluff commented Jan 10, 2020

I got such errors a few times while tried to run build and tests for amazon linux 2. Uno library exceptions are mostly caused in context of the incorrect build and run platforms. If you built in let's say Amazon Linux 1 and then trying to run the code on Amazon Linux 1 that differs from the first one, mostly if there where not the same dependencies, .so files, or they were compiled with other gcc it can cause this kind of issue, even broken softlink is possible.
Try to make compile environment as close to the runtime as you can.
Also, you can check here(https://languagetool.org/issues) ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants