Skip to content
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

'io_uring_enable_rings' not exposed #773

Closed
jmccl opened this issue Jan 13, 2023 · 3 comments
Closed

'io_uring_enable_rings' not exposed #773

jmccl opened this issue Jan 13, 2023 · 3 comments

Comments

@jmccl
Copy link

jmccl commented Jan 13, 2023

As 'io_uring_enable_rings' is not in 'liburing.map' it is not marked as an external symbol in 'liburing.so'. This results in package managers (arch and debian at least) build systems stripping the symbol from the shared object when striping symbols. The upshot is that the function can be referenced by user code at compile time as it's in the header, but linking to the shared object fails due to an undefined reference to the function.

https://github.com/axboe/liburing/blob/master/src/liburing.map

(liburing.map is a 'version-script' parameter to the linker when linking liburing.so.)

Is this a bug, or is the intent to not publicly expose this function?

(The initial issue is here, fwiw: facebook/proxygen#434)

@axboe
Copy link
Owner

axboe commented Jan 13, 2023

That's just an oversight... Want to send in a patch?

@jmccl
Copy link
Author

jmccl commented Jan 13, 2023

Sure, but before I do, here's a list of symbols that are in a non-stripped library that are also not external.

$ nm pkg/liburing/usr/lib/liburing.so | grep " t "
0000000000002720 t deregister_tm_clones
0000000000002790 t __do_global_dtors_aux
0000000000003980 t _fini
00000000000027e0 t frame_dummy
0000000000002000 t _init
0000000000003680 t io_uring_enable_rings
0000000000002c70 t __io_uring_flush_sq
00000000000027f0 t _io_uring_get_cqe
0000000000003650 t io_uring_register_restrictions
0000000000002a40 t __io_uring_submit
0000000000002d50 t __io_uring_submit_timeout
0000000000002750 t register_tm_clones

Should any of those also be in the patch?

@ammarfaizi2
Copy link
Contributor

  • io_uring_enable_rings should be exported.

  • __io_uring_flush_sq is marked as static since commit 7fc973f
    ("queue: Mark __io_uring_flush_sq() as static"). This function was
    never exported despite it was not marked as static in <= 2.3. This
    function should NOT be exported.

  • _io_uring_get_cqe is a static function.

  • io_uring_register_restrictions should be exported.

  • __io_uring_submit is a static function.

  • __io_uring_submit_timeout is a static function.

Static functions should NOT be exported.

DylanZA pushed a commit to DylanZA/folly that referenced this issue Jan 13, 2023
Summary:
io_uring_enable_rings was missing from liburing upstream (see axboe/liburing#773) which is breaking the open source build. See facebook#1908

Instead just implement it locally, as it's trivial

Differential Revision: D42497664

fbshipit-source-id: a04af7edf5cce2c98dc4d83ea329f6b34f63bef0
@axboe axboe closed this as completed in 19424b0 Jan 14, 2023
facebook-github-bot pushed a commit to facebook/folly that referenced this issue Jan 16, 2023
Summary:
Pull Request resolved: #1915

io_uring_enable_rings was missing from liburing upstream (see axboe/liburing#773) which is breaking the open source build. See #1908

Instead just implement it locally, as it's trivial

Reviewed By: dmm-fb

Differential Revision: D42497664

fbshipit-source-id: 7241785a36046e867f907bfe74623aaeb38c4b70
facebook-github-bot pushed a commit to facebook/hhvm that referenced this issue Jan 16, 2023
Summary:
X-link: facebook/folly#1915

io_uring_enable_rings was missing from liburing upstream (see axboe/liburing#773) which is breaking the open source build. See facebook/folly#1908

Instead just implement it locally, as it's trivial

Reviewed By: dmm-fb

Differential Revision: D42497664

fbshipit-source-id: 7241785a36046e867f907bfe74623aaeb38c4b70
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

No branches or pull requests

3 participants