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

Debugger invoked when first cl+ssl shared object is not found #1370

Closed
4 tasks
athos-ribeiro opened this issue Apr 7, 2022 · 0 comments · Fixed by #1372
Closed
4 tasks

Debugger invoked when first cl+ssl shared object is not found #1370

athos-ribeiro opened this issue Apr 7, 2022 · 0 comments · Fixed by #1372

Comments

@athos-ribeiro
Copy link
Contributor

The pgloader Ubuntu package stopped working after Ubuntu transitioned to OpenSSL 3.
The issue lied in the fact that cl+ssl did not fully support OpenSSL 3. We did forward cl-plus-ssl/cl-plus-ssl#154 to fix the issue.

With the above cl+ssl patch applied, when we run pgloader, it invokes the debugger as soon as the first try to dlopen fails for libcrypto.so.1.1.

If we tell the debugger to continue, execution resumes normally, with no errors.

# pgloader --version

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {1000DD4103}>:
  Error opening shared object "libcrypto.so.1.1":
  libcrypto.so.1.1: cannot open shared object file: No such file or directory.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [CONTINUE       ] Skip this shared object and continue.
  1: [RETRY          ] Retry loading this shared object.
  2: [CHANGE-PATHNAME] Specify a different pathname to load the shared object from.
  3: [ABORT          ] Exit from the current thread.

(SB-SYS:DLOPEN-OR-LOSE #S(SB-ALIEN::SHARED-OBJECT :PATHNAME #P"libcrypto.so.1.1" :NAMESTRING "libcrypto.so.1.1" :HANDLE NIL :DONT-SAVE NIL))
0] CONTINUE
pgloader version "3.6.3~devel"
compiled with SBCL 2.1.11.debian
  • pgloader --version

3.6.3
```

  • did you test a fresh compile from the source tree?

No, I am using a Debian/Ubuntu package.

  • did you search for other similar issues?

Yes, I found #153, which is quite similar to what I have been experiencing. However, the fix for #153 is included in the package I am testing.

  • how can I reproduce the bug?

On an environment with only OpenSSL3 available, build cl+ssl (to ensure it is linked to the openssl 3 libraries). Then, build pgloader with this new version of cl+ssl and ansure OpenSSL 1.1 is not available.

Finally, run the newly built version of pgloader. You should see the above error.

athos-ribeiro added a commit to athos-ribeiro/pgloader that referenced this issue Apr 12, 2022
cl+ssl::libcrypto is also read at startup. If not properly closed in the
hooks, together with libssl, libcrypto will be loaded at startup and if
the first cl+ssl file alternative fails, the debugger is invoked.

* Fixes dimitri#1370
df7cb pushed a commit that referenced this issue Jun 23, 2022
cl+ssl::libcrypto is also read at startup. If not properly closed in the
hooks, together with libssl, libcrypto will be loaded at startup and if
the first cl+ssl file alternative fails, the debugger is invoked.

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

Successfully merging a pull request may close this issue.

1 participant