apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.2k stars 3.58k forks source link

[Bug] Some netty native libraries are not relocated #19652

Open michaeljmarshall opened 1 year ago

michaeljmarshall commented 1 year ago

Search before asking

Version

All of them

Minimal reproduce step

Download a pulsar-client-all.jar, then view the META-INF/native/ directory.

What did you expect to see?

Properly relocated binaries.

What did you see instead?

META-INF/native/
META-INF/native/liborg_apache_pulsar_shade_netty_tcnative_linux_x86_64.so
META-INF/native/liborg_apache_pulsar_shade_netty_resolver_dns_native_macos_aarch_64.jnilib
META-INF/native/libnetty_tcnative_osx_aarch_64.jnilib
META-INF/native/liborg_apache_pulsar_shade_netty_transport_native_epoll_x86_64.so
META-INF/native/include/
META-INF/native/include/netty_unix_jni.h
META-INF/native/include/netty_jni_util.h
META-INF/native/include/netty_unix_limits.h
META-INF/native/include/netty_unix_util.h
META-INF/native/include/netty_unix_filedescriptor.h
META-INF/native/include/netty_unix_errors.h
META-INF/native/include/netty_unix_buffer.h
META-INF/native/include/netty_unix.h
META-INF/native/include/netty_unix_socket.h
META-INF/native/netty_tcnative_windows_x86_64.dll
META-INF/native/liborg_apache_pulsar_shade_netty_resolver_dns_native_macos_x86_64.jnilib
META-INF/native/lib/
META-INF/native/lib/libnetty-unix-common.a
META-INF/native/libnetty_transport_native_io_uring_aarch_64.so
META-INF/native/libnetty_tcnative_linux_aarch_64.so
META-INF/native/libnetty_transport_native_io_uring_x86_64.so
META-INF/native/libnetty_tcnative_osx_x86_64.jnilib

Anything else?

See https://github.com/apache/pulsar/pull/18646#pullrequestreview-1201600977 for more context.

Are you willing to submit a PR?

michaeljmarshall commented 1 year ago

@lhotari - I took a quick look at https://github.com/apache/pulsar/blob/cfe643bc9d45e74271df6f4d16d46087572e285b/src/rename-netty-native-libs.sh, which needs to be updated to fix this. Do you know if we can simply relocate the files that have netty in their name, or do we need to enumerate each file? Thanks!

github-actions[bot] commented 1 year ago

The issue had no activity for 30 days, mark with Stale label.

tisonkun commented 1 year ago

What do you mean by "relocated" here? IIRC Netty searches under /native folder and this logic has nothing to do with relocated.

Does this layout cause any real-world issue?

github-actions[bot] commented 1 year ago

The issue had no activity for 30 days, mark with Stale label.

michaeljmarshall commented 1 year ago

Does this layout cause any real-world issue?

I haven't confirmed, but I assume it just leads to slower execution.

github-actions[bot] commented 1 year ago

The issue had no activity for 30 days, mark with Stale label.