Closed Bug 770819 Opened 12 years ago Closed 12 years ago

shlibsign crashes when used on a glibc 2.16 based GNU/Linux distribution.

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 771569

People

(Reporter: fredbezies, Unassigned)

Details

Attachments

(1 file)

Hello.

This morning my archlinux distribution (using testing repository) was upgraded, and glibc2.16 was installed.

A few hours ago, I made a clobber build where all goes well. When I entered make package in objdir folder, it crashes near the end of packaging process : 

/bin/sh : line 1 : 22172 Segmentation fault /home/fred/logs/fox/objdir-fx/dist/bin/run-mozilla.sh /home/fred/logs/fox/objdir-fx/browser/installer/../../dist/bin/shlibsign -v -i ../../dist/firefox/libsoftokn3.so
make[3]: * [stage-package] Error 139
make[2]: * [make-package] Error 2
make[1]: * [default] Error 2
make: * [package] Error 2

glibc version : 

[fred@fredo-arch ~]$ pacman -Qi glibc | grep Version
Version               : 2.16.0-1

gcc used :

[fred@fredo-arch ~]$ pacman -Qi gcc | grep Version
Version               : 4.7.1-4
Assignee: nobody → nobody
Component: Build Config → Tools
Product: Core → NSS
QA Contact: build-config → tools
Version: Trunk → trunk
Summary: Make package doesn't work when used on a glibc 2.16 based GNU/Linux distribution. → shlibsign crashes when used on a glibc 2.16 based GNU/Linux distribution.
glibc 2.16 is now archlinux default glibc version. How can I help fixing this bug ?
Log of make package crash. Maybe it could help a little more than the log in comment #0
What is needed is a backtrace of the crash.
Ok. My computer is currently building a firefox debug with this .mozconfig :

export AUTOCONF=autoconf-2.13

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-fx
mk_add_options MOZ_MAKE_FLAGS=-j4

# Options for ‘configure’ (same as command-line options).
ac_add_options --enable-application=browser
ac_add_options --disable-tests
ac_add_options --with-ccache
ac_add_options --disable-warnings-as-errors
ac_add_options --disable-install-strip
ac_add_options --enable-debug-symbols

Will try to give you a backtrace asap.
Cannot get any backtrace.

When I run make package in gdb shell, got this :

/bin/sh : ligne 1 : 21339 Erreur de segmentation  /home/fred/logs/fox/objdir-fx/dist/bin/run-mozilla.sh /home/fred/logs/fox/objdir-fx/browser/installer/../../dist/bin/shlibsign -v -i ../../dist/firefox/libsoftokn3.so
make[3]: *** [stage-package] Erreur 139
make[3] : on quitte le répertoire « /home/fred/logs/fox/objdir-fx/browser/installer »
make[2]: *** [make-package] Erreur 2
make[2] : on quitte le répertoire « /home/fred/logs/fox/objdir-fx/browser/installer »
make[1]: *** [default] Erreur 2
make[1] : on quitte le répertoire « /home/fred/logs/fox/objdir-fx/browser/installer »
make: *** [package] Erreur 2
(gdb) bt
No stack.

No stack available. Using .mozconfig in comment#4 or the debug mozconfig in linux64/ source code.

If you can give me some tips to get this backtrace, I will gave it to you asap.
I know it won't be really helpful, but on package crash, I got this in my logs :

Jul  8 23:08:17 localhost kernel: [23224.082464] shlibsign[21339]: segfault at 7f3b528e70ca ip 00007f3a3998c8a3 sp 00007fff3a4b5a20 error 4 in ld-2.16.so[7f3a39981000+21000]

Trying to help, nothing less !
This is an elfhack issue, --disable-elf-hack should fix it in the meantime

Backtrace (the dynamic linker chokes on the 'hacked' lib):

(gdb) bt
#0  0x00007ffff7de68a3 in _dl_relocate_object () from /lib/ld-linux-x86-64.so.2
#1  0x00007ffff7dedc0a in dl_open_worker () from /lib/ld-linux-x86-64.so.2
#2  0x00007ffff7de9786 in _dl_catch_error () from /lib/ld-linux-x86-64.so.2
#3  0x00007ffff7ded3bc in _dl_open () from /lib/ld-linux-x86-64.so.2
#4  0x00007ffff7362026 in ?? () from /lib/libdl.so.2
#5  0x00007ffff7de9786 in _dl_catch_error () from /lib/ld-linux-x86-64.so.2
#6  0x00007ffff73625fc in ?? () from /lib/libdl.so.2
#7  0x00007ffff73620c1 in dlopen () from /lib/libdl.so.2
#8  0x00007ffff779b16c in pr_LoadLibraryByPathname (name=0x60cf80 "/home/johns/moz/ff-tmp/dist/bin/libfreebl3.so", flags=10)
    at /home/johns/moz/moz-git/nsprpub/pr/src/linking/prlink.c:803
