Skip to content

Conversation

@psychedelicious
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Description

fix(backend): handle systems with glibc < 2.33

mallinfo2 is not available on glibc < 2.33.

On these systems, we successfully load the library but get an AttributeError on attempting to access mallinfo2.

I'm not sure if the old mallinfo will work, and not sure how to install it safely to test, so for now we just handle the AttributeError.

This means the enhanced memory snapshot logic will be skipped for these systems, which isn't a big deal.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

@RyanJDick Requesting your review for this.

@RaphaelDreams , ideally you could test this PR on your affected system to confirm it resolves the issue. From my read of the code, it will, but I'm not sure how to test the fix on my system.

Added/updated tests?

  • Yes
  • No : please replace this line with details on why tests
    have not been included

Copy link
Contributor

@RyanJDick RyanJDick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for jumping on this. Looks good to me!

`mallinfo2` is not available on `glibc` < 2.33.

On these systems, we successfully load the library but get an `AttributeError` on attempting to access `mallinfo2`.

I'm not sure if the old `mallinfo` will work, and not sure how to install it safely to test, so for now we just handle the `AttributeError`.

This means the enhanced memory snapshot logic will be skipped for these systems, which isn't a big deal.
@hipsterusername hipsterusername force-pushed the fix/backend/mallinfo-old-glibc branch from 6d28a89 to f19c606 Compare October 14, 2023 13:00
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

lstein pushed a commit that referenced this pull request Oct 14, 2023
@psychedelicious psychedelicious enabled auto-merge (rebase) October 14, 2023 20:50
@psychedelicious psychedelicious merged commit 48626c4 into main Oct 14, 2023
@psychedelicious psychedelicious deleted the fix/backend/mallinfo-old-glibc branch October 14, 2023 20:56
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 this pull request may close these issues.

[bug]: AttributeError: /lib/x86_64-linux-gnu/libc.so.6: undefined symbol: mallinfo2

5 participants