All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: Problem with new image-prelink
Date: Fri, 9 Sep 2011 10:57:36 -0500	[thread overview]
Message-ID: <4E6A3770.4060307@windriver.com> (raw)
In-Reply-To: <840A81C1B782724A8EB52725BD519EFF18E621@MBX20.4emm.local>

Which architecture?

I know of a few issues on MIPS, but they should simply prevent prelinking
instead of causing problems.

Also, can you check your log.do_rootfs for the failed image.  Look for any
prelinker warnings or errors.  (Easiest way is to search for "prelink".  There
should be two hits, one that says "Size before prelinking: ..." and one that
says "Size after prelinking: ..."  between that would be any prelinker messages.)

--Mark

On 9/8/11 10:34 PM, James Limbouris wrote:
> Hi,
> 
> After the new version of prelink was committed, I started experiencing
> segmentation faults in a large Qt app on my prelinked image.
> They go away when image-prelink is disabled, or the single binary is
> reinstalled with opkg. I am using eglibc 2.12 and gcc 4.5. Is anyone
> else having trouble?
> 
> Strace shows the binary gets through a lot of library loads. Here is the tail
> end before the crash:
> 
> open("/usr/lib/libQtDBusE.so.4", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\274n\1D4\0\0\0"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=499692, ...}) = 0
> mmap2(0x44000000, 497232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x44000000
> mmap2(0x44078000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x78) = 0x44078000
> close(3)                                = 0
> open("/usr/lib/libpng12.so.0", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\370\266\215A4\0\0\0"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=130844, ...}) = 0
> mmap2(0x418d8000, 160984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x418d8000
> mprotect(0x418f8000, 28672, PROT_NONE)  = 0
> mmap2(0x418ff000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f) = 0x418ff000
> close(3)                                = 0
> open("/usr/lib/libfreetype.so.6", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\310\366\5B4\0\0\0"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=458292, ...}) = 0
> mmap2(0x42058000, 488488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x42058000
> mprotect(0x420c5000, 28672, PROT_NONE)  = 0
> mmap2(0x420cc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6c) = 0x420cc000
> close(3)                                = 0
> open("/usr/lib/libQtXmlE.so.4", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\364,\20B4\0\0\0"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=268336, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
> mmap2(0x420f0000, 297992, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x420f0000
> mprotect(0x42130000, 28672, PROT_NONE)  = 0
> mmap2(0x42137000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3f) = 0x42137000
> close(3)                                = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40008000
> set_tls(0x40008860, 0x40008f48, 0x415a4048, 0x40008860, 0x415a4048) = 0
> mprotect(0x416f3000, 4096, PROT_READ)   = 0
> mprotect(0x41c29000, 12288, PROT_READ)  = 0
> mprotect(0x416cd000, 8192, PROT_READ)   = 0
> mprotect(0x417d1000, 4096, PROT_READ)   = 0
> mprotect(0x417e5000, 4096, PROT_READ)   = 0
> mprotect(0x4179d000, 4096, PROT_READ)   = 0
> mprotect(0x415a3000, 4096, PROT_READ)   = 0
> munmap(0x40001000, 5103)                = 0
> set_tid_address(0x40008408)             = 1235
> set_robust_list(0x40008410, 0xc)        = 0
> rt_sigaction(SIGRTMIN, {0x416dc084, [], SA_SIGINFO|0x4000000}, NULL, 8) = 0
> rt_sigaction(SIGRT_1, {0x416dbf28, [], SA_RESTART|SA_SIGINFO|0x4000000}, NULL, 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
> getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
> brk(0)                                  = 0x1c5000
> brk(0x1e6000)                           = 0x1e6000
> open("/proc/self/auxv", O_RDONLY)       = 3
> read(3, "\20\0\0\0\227\1\0\0", 8)       = 8
> close(3)                                = 0
> sched_getparam(1235, { 0 })             = 0
> sched_getscheduler(1235)                = 0 (SCHED_OTHER)
> clock_getres(CLOCK_MONOTONIC, {0, 1})   = 0
> sched_get_priority_min(SCHED_OTHER)     = 0
> sched_get_priority_max(SCHED_OTHER)     = 0
> sched_get_priority_max(SCHED_OTHER)     = 0
> gettimeofday({1315537291, 101290}, NULL) = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> Segmentation fault
> 
> 
> It should have continued with:
> 
> 
> open("/usr/lib/charset.alias", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
> open("/usr/share/locale/locale.alias", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
> clock_gettime(CLOCK_MONOTONIC, {645, 655570927}) = 0
> futex(0x417d20a4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
> uname({sys="Linux", node="192.168.1.14", ...}) = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(3)                                = 0
> socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
> connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
> close(3)                                = 0
> open("/etc/nsswitch.conf", O_RDONLY)    = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40001000
> read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0x40001000, 4096)                = 0
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=5103, ...}) = 0
> mmap2(NULL, 5103, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40001000
> close(3)                                = 0
> open("/lib/libnss_compat.so.2", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0T\r\0\0004\0\0\0"..., 512) = 512
> fstat64(3, {st_mode=S_IFREG|0755, st_size=26368, ...}) = 0
> mmap2(NULL, 57952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40009000
> mprotect(0x4000f000, 28672, PROT_NONE)  = 0
> mmap2(0x40016000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0x40016000
> close(3)
> .....
> 
> I think the gettimeofday() before the crash is the end of the loading process.
> None of the other binaries on the system are doing this - even demos from
> qt4-embedded-demos. The only salient feature of this particular binary is
> its large resource section, weighing it in at 1.4 MB.
> 
> I'm rebuilding now with eglibc 2.13 and gcc 4.6. Will report the results.  
> 
> Regards, 
> James Limbouris
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




  reply	other threads:[~2011-09-09 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  3:34 Problem with new image-prelink James Limbouris
2011-09-09 15:57 ` Mark Hatle [this message]
2011-09-12  1:39   ` James Limbouris
2011-09-12 14:50     ` Mark Hatle
2011-09-13  2:58       ` James Limbouris
2011-09-13  9:16         ` Phil Blundell
2011-09-14  0:52           ` Mark Hatle
2011-09-14  1:33             ` James Limbouris
2011-09-14 14:30               ` Mark Hatle
2011-09-15  1:01                 ` James Limbouris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E6A3770.4060307@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.