Skip to content

[Python] Logging memory pool crashes if set as the default memory pool #38328

@jorisvandenbossche

Description

@jorisvandenbossche

This crashes:

In [1]: pa.set_memory_pool(pa.logging_memory_pool(pa.default_memory_pool()))

In [2]: pa.array([1, 2, 3])
Segmentation fault (core dumped)

while passing it as an argument to the function allocating the data works fine:

In [1]: pa.array([1, 2, 3], memory_pool=pa.logging_memory_pool(pa.default_memory_pool()))
Allocate: size = 256, alignment = 64
Allocate: size = 64, alignment = 64
Reallocate: old_size = 256, new_size = 64, alignment = 64
Free: size = 64, alignment = 64
Out[1]: 
<pyarrow.lib.Int64Array object at 0x7f365b0568c0>
[
  1,
  2,
  3
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions