Skip to content

json.set causes to unable to allocate aligned OS memory directly & dragonfly hangs #5038

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

Closed
vyavdoshenko opened this issue Apr 30, 2025 · 1 comment · Fixed by #5040
Closed
Assignees
Labels
bug Something isn't working

Comments

@vyavdoshenko
Copy link
Contributor

The scenario:

redis-cli JSON.SET k $ '[{"a":1}]'
redis-cli JSON.SET k '$..*' '[{"a":1}]'

The dragonfly log:

I20250430 19:26:52.805543  5924 dfly_main.cc:752] Starting dragonfly df-dev-0000000
W20250430 19:26:52.805774  5924 dfly_main.cc:791] SWAP is enabled. Consider disabling it when running Dragonfly.
I20250430 19:26:52.805790  5924 dfly_main.cc:796] maxmemory has not been specified. Deciding myself....
I20250430 19:26:52.805795  5924 dfly_main.cc:805] Found 30.24GiB available memory. Setting maxmemory to 24.19GiB
I20250430 19:26:52.806740  5925 uring_proactor.cc:286] IORing with 1024 entries, allocated 98368 bytes, cq_entries is 2048
I20250430 19:26:52.807914  5924 proactor_pool.cc:149] Running 12 io threads
I20250430 19:26:52.818300  5924 server_family.cc:832] Host OS: Linux 6.8.0-57-generic x86_64 with 12 threads
I20250430 19:26:52.818665  5926 listener_interface.cc:101] sock[27] AcceptServer - listening on port 6379
mimalloc: warning: thread 0x770C1F48C640: unable to allocate aligned OS memory directly, fall back to over-allocation (size: 0x60400000 bytes, address: 0x770B8BC00000, alignment: 0x2000000, commit: 1)
mimalloc: warning: thread 0x770C1F48C640: unable to allocate aligned OS memory directly, fall back to over-allocation (size: 0xC0400000 bytes, address: 0x770AC9C00000, alignment: 0x2000000, commit: 1)
mimalloc: warning: thread 0x770C1F48C640: unable to allocate aligned OS memory directly, fall back to over-allocation (size: 0x180400000 bytes, address: 0x770947C00000, alignment: 0x2000000, commit: 1)

The result:
The dragonfly process freezes. It's impossible to execute another command. The process consumes more than 100% of the processor time.

@vyavdoshenko vyavdoshenko added the bug Something isn't working label Apr 30, 2025
@vyavdoshenko vyavdoshenko self-assigned this Apr 30, 2025
@vyavdoshenko
Copy link
Contributor Author

Additional case found:

JSON.SET k $ '{"data":{"value":10,"subdata":{"value":20}}}'
JSON.SET k '$..value' '{"value":30}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant