pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16274: Repeated Libraries in Mac
9+ messages / 5 participants
[nested] [flat]

* BUG #16274: Repeated Libraries in Mac
@ 2020-02-24 12:12 PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 9+ messages in thread

From: PG Bug reporting form @ 2020-02-24 12:12 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: krishnanunnir97@gmail.com

The following bug has been logged on the website:

Bug reference:      16274
Logged by:          Krishnanunni R
Email address:      krishnanunnir97@gmail.com
PostgreSQL version: 11.7
Operating system:   Mac Os Catalina Version 10.15.1
Description:        

On running the md5 command in the pgsql/lib/ folder using the following
command,
ind . -name "*.dylib" -exec md5 {} \; | sort -g -k 4
I am getting this as the output
MD5 (./libcrypto.1.1.dylib) = ebb2ebe266a6453b0cbd8b44a7fb64c5
MD5 (./libcrypto.dylib) = f2a42014ed6737d117c4732afffa783c
MD5 (./libecpg.6.11.dylib) = eda61536e715b3d1465f1a607def4004
MD5 (./libecpg.6.dylib) = eda61536e715b3d1465f1a607def4004
MD5 (./libecpg.dylib) = eda61536e715b3d1465f1a607def4004
MD5 (./libecpg_compat.3.11.dylib) = ece0b4117325a390d878dcc0d5733c51
MD5 (./libecpg_compat.3.dylib) = ece0b4117325a390d878dcc0d5733c51
MD5 (./libecpg_compat.dylib) = ece0b4117325a390d878dcc0d5733c51
MD5 (./libicuuc.57.1.dylib) = f2e3828d3c08e93ce45879d9025c90e6
MD5 (./libicuuc.57.dylib) = f2e3828d3c08e93ce45879d9025c90e6
MD5 (./libicuuc.dylib) = f2e3828d3c08e93ce45879d9025c90e6
MD5 (./libssl.1.1.dylib) = fdd4db7edc5df82640b795c0d18d9864
MD5 (./libuuid.1.1.dylib) = dd0416e32867556706f4156aa08490f8
MD5 (./libz.1.2.11.dylib) = ecde7cc9a6e9adcad042543c8de9e038
MD5 (./libz.1.dylib) = ecde7cc9a6e9adcad042543c8de9e038
MD5 (./libz.dylib) = ecde7cc9a6e9adcad042543c8de9e038
MD5 (./libssl.dylib) = 0c6f51a2ae9a8c75399a08de81b443db
MD5 (./libxslt.1.dylib) = 4a3c602e73ba982d19bde59913c749f4
MD5 (./libxslt.dylib) = 4a3c602e73ba982d19bde59913c749f4
MD5 (./libpq.5.11.dylib) = 9ae8352f4ee08ce42e08f34da45deb86
MD5 (./libpq.5.dylib) = 9ae8352f4ee08ce42e08f34da45deb86
MD5 (./libpq.dylib) = 9ae8352f4ee08ce42e08f34da45deb86
MD5 (./libicudata.57.1.dylib) = 34cfb3a54ceec04fb389069cfb78759d
MD5 (./libicudata.57.dylib) = 34cfb3a54ceec04fb389069cfb78759d
MD5 (./libicudata.dylib) = 34cfb3a54ceec04fb389069cfb78759d
MD5 (./libxml2.2.dylib) = 61b821c42a100d767e266dc18fbc5b45
MD5 (./libxml2.dylib) = 61b821c42a100d767e266dc18fbc5b45
MD5 (./libpgtypes.3.11.dylib) = 9848d4eec1c817440770ed6483fd126d
MD5 (./libpgtypes.3.dylib) = 9848d4eec1c817440770ed6483fd126d
MD5 (./libpgtypes.dylib) = 9848d4eec1c817440770ed6483fd126d
MD5 (./libicui18n.57.1.dylib) = 52398354f9930749d988a1253e61c1b1
MD5 (./libicui18n.57.dylib) = 52398354f9930749d988a1253e61c1b1
MD5 (./libicui18n.dylib) = 52398354f9930749d988a1253e61c1b1
MD5 (./libintl.9.dylib) = 5e57dc47461999ff90f404d0255e45c4
MD5 (./libintl.dylib) = 5e57dc47461999ff90f404d0255e45c4
MD5 (./libedit.0.dylib) = 83e829550c591270e97e469255bc4add
MD5 (./libedit.dylib) = 83e829550c591270e97e469255bc4add
The md5 value for many of the library files are identical. Does it imply all
these files are identical?
If so shouldn't it be removed?



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
@ 2020-02-24 14:35 ` Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:13   ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 2 replies; 9+ messages in thread

From: Daniel Gustafsson @ 2020-02-24 14:35 UTC (permalink / raw)
  To: krishnanunnir97@gmail.com; pgsql-bugs@lists.postgresql.org

> On 24 Feb 2020, at 13:12, PG Bug reporting form <noreply@postgresql.org> wrote:

> On running the md5 command in the pgsql/lib/ folder using the following
> command,
> ind . -name "*.dylib" -exec md5 {} \; | sort -g -k 4
> I am getting this as the output
> MD5 (./libcrypto.1.1.dylib) = ebb2ebe266a6453b0cbd8b44a7fb64c5
> MD5 (./libcrypto.dylib) = f2a42014ed6737d117c4732afffa783c
> MD5 (./libecpg.6.11.dylib) = eda61536e715b3d1465f1a607def4004
> MD5 (./libecpg.6.dylib) = eda61536e715b3d1465f1a607def4004
> MD5 (./libecpg.dylib) = eda61536e715b3d1465f1a607def4004

If you inspect the directory I think you will find that these are links to a
single file.  Use "find -type f" instead to deduplicate your file check.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
@ 2020-02-24 15:04   ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:28     ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  1 sibling, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-02-24 15:04 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: krishnanunnir97@gmail.com; pgsql-bugs@lists.postgresql.org

Daniel Gustafsson <daniel@yesql.se> writes:
>> On 24 Feb 2020, at 13:12, PG Bug reporting form <noreply@postgresql.org> wrote:
>> On running the md5 command in the pgsql/lib/ folder using the following
>> command,
>> ind . -name "*.dylib" -exec md5 {} \; | sort -g -k 4
>> I am getting this as the output
>> MD5 (./libcrypto.1.1.dylib) = ebb2ebe266a6453b0cbd8b44a7fb64c5
>> MD5 (./libcrypto.dylib) = f2a42014ed6737d117c4732afffa783c
>> MD5 (./libecpg.6.11.dylib) = eda61536e715b3d1465f1a607def4004
>> MD5 (./libecpg.6.dylib) = eda61536e715b3d1465f1a607def4004
>> MD5 (./libecpg.dylib) = eda61536e715b3d1465f1a607def4004

> If you inspect the directory I think you will find that these are links to a
> single file.  Use "find -type f" instead to deduplicate your file check.

Indeed.  The more interesting question is why libcrypto.1.1.dylib and
libcrypto.dylib appear *not* to be duplicates.  The latter should be
a symlink to the former, but seemingly it is not.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-25 09:28     ` Daniel Gustafsson <daniel@yesql.se>
  2020-02-26 08:16       ` Re: BUG #16274: Repeated Libraries in Mac Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Daniel Gustafsson @ 2020-02-25 09:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: krishnanunnir97@gmail.com; pgsql-bugs@lists.postgresql.org

> On 24 Feb 2020, at 16:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Daniel Gustafsson <daniel@yesql.se> writes:
>>> On 24 Feb 2020, at 13:12, PG Bug reporting form <noreply@postgresql.org> wrote:
>>> On running the md5 command in the pgsql/lib/ folder using the following
>>> command,
>>> ind . -name "*.dylib" -exec md5 {} \; | sort -g -k 4
>>> I am getting this as the output
>>> MD5 (./libcrypto.1.1.dylib) = ebb2ebe266a6453b0cbd8b44a7fb64c5
>>> MD5 (./libcrypto.dylib) = f2a42014ed6737d117c4732afffa783c
>>> MD5 (./libecpg.6.11.dylib) = eda61536e715b3d1465f1a607def4004
>>> MD5 (./libecpg.6.dylib) = eda61536e715b3d1465f1a607def4004
>>> MD5 (./libecpg.dylib) = eda61536e715b3d1465f1a607def4004
> 
>> If you inspect the directory I think you will find that these are links to a
>> single file.  Use "find -type f" instead to deduplicate your file check.
> 
> Indeed.  The more interesting question is why libcrypto.1.1.dylib and
> libcrypto.dylib appear *not* to be duplicates.  The latter should be
> a symlink to the former, but seemingly it is not.

As was revealed in the thread now, the files stem from an EDB installer archive
and upon inspecting the archive I can confirm both that the symlinks are indeed
files as well as the differences in the libcrypto dylibs.

libssl.dylib and libss.1.1.dylib are also different, with both linking against
libcrypto.1.1.dylib The symbol tables are equal, but a binary diff does reveal
a set of differences between the files (as the md5 had already indicated).

I wonder if this could be artifact of how the produced binaries are built
against OpenSSL?  Not sure what would cause that though, but it's worrying to
see unexplained differences in shipped crypto libs.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:28     ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
@ 2020-02-26 08:16       ` Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
  2020-02-26 09:06         ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 9+ messages in thread

From: Krishnanunni Radhakrishnan @ 2020-02-26 08:16 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: pgsql-bugs@lists.postgresql.org

Something else that came to my observation is there is no symbolic linkage
between postmaster and postgres in mac binaries for version 11.7. They do
have the same values for md5

Thanks and Regards,
Krishnanunni R

On Tue, Feb 25, 2020 at 9:28 AM Daniel Gustafsson <daniel@yesql.se> wrote:

> > On 24 Feb 2020, at 16:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > Daniel Gustafsson <daniel@yesql.se> writes:
> >>> On 24 Feb 2020, at 13:12, PG Bug reporting form <
> noreply@postgresql.org> wrote:
> >>> On running the md5 command in the pgsql/lib/ folder using the following
> >>> command,
> >>> ind . -name "*.dylib" -exec md5 {} \; | sort -g -k 4
> >>> I am getting this as the output
> >>> MD5 (./libcrypto.1.1.dylib) = ebb2ebe266a6453b0cbd8b44a7fb64c5
> >>> MD5 (./libcrypto.dylib) = f2a42014ed6737d117c4732afffa783c
> >>> MD5 (./libecpg.6.11.dylib) = eda61536e715b3d1465f1a607def4004
> >>> MD5 (./libecpg.6.dylib) = eda61536e715b3d1465f1a607def4004
> >>> MD5 (./libecpg.dylib) = eda61536e715b3d1465f1a607def4004
> >
> >> If you inspect the directory I think you will find that these are links
> to a
> >> single file.  Use "find -type f" instead to deduplicate your file check.
> >
> > Indeed.  The more interesting question is why libcrypto.1.1.dylib and
> > libcrypto.dylib appear *not* to be duplicates.  The latter should be
> > a symlink to the former, but seemingly it is not.
>
> As was revealed in the thread now, the files stem from an EDB installer
> archive
> and upon inspecting the archive I can confirm both that the symlinks are
> indeed
> files as well as the differences in the libcrypto dylibs.
>
> libssl.dylib and libss.1.1.dylib are also different, with both linking
> against
> libcrypto.1.1.dylib The symbol tables are equal, but a binary diff does
> reveal
> a set of differences between the files (as the md5 had already indicated).
>
> I wonder if this could be artifact of how the produced binaries are built
> against OpenSSL?  Not sure what would cause that though, but it's worrying
> to
> see unexplained differences in shipped crypto libs.
>
> cheers ./daniel

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:28     ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-26 08:16       ` Re: BUG #16274: Repeated Libraries in Mac Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
@ 2020-02-26 09:06         ` Daniel Gustafsson <daniel@yesql.se>
  2020-02-28 13:13           ` Re: BUG #16274: Repeated Libraries in Mac Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Daniel Gustafsson @ 2020-02-26 09:06 UTC (permalink / raw)
  To: Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

> On 26 Feb 2020, at 09:16, Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com> wrote:
> 
> Something else that came to my observation is there is no symbolic linkage between postmaster and postgres in mac binaries for version 11.7. They do have the same values for md5

If it's not a link then it's at least good that they have the same md5 hash.
That does sound like another question for the installer team at EDB.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:28     ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-26 08:16       ` Re: BUG #16274: Repeated Libraries in Mac Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
  2020-02-26 09:06         ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
@ 2020-02-28 13:13           ` Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
  2020-02-28 20:33             ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 9+ messages in thread

From: Sandeep Thakkar @ 2020-02-28 13:13 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>; pgsql-bugs@lists.postgresql.org

Hi,

I'll check why they are not symbolic links and fix the issue. The MD5
between them (libssl.dylib and libss.1.1.dylib or libcrypto.dylib and
libcrypto.1.1.dylib) must be different as we codesign each file in the app
bundle. But, anyways this won't happen if there are symbolic links. Will
check and revert.

On Wed, Feb 26, 2020 at 2:36 PM Daniel Gustafsson <daniel@yesql.se> wrote:

> > On 26 Feb 2020, at 09:16, Krishnanunni Radhakrishnan <
> krishnanunnir97@gmail.com> wrote:
> >
> > Something else that came to my observation is there is no symbolic
> linkage between postmaster and postgres in mac binaries for version 11.7.
> They do have the same values for md5
>
> If it's not a link then it's at least good that they have the same md5
> hash.
> That does sound like another question for the installer team at EDB.
>
> cheers ./daniel
>
>

-- 
Sandeep Thakkar

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-24 15:04   ` Re: BUG #16274: Repeated Libraries in Mac Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-25 09:28     ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-26 08:16       ` Re: BUG #16274: Repeated Libraries in Mac Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
  2020-02-26 09:06         ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
  2020-02-28 13:13           ` Re: BUG #16274: Repeated Libraries in Mac Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
@ 2020-02-28 20:33             ` Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 0 replies; 9+ messages in thread

From: Daniel Gustafsson @ 2020-02-28 20:33 UTC (permalink / raw)
  To: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>; +Cc: Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>; pgsql-bugs@lists.postgresql.org

> On 28 Feb 2020, at 14:13, Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> wrote:
> 
> Hi,
> 
> I'll check why they are not symbolic links and fix the issue. The MD5 between them (libssl.dylib and libss.1.1.dylib or libcrypto.dylib and libcrypto.1.1.dylib) must be different as we codesign each file in the app bundle. But, anyways this won't happen if there are symbolic links. Will check and revert.

Thanks for following-up!

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #16274: Repeated Libraries in Mac
  2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
  2020-02-24 14:35 ` Re: BUG #16274: Repeated Libraries in Mac Daniel Gustafsson <daniel@yesql.se>
@ 2020-02-25 09:13   ` Daniel Gustafsson <daniel@yesql.se>
  1 sibling, 0 replies; 9+ messages in thread

From: Daniel Gustafsson @ 2020-02-25 09:13 UTC (permalink / raw)
  To: Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>; +Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

> On 25 Feb 2020, at 07:19, Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com> wrote:

Please avoid top-posting and keep the list on CC so everyone can learn from the
discussion.

> I have checked and they are neither hardlinks nor softlinks. Using Use "find -type f" returns the same output. 
> An ls doesn't show any symbolic links, also the files have the same size. I thought it might possibly be a hardlink so I tried checking the inode value for the files, they are also different.
> I am facing this issue in binaries for  Mac -  version 11.7(http://sbp.enterprisedb.com/getfile.jsp?fileid=12377 ).

Thanks for clarifying that, it does explain why the files don't show up linked
as expected from a standard "make install", but not why the installer creates
multiple copies of the same file.  That does sound like a question for the EDB
installers team though.

cheers ./daniel




^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2020-02-28 20:33 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 12:12 BUG #16274: Repeated Libraries in Mac PG Bug reporting form <noreply@postgresql.org>
2020-02-24 14:35 ` Daniel Gustafsson <daniel@yesql.se>
2020-02-24 15:04   ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-25 09:28     ` Daniel Gustafsson <daniel@yesql.se>
2020-02-26 08:16       ` Krishnanunni Radhakrishnan <krishnanunnir97@gmail.com>
2020-02-26 09:06         ` Daniel Gustafsson <daniel@yesql.se>
2020-02-28 13:13           ` Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
2020-02-28 20:33             ` Daniel Gustafsson <daniel@yesql.se>
2020-02-25 09:13   ` Daniel Gustafsson <daniel@yesql.se>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox