Activity log for bug #1731325

Date Who What changed Old value New value Message
2017-11-09 19:43:23 Sankar Tanguturi bug added bug
2017-11-09 19:43:23 Sankar Tanguturi attachment added output of valgrind https://bugs.launchpad.net/bugs/1731325/+attachment/5006643/+files/valgrind.output
2017-11-09 19:46:18 Sankar Tanguturi attachment added Output with LD_DEBUG option set to all https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1731325/+attachment/5006644/+files/LD_DEBUG.output
2017-11-09 19:46:58 Sankar Tanguturi description In one of our applications, we use dlopen to open a bunch of DLL files in the following order: 1. zlib 1.2.8 version (not the one bundled in Ubuntu 17.10) 2. gtk-x11-2.0.so.0 bundled in the system 3. libSM.so.6 bundled in the system The dlopen api crashes with 'Segmentation fault' when opening libSM.so.6. You can reproduce the issue using the following simple program. Sample C program: ================= #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> int main(int argc, char **argv) { int i; for (i = 1; i < argc; i++) { void *handle; printf("Opening %s\n", argv[i]); handle = dlopen(argv[i], RTLD_LAZY | RTLD_LOCAL); if (!handle) { printf("Error: %s\n", dlerror()); } } exit(EXIT_SUCCESS); } Compile and run as follows: $ ./a.out /path/to/libz/versio/1.2.8 /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 libSM.so.6 Note: - We encountered this issue only in Ubuntu 17.10. In ubuntu 17.04, we didn't have any issue. May be this is an issue with the latest glibc. Not sure. Investigation done: - dlopen initially passes while opening zlib version. - dlopen fails to open libgtk-x11-2.0.so.0 with the following error: Error: /usr/lib/vmware-tools/lib/libz.so.1/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) And then dlopen for libSM.so.6 core dumps. I understand that the zlib 1.2.8 doesn't provide the necessary required version and hence dlopen for gtk failed. But why does dlopen crash for libSM.so.6? - I executed valgrind command and attaching the output. Please let me know if any other information is required. Thanks Sankar. In one of our applications, we use dlopen to open a bunch of library (.so) files in the following order: 1. zlib 1.2.8 version (not the one bundled in Ubuntu 17.10) 2. gtk-x11-2.0.so.0 bundled in the system 3. libSM.so.6 bundled in the system The dlopen api crashes with 'Segmentation fault' when opening libSM.so.6. You can reproduce the issue using the following simple program. Sample C program: ================= #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> int main(int argc, char **argv) {   int i;   for (i = 1; i < argc; i++) {    void *handle;    printf("Opening %s\n", argv[i]);    handle = dlopen(argv[i], RTLD_LAZY | RTLD_LOCAL);     if (!handle) {         printf("Error: %s\n", dlerror());     }   }   exit(EXIT_SUCCESS); } Compile and run as follows: $ ./a.out /path/to/libz/versio/1.2.8 /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 libSM.so.6 Note: - We encountered this issue only in Ubuntu 17.10. In ubuntu 17.04, we didn't have any issue. May be this is an issue with the latest glibc. Not sure. Investigation done: - dlopen initially passes while opening zlib version. - dlopen fails to open libgtk-x11-2.0.so.0 with the following error: Error: /usr/lib/vmware-tools/lib/libz.so.1/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) And then dlopen for libSM.so.6 core dumps. I understand that the zlib 1.2.8 doesn't provide the necessary required version and hence dlopen for gtk failed. But why does dlopen crash for libSM.so.6? - I executed valgrind command and attaching the output. Please let me know if any other information is required. Thanks Sankar.
2017-11-09 21:23:09 Sankar Tanguturi description In one of our applications, we use dlopen to open a bunch of library (.so) files in the following order: 1. zlib 1.2.8 version (not the one bundled in Ubuntu 17.10) 2. gtk-x11-2.0.so.0 bundled in the system 3. libSM.so.6 bundled in the system The dlopen api crashes with 'Segmentation fault' when opening libSM.so.6. You can reproduce the issue using the following simple program. Sample C program: ================= #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> int main(int argc, char **argv) {   int i;   for (i = 1; i < argc; i++) {    void *handle;    printf("Opening %s\n", argv[i]);    handle = dlopen(argv[i], RTLD_LAZY | RTLD_LOCAL);     if (!handle) {         printf("Error: %s\n", dlerror());     }   }   exit(EXIT_SUCCESS); } Compile and run as follows: $ ./a.out /path/to/libz/versio/1.2.8 /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 libSM.so.6 Note: - We encountered this issue only in Ubuntu 17.10. In ubuntu 17.04, we didn't have any issue. May be this is an issue with the latest glibc. Not sure. Investigation done: - dlopen initially passes while opening zlib version. - dlopen fails to open libgtk-x11-2.0.so.0 with the following error: Error: /usr/lib/vmware-tools/lib/libz.so.1/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) And then dlopen for libSM.so.6 core dumps. I understand that the zlib 1.2.8 doesn't provide the necessary required version and hence dlopen for gtk failed. But why does dlopen crash for libSM.so.6? - I executed valgrind command and attaching the output. Please let me know if any other information is required. Thanks Sankar. In one of our applications, we use dlopen to open a bunch of library (.so) files in the following order: 1. zlib 1.2.8 version (not the one bundled in Ubuntu 17.10) 2. gtk-x11-2.0.so.0 bundled in the system 3. libSM.so.6 bundled in the system The dlopen api crashes with 'Segmentation fault' when opening libSM.so.6. You can reproduce the issue using the following simple program. Sample C program: ================= #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> int main(int argc, char **argv) {   int i;   for (i = 1; i < argc; i++) {    void *handle;    printf("Opening %s\n", argv[i]);    handle = dlopen(argv[i], RTLD_LAZY | RTLD_LOCAL);     if (!handle) {         printf("Error: %s\n", dlerror());     }   }   exit(EXIT_SUCCESS); } Compile and run as follows: $ ./a.out /path/to/libz/versio/1.2.8 /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 libSM.so.6 Note: - We encountered this issue only in Ubuntu 17.10. In ubuntu 17.04, we didn't have any issue. May be this is an issue with the latest glibc. Not sure. Investigation done: - dlopen initially passes while opening zlib version. - dlopen fails to open libgtk-x11-2.0.so.0 with the following error: Error: /path/to/zlib/1.2.8/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) And then dlopen for libSM.so.6 core dumps. I understand that the zlib 1.2.8 doesn't provide the necessary required version and hence dlopen for gtk failed. But why does dlopen crash for libSM.so.6? - I executed valgrind command and attaching the output. Please let me know if any other information is required. Thanks Sankar.