Bug 252453
Summary: | SIGSEGV during program startup | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Valdis Kletnieks <valdis.kletnieks> |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | drepper, tmraz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-08-26 21:03:46 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Valdis Kletnieks
2007-08-16 03:56:32 UTC
That's vague, which existing binaries, linked dynamically or statically, can you get a backtrace of the segfault? Seems the problem is when some DSO constructor uses gettimeofday before libc.so has been initialized: sed 's,^ ,\t,' > Makefile <<\EOF CFLAGS += -O2 -fpic test: test.c libtest.so $(CC) $(CFLAGS) -o $@ $< -Wl,-rpath,. -L. -ltest libtest.so: libtest.c $(CC) -shared $(CFLAGS) -o $@ $^ clean: -rm -f libtest.so test *~ core* EOF cat > libtest.c <<\EOF #include <sys/time.h> #include <stdlib.h> void __attribute__((constructor)) foo (void) { struct timeval tv; gettimeofday (&tv, NULL); } EOF cat > test.c <<\EOF int main (void) { return 0; } EOF Good thing you found it - I currently have 2.6.90-8 installed, and can't install -9 to replicate it and get a traceback due to bug #252979, I need to track down a backlevel rpm-libs rpm (and it's unclear how I'll bootstrap that install..) Worked around in 2.6.90-11 by reverting temporarily gettimeofday.S changes. Not closing this bug, since we don't have a proper fix yet. With ptr mangling it is tricky - there is no way how to mangle a static initializer, and checking at runtime whether the mangled pointer is NULL or not is bad as well - in rare cases the initialized pointer can be mangled as 0. We'd need to run some initialization routine of libc.so before all other lib ctors, which is why we have DF_1_INITFIRST. But we already use that for libpthread.so... OK... My problem binary survives startup against 2.6.90-11, so leaving the bug in 'assigned' is cool by me. *** Bug 253240 has been marked as a duplicate of this bug. *** Should be fixed in glibc-2.6.90-12 for real. Confirming - I have -12 installed now, and my problematic binary isn't complaining. Thanks.. |