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

Bug #1968594 reported by Athos Ribeiro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pgloader (Ubuntu)
Fix Released
High
Athos Ribeiro

Bug Description

The pgloader package stopped working after it transitioned to OpenSSL 3.
The issue lied in the fact that cl+ssl did not fully support OpenSSL 3. LP: #1960615 fixed the initial 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.

While swapping the order of libraries to be loaded in cl+ssl would be a workaround for the issue, this seems to be a bug in pgloader and should be fixed there. There is an upstream bug for the issue at https://github.com/dimitri/pgloader/issues/1370

# 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

Changed in pgloader (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
tags: added: server-todo
tags: added: transition-openssl3-jj
Changed in pgloader (Ubuntu):
status: New → In Progress
importance: Undecided → High
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

A proposed fix consists of forcing the reload of libcrypto in the pgloader hooks. This was forwarded upstream in https://github.com/dimitri/pgloader/pull/1372

A PPA with the attached fix is available at https://launchpad.net/~athos-ribeiro/+archive/ubuntu/pgloader-jammy-reload-libcrypto/+packages

I also ran the autopkgtest suite locally. Here is the result summary:

autopkgtest [15:28:24]: @@@@@@@@@@@@@@@@@@@@ summary
ssl PASS

tags: added: patch
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the thorough investigation, Athos.

After reading the bug description, the github issue, the PR, and also taking a detour trying to figure out why sbcl doesn't build on all architectures in Ubuntu, I'm a +1 for the changes.

Uploaded:

$ dput pgloader_3.6.3-1ubuntu1_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/pgloader/pgloader_3.6.3-1ubuntu1_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/pgloader/pgloader_3.6.3-1ubuntu1.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading pgloader_3.6.3-1ubuntu1.dsc: done.
  Uploading pgloader_3.6.3-1ubuntu1.debian.tar.xz: done.
  Uploading pgloader_3.6.3-1ubuntu1_source.buildinfo: done.
  Uploading pgloader_3.6.3-1ubuntu1_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pgloader - 3.6.3-1ubuntu1

---------------
pgloader (3.6.3-1ubuntu1) jammy; urgency=medium

  * d/p/force-libcrypto-reload.patch: force reloading cl+ssl::libcrypto.
    (LP: #1968594)

 -- Athos Ribeiro <email address hidden> Tue, 12 Apr 2022 14:44:38 -0300

Changed in pgloader (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.