And for reference, to reproduce in a debugger

cd dist/bin
./run-mozilla.sh -g ./shlibsign -v -i ./libsoftokn3.so
Does running a mozilla.org build of firefox crash too?
(In reply to Mike Hommey [:glandium] from comment #9)
> Does running a mozilla.org build of firefox crash too?

I'm using mozilla.org nigthlies for a few days. It seems to be reproducible with homemade builds and glibc 2.16 based linux distributions.
(In reply to Frederic Bezies from comment #10)
> (In reply to Mike Hommey [:glandium] from comment #9)
> > Does running a mozilla.org build of firefox crash too?
> 
> I'm using mozilla.org nigthlies for a few days. It seems to be reproducible
> with homemade builds and glibc 2.16 based linux distributions.

Are you running x86-64 nightlies?
(In reply to Mike Hommey [:glandium] from comment #11)
> (In reply to Frederic Bezies from comment #10)
> > (In reply to Mike Hommey [:glandium] from comment #9)
> > > Does running a mozilla.org build of firefox crash too?
> > 
> > I'm using mozilla.org nigthlies for a few days. It seems to be reproducible
> > with homemade builds and glibc 2.16 based linux distributions.
> 
> Are you running x86-64 nightlies?

Yes. My archlinux is a x86-64 one, so my computer is running x86-64 nightlies
(In reply to Frederic Bezies from comment #12)
> Yes. My archlinux is a x86-64 one, so my computer is running x86-64 nightlies

I can't see any reason why shlibsign would crash in libc when nightlies wouldn't. Are you really sure you run x86-64 nightlies?
Okay, I could reproduce with shlibsign locally, but I don't have debugging symbols for the libc to know what's going wrong.
(In reply to Mike Hommey [:glandium] from comment #13)
> (In reply to Frederic Bezies from comment #12)
> > Yes. My archlinux is a x86-64 one, so my computer is running x86-64 nightlies
> 
> I can't see any reason why shlibsign would crash in libc when nightlies
> wouldn't. Are you really sure you run x86-64 nightlies?

Here's a good one: they're not elfhacked O_o
(In reply to Mike Hommey [:glandium] from comment #15)
> (In reply to Mike Hommey [:glandium] from comment #13)
> > (In reply to Frederic Bezies from comment #12)
> > > Yes. My archlinux is a x86-64 one, so my computer is running x86-64 nightlies
> > 
> > I can't see any reason why shlibsign would crash in libc when nightlies
> > wouldn't. Are you really sure you run x86-64 nightlies?
> 
> Here's a good one: they're not elfhacked O_o

Ah, that's because profiling disabled elfhack. So I guess aurora builds crash, don't they?
Assignee: nobody → nobody
Component: Tools → Build Config
Product: NSS → Core
Version: trunk → Trunk
(In reply to Mike Hommey [:glandium] from comment #16)
> (In reply to Mike Hommey [:glandium] from comment #15)
> > (In reply to Mike Hommey [:glandium] from comment #13)
> > > (In reply to Frederic Bezies from comment #12)
> > > > Yes. My archlinux is a x86-64 one, so my computer is running x86-64 nightlies
> > > 
> > > I can't see any reason why shlibsign would crash in libc when nightlies
> > > wouldn't. Are you really sure you run x86-64 nightlies?
> > 
> > Here's a good one: they're not elfhacked O_o
> 
> Ah, that's because profiling disabled elfhack. So I guess aurora builds
> crash, don't they?

Yes indeed.

I grabbed the latest aurora linux x86-64, and got a crash. Here is the reference :
Crash ID: bp-2b575399-c677-4936-bd4f-443802120709

Hope it helps :)
Looking at backtrace, it seems to be a duplicate of bug #771569.
And... this is a glibc bug :(
Fortunately, we can probably work around it, but it's definitely a glibc bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: