Skip to content

mimalloc: warning: unable to directly request hinted aligned OS memory #112027

Description

@furkanonder

Bug report

Bug description:

Configuration:

./configure --disable-gil --with-pydebug

Test Output:

dietpi@DietPi:~/cpython$ ./python -m test test_cmd_line -v
======================================================================
FAIL: test_pythonmalloc (test.test_cmd_line.CmdLineTest.test_pythonmalloc) (env_var='mimalloc', name='mimalloc')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dietpi/cpython/Lib/test/test_cmd_line.py", line 845, in test_pythonmalloc
    self.check_pythonmalloc(env_var, name)
  File "/home/dietpi/cpython/Lib/test/test_cmd_line.py", line 811, in check_pythonmalloc
    self.assertEqual(proc.stdout.rstrip(), name)
AssertionError: 'mimalloc: warning: unable to directly request hin[119 chars]lloc' != 'mimalloc'
- mimalloc: warning: unable to directly request hinted aligned OS memory (error: 2 (0x2), size: 0x40000000 bytes, alignment: 0x2000000, hint address: 0x20000000000)
  mimalloc


======================================================================
FAIL: test_pythonmalloc (test.test_cmd_line.CmdLineTest.test_pythonmalloc) (env_var='mimalloc_debug', name='mimalloc_debug')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dietpi/cpython/Lib/test/test_cmd_line.py", line 845, in test_pythonmalloc
    self.check_pythonmalloc(env_var, name)
  File "/home/dietpi/cpython/Lib/test/test_cmd_line.py", line 811, in check_pythonmalloc
    self.assertEqual(proc.stdout.rstrip(), name)
AssertionError: 'mimalloc: warning: unable to directly request hin[125 chars]ebug' != 'mimalloc_debug'
- mimalloc: warning: unable to directly request hinted aligned OS memory (error: 2 (0x2), size: 0x40000000 bytes, alignment: 0x2000000, hint address: 0x20000000000)
  mimalloc_debug


----------------------------------------------------------------------
Ran 56 tests in 41.751s

FAILED (failures=2, skipped=2)
test test_cmd_line failed
test_cmd_line failed (2 failures) in 43.1 sec

== Tests result: FAILURE ==

1 test failed:
    test_cmd_line

Environment:

dietpi@DietPi:~/cpython$ uname -a
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Nov 13, 2023
  2. vstinner commented on Nov 13, 2023

    @vstinner
    Member
  3. corona10 commented on Nov 22, 2023

    @corona10
    Member

    Can not reproduce the issue on macOS.

  4. changed the title [-]AssertionError: 'mimalloc: warning: unable to directly request hin[119 chars]lloc' != 'mimalloc'[/-] [+]mimalloc: warning: unable to directly request hinted aligned OS memory[/+] on Dec 11, 2023
  5. furkanonder commented on Dec 11, 2023

    @furkanonder
    ContributorAuthor

    The same issue occurs with the RISC-V architecture.

  6. vstinner commented on Dec 11, 2023

    @vstinner
    Member

    Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

    Is that Raspberry Pi hardware with 64-bit ARM CPU?

  7. furkanonder commented on Dec 12, 2023

    @furkanonder
    ContributorAuthor

    Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

    Is that Raspberry Pi hardware with 64-bit ARM CPU?

    Yes, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz
    Board: Raspberry Pi 3 Model B Plus Rev 1.3

  8. colesbury commented on Dec 12, 2023

    @colesbury
    Contributor

    We should disable this warning. There's a few warnings from mimalloc that are emitted in debug mode that happen during normal operation and don't signify anything wrong. This is one of them.

  9. added a commit that references this issue on Dec 21, 2023
  10. colesbury commented on Dec 21, 2023

    @colesbury
    Contributor

    I ran into this on Linux x86-64 today as well. It's not limited Raspberry Pi (arm64) or RSIC-V.

    Most of the time mmap() will place the mapping at the suggested address, but not always. That's fine -- it doesn't lead to the allocation failing, mimalloc just falls back to a slightly slower path.

  11. added a commit that references this issue on Dec 22, 2023
  12. corona10 commented on Dec 22, 2023

    @corona10
    Member

    @furkanonder Please check that the issue is solved :)

  13. furkanonder commented on Dec 22, 2023

    @furkanonder
    ContributorAuthor

    @corona10 I checked, the problem seems to be solved. So I am closing the issue. Thanks @corona10 @colesbury

  14. added a commit that references this issue on Dec 26, 2023
  15. added a commit that references this issue on Jan 22, 2024
  16. added a commit that references this issue on Feb 11, 2024
  17. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions