Weird glibc trampoline problem on R4600

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
At fist I have to appolgize for not havin' an easy testcase but maybe
someone has any ideas anyway. 
When running this little shell script on an R4600 Indy:

#! /bin/sh
./update-alternatives --install /usr/bin/vi vi /usr/bin/vim 20 --slave /usr/share/man/man1/vi.1.gz vi.1.gz /usr/share/man/man1/vim.1.g

Which executes the perl script "update-alternatives" (attached to this
mail) the process dies with a Segfault:

agx@revamp:~$ ./vim.postinst 
./vim.postinst: line 2:   282 Segmentation fault      /usr/lib/debug/ld.so.1 /usr/bin/perl ./update-alternatives --install /usr/bin/vi vi /usr/bin/vim 20 --slave /usr/share/man/man1/vi.1.gz vi.1.gz /usr/share/man/man1/vim.1.gz

A backtrace shows:

agx@revamp:~/glibc-2.2.4/elf$ uname -a
Linux revamp 2.4.16 #1 Mon Dec 3 19:47:43 CET 2001 mips unknown
agx@revamp:~/glibc-2.2.4/elf$ gdb -c ../../core /usr/bin/perl
GNU gdb 5.0.90-cvs (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mips-linux"...(no debugging symbols found)...

warning: core file may not match specified executable file.
Core was generated by `/usr/lib/debug/ld.so.1 /usr/bin/perl ./update-alternatives --install /usr/bin/v'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libperl.so.5.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libperl.so.5.6
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/debug/ld.so.1...done.
Loaded symbols for /usr/lib/debug/ld.so.1
#0  0x2ab45ff8 in Perl_sv_upgrade () from /usr/lib/libperl.so.5.6
(gdb) bt
#0  0x2ab45ff8 in Perl_sv_upgrade () from /usr/lib/libperl.so.5.6
#1  0x2ab4b468 in Perl_sv_setsv () from /usr/lib/libperl.so.5.6
#2  0x2ab38444 in Perl_pp_sassign () from /usr/lib/libperl.so.5.6
#3  0x2ab37b60 in Perl_runops_standard () from /usr/lib/libperl.so.5.6
#4  0x2aabead4 in perl_run () from /usr/lib/libperl.so.5.6
#5  0x55560348 in _dl_runtime_resolve () at dl-runtime.c:229
#6  0x55560348 in _dl_runtime_resolve () at dl-runtime.c:229
#7  0x55560348 in _dl_runtime_resolve () at dl-runtime.c:229
#8  0x55560348 in _dl_runtime_resolve () at dl-runtime.c:229
[..."endlessly" repeated...]
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) frame 5
#5  0x55560348 in _dl_runtime_resolve () at dl-runtime.c:229
229	ELF_MACHINE_RUNTIME_TRAMPOLINE
(gdb) info frame
Stack level 5, frame at 0x7fff7cc8:
 pc = 0x55560348 in _dl_runtime_resolve (dl-runtime.c:229); saved pc 0x55560348
 called by frame at 0x7fff7cf0, caller of frame at 0x7fff7ca0
 source language c.
 Arglist at 0x7fff7cc8, args: 
 Locals at 0x7fff7cc8, Previous frame's sp is 0x7fff7cc8
 Saved registers:
  a0 at 0x7fff7cb0, a1 at 0x7fff7cb4, a2 at 0x7fff7cb8, a3 at 0x7fff7cbc, t7 at 0x7fff7cc4,
  gp at 0x7fff7cc0

...so it seems the process is stuck in the glibc-trampoline. Some other
interesting facts:
 - when using a libc6 with debugging symbols the problem disappears
 - when using perldebug the problem disappears
 - when not using a shell script but typing the command directly
   into the shell the segfault goes away(also when using a subshell() )
 - it does not show up on R4000, R4400 or R5000 CPUs 
Any thoughts welcome,
 -- Guido

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux