[Bug 1821677] Re: dl_open segment fault in ubuntu18.10 glibc2.28
Andrew Snyder
1821677 at bugs.launchpad.net
Fri Nov 13 16:39:11 UTC 2020
I am experiencing this same issue on LIBC 2.27-3ubuntu1.3 and it
appears to be the same dll. I did not see it with GLIBC 2.27-3ubuntu1.2
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.3) 2.27
Thread 1 "node" received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x7fffff730010) at malloc.c:3113
3113 malloc.c: No such file or directory.
#0 __GI___libc_free (mem=0x7fffff730010) at malloc.c:3113
#1 0x00007fffff40608f in open_verify (name=name at entry=0x7ffffffea460 "libsvml.so", fbp=fbp at entry=0x7ffffffea6b0, loader=loader at entry=0x271f570, whatcode=whatcode at entry=4, mode=mode at entry=-2147483648, found_other_class=found_other_class at entry=0x7ffffffea69f, free_name=false, fd=20) at dl-load.c:1971
#2 0x00007fffff4063d8 in open_path (name=name at entry=0x7ffff713af72 "libsvml.so", namelen=namelen at entry=11, mode=mode at entry=-2147483648, sps=0x271f918, realname=0x7ffffffea6a0, fbp=0x7ffffffea6b0, loader=0x271f570, whatcode=4, found_other_class=0x7ffffffea69f) at dl-load.c:2052
#3 0x00007fffff4093bd in _dl_map_object (loader=0x271f570, name=0x7ffff713af72 "libsvml.so", type=2, trace_mode=0, mode=<optimized out>, nsid=<optimized out>) at dl-load.c:2301
#4 0x00007fffff40e4e2 in openaux (a=a at entry=0x7ffffffeb270) at dl-deps.c:63
#5 0x00007ffffe1d71ef in __GI__dl_catch_exception (exception=0x7ffffffeb250, operate=0x7fffff40e4b0 <openaux>, args=0x7ffffffeb270) at dl-error-skeleton.c:196
#6 0x00007fffff40e85b in _dl_map_object_deps (map=map at entry=0x2723d60, preloads=preloads at entry=0x0, npreloads=npreloads at entry=0, trace_mode=trace_mode at entry=0, open_mode=open_mode at entry=-2147483648) at dl-deps.c:249
#7 0x00007fffff415109 in dl_open_worker (a=a at entry=0x7ffffffeb4c0) at dl-open.c:278
#8 0x00007ffffe1d71ef in __GI__dl_catch_exception (exception=0x7ffffffeb4a0, operate=0x7fffff414f80 <dl_open_worker>, args=0x7ffffffeb4c0) at dl-error-skeleton.c:196
#9 0x00007fffff41498a in _dl_open (file=0x27163f8 "core.node", mode=-2147483647, caller_dlopen=0x8fc024 <node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)+324>, nsid=<optimized out>, argc=2, argv=<optimized out>, env=0x7ffffffedc90) at dl-open.c:605
#10 0x00007fffff1f0f96 in dlopen_doit (a=a at entry=0x7ffffffeb6f0) at dlopen.c:66
#11 0x00007ffffe1d71ef in __GI__dl_catch_exception (exception=exception at entry=0x7ffffffeb690, operate=0x7fffff1f0f40 <dlopen_doit>, args=0x7ffffffeb6f0) at dl-error-skeleton.c:196
#12 0x00007ffffe1d727f in __GI__dl_catch_error (objname=0x27179a0, errstring=0x27179a8, mallocedp=0x2717998, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:215
#13 0x00007fffff1f1745 in _dlerror_run (operate=operate at entry=0x7fffff1f0f40 <dlopen_doit>, args=args at entry=0x7ffffffeb6f0) at dlerror.c:162
#14 0x00007fffff1f1051 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1821677
Title:
dl_open segment fault in ubuntu18.10 glibc2.28
Status in glibc package in Ubuntu:
Fix Released
Status in glibc source package in Cosmic:
Confirmed
Status in glibc source package in Disco:
Fix Released
Bug description:
With following testcase:
~/work/glibc$ cat foo.c
#include <dlfcn.h>
#include <stdio.h>
int main(int argc, char **argv) {
if (argc < 1) return 1;
printf("Trying to open %s\n", argv[1]);
void *liball = dlopen(argv[1], RTLD_NOW);
if(liball == NULL) {
printf("\nERROR: %s", dlerror());
return -1;
}
if(dlclose(liball)==0) {printf("\n all ok\n");}
return 0;
}
compile with
~/work/glibc$ gcc -O0 -g foo.c -ldl
then get segment fault:
~/work/glibc$ ./a.out intel64_lin/libsvml.so
Trying to open intel64_lin/libsvml.so
Segmentation fault (core dumped)
coredump as:
(gdb) bt
#0 __GI___libc_free (mem=0x7ffff7d49010) at malloc.c:3085
#1 0x00007ffff7fdb6b6 in open_verify (
name=0x555555559670 "/home/lilicui/intel64_lin/libsvml.so",
fbp=fbp at entry=0x7fffffffd530, loader=<optimized out>,
mode=mode at entry=-1879048190,
found_other_class=found_other_class at entry=0x7fffffffd51f, free_name=true,
whatcode=0, fd=3) at dl-load.c:1977
#2 0x00007ffff7fdc926 in _dl_map_object (loader=loader at entry=0x7ffff7ffe190,
name=name at entry=0x7fffffffe1b7 "/home/lilicui/intel64_lin/libsvml.so",
type=type at entry=2, trace_mode=trace_mode at entry=0,
mode=mode at entry=-1879048190, nsid=<optimized out>) at dl-load.c:2401
#3 0x00007ffff7fe79c4 in dl_open_worker (a=a at entry=0x7fffffffdaa0)
at dl-open.c:228
#4 0x00007ffff7f1b48f in __GI__dl_catch_exception (exception=<optimized out>,
operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:196
#5 0x00007ffff7fe72c6 in _dl_open (
file=0x7fffffffe1b7 "/home/lilicui/intel64_lin/libsvml.so",
mode=-2147483646, caller_dlopen=0x5555555551cb <main+86>,
nsid=<optimized out>, argc=2, argv=0x7fffffffde08, env=0x7fffffffde20)
at dl-open.c:599
#6 0x00007ffff7faa256 in dlopen_doit (a=a at entry=0x7fffffffdcc0) at dlopen.c:66
#7 0x00007ffff7f1b48f in __GI__dl_catch_exception (
exception=exception at entry=0x7fffffffdc60, operate=<optimized out>,
--Type <RET> for more, q to quit, c to continue without paging--
args=<optimized out>) at dl-error-skeleton.c:196
#8 0x00007ffff7f1b51f in __GI__dl_catch_error (
objname=0x7ffff7fae0f0 <last_result+16>,
errstring=0x7ffff7fae0f8 <last_result+24>,
mallocedp=0x7ffff7fae0e8 <last_result+8>, operate=<optimized out>,
args=<optimized out>) at dl-error-skeleton.c:215
#9 0x00007ffff7faaa25 in _dlerror_run (
operate=operate at entry=0x7ffff7faa200 <dlopen_doit>,
args=args at entry=0x7fffffffdcc0) at dlerror.c:163
#10 0x00007ffff7faa2e6 in __dlopen (file=<optimized out>, mode=<optimized out>)
at dlopen.c:87
#11 0x00005555555551cb in main (argc=2, argv=0x7fffffffde08) at foo.c:7
intel64_lin/libsvml.so is icc19.0(aleady released) runtime library, refer to attachment.
Ubuntu version:
~/work/glibc$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
Glibc version:
~/work/glibc$ ldd --version
ldd (Ubuntu GLIBC 2.28-0ubuntu1) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
It works fine with Glibc_2.28 upstream, and Glibc_2.28 on Fedora 29,
but failed with Glibc 2.28 in Ubuntu 18.10
I found ubuntu18.10 was backporting its own patches, would that affect
such testcase?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1821677/+subscriptions
More information about the foundations-bugs
mailing list