Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Apr 23, 2019

No description provided.

@pitrou
Copy link
Member Author

pitrou commented Apr 23, 2019

@xhochy

@pitrou pitrou force-pushed the ARROW-4702-update-deps branch from 40310b5 to f13660f Compare April 23, 2019 11:40
Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

+1 from me. Were the issues you were seeing with jemalloc related to your build or something else? Would like for @xhochy to sign off on these changes since he's the most experienced with the jemalloc related stuff

@pitrou
Copy link
Member Author

pitrou commented Apr 23, 2019

The issues were because jemalloc now automatically overrides operator new, which we have to disable with --disable-cxx.

"--with-jemalloc-prefix=je_arrow_"
"--with-private-namespace=je_arrow_private_"
"--without-export"
# Don't override operator new()
Copy link
Member

Choose a reason for hiding this comment

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

Do we have an explanation why this is problematic or even an upstream issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

My guess is that, when libarrow.so is used from external code, the external code will not get the operator new override. So if e.g. a Status is allocated inside libarrow.so and deleted by that external code, or vice-versa, you get one allocator trying to deallocate memory allocated by another allocator.

More generally, since Arrow is a library, it shouldn't muck with the default C and C++ allocators.

@wesm
Copy link
Member

wesm commented Apr 24, 2019

Facebook IIUC is a heavy user of operator new in their data structures (you can find it throughout https://github.com/facebook/folly) so it's not surprising that they would want to optimize it

@wesm
Copy link
Member

wesm commented Apr 24, 2019

OK to merge this?

@wesm
Copy link
Member

wesm commented Apr 25, 2019

Merging. If we run into some problems between now and the 0.14 release we will have time to resolve them. Thanks @pitrou and @xhochy!

@wesm wesm closed this in f913d8f Apr 25, 2019
@pitrou pitrou deleted the ARROW-4702-update-deps branch April 25, 2019 13:31
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.

3 participants