pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/53414: mplayer tries to write-enable text segment on NetBSD/i386-8.0_RC2, fails.
>Number: 53414
>Category: pkg
>Synopsis: mplayer tries to write-enable text segment on NetBSD/i386-8.0_RC2, fails.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 29 23:40:00 +0000 2018
>Originator: John D. Baker
>Release: NetBSD/i386-8.0_RC2, pkgsrc-HEAD (pre-pkgsrc-2018Q2)
>Organization:
>Environment:
NetBSD verthandi 8.0_RC2 NetBSD 8.0_RC2 (VERTHANDI) #30: Sun Jun 24 11:32:15 CDT 2018 sysop%plex760.technoskunk.fur@localhost:/r0/build/netbsd-8/obj/i386/sys/arch/i386/compile/VERTHANDI i386
>Description:
Previous appended to pkg/53319, requested to file new PR.
On my i386-8.0_RC2 system, mplayer built from recent pkgsrc-HEAD (in
the freeze before pkgsrc-2018Q2) fails to run as follows:
$ mplayer
mplayer: text relocations
mplayer: Cannot write-enable text segment: Permission denied
Running mplayer through 'ktruss' ends with:
[...]
1541 1 mplayer open("/usr/local/lib/libcrypt.so.1", 0, 0xbfb613cc) Err#2 ENOENT
1541 1 mplayer open("/lib/libcrypt.so.1", 0, 0xbfb613cc) = 3
1541 1 mplayer __fstat50(0x3, 0xbfb613cc) = 0
1541 1 mplayer mmap(0, 0x1000, 0x1, 0x1, 0x3, 0, 0, 0) = 0xaade5000
1541 1 mplayer munmap(0xaade5000, 0x1000) = 0
1541 1 mplayer mmap(0, 0xb000, 0x5, 0x2, 0x3, 0, 0, 0) = 0xaaddb000
1541 1 mplayer mmap(0xaade1000, 0x2000, 0x3, 0x12, 0x3, 0, 0x5000, 0) = 0xaade1000
1541 1 mplayer mmap(0xaade3000, 0x3000, 0x3, 0x1012, 0xffffffff, 0, 0, 0) = 0xaade3000
1541 1 mplayer close(0x3) = 0
1541 1 mplayer write(0x2, 0xbfb619ec, 0x19) = 25
"mplayer: text relocations"
1541 1 mplayer write(0x2, 0xbac88872, 0x1) = 1
"\n"
1541 1 mplayer mprotect(0x26000, 0x2c9000, 0x3) Err#13 EACCES
1541 1 mplayer write(0x2, 0xbfb61a00, 0x3c) = 60
"mplayer: Cannot write-enable text segment: Permission denied"
1541 1 mplayer write(0x2, 0xbac88872, 0x1) = 1
"\n"
1541 1 mplayer exit(0x1)
So, mprotect() is being called with prot=3 (-wx) for a region of memory
at 0x26000.
Looking earlier in the 'ktruss' output shows several instances of
"26000". Two are the requsted length for mmap()ing
"/usr/lib/libexpat.so.2" and "/usr/X11R7/lib/libxcb.so.2", respectively.
Another is a byte offset into "/usr/lib/liblzma.so.2" to be mmap()ed.
The rest are tails of longer addresses either requested of or returned
by mmap().
Not sure what it's doing, then.
Even built with the "debug" option, running mplayer under 'gdb' is
not particularly informative:
[...]
Reading symbols from mplayer...done.
(gdb) run
Starting program: /usr/pkg/bin/mplayer
/usr/pkg/bin/mplayer: text relocations
Program received signal SIGSEGV, Segmentation fault.
_rtld_relocate_plt_lazy (obj=obj@entry=0xb48d7000)
at /x/netbsd-8/src/libexec/ld.elf_so/arch/i386/mdreloc.c:210
210 *where += (Elf_Addr)obj->relocbase;
(gdb) bt
#0 _rtld_relocate_plt_lazy (obj=obj@entry=0xb48d7000)
at /x/netbsd-8/src/libexec/ld.elf_so/arch/i386/mdreloc.c:210
#1 0xbb24c515 in _rtld_relocate_objects (first=0xb48d7000,
bind_now=bind_now@entry=false)
at /x/netbsd-8/src/libexec/ld.elf_so/reloc.c:213
#2 0xbb24ae89 in _rtld (sp=<optimized out>, relocbase=3139731456)
at /x/netbsd-8/src/libexec/ld.elf_so/rtld.c:694
#3 0xbb2484aa in .rtld_start () from /usr/libexec/ld.elf_so
(gdb) list
205 Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rel->r_offset);
206
207 assert(ELF_R_TYPE(rel->r_info) == R_TYPE(JMP_SLOT));
208
209 /* Just relocate the GOT slots pointing into the PLT */
210 *where += (Elf_Addr)obj->relocbase;
211 rdbg(("fixup !main in %s --> %p", obj->path, (void *)*where));
212 }
213
214 return 0;
(gdb) continue
Continuing.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) quit
As some have noted, other ffmpeg3 users work OK on i386 (notably
firefox).
Any clues? 'mplayer' is the last show-stopper keeping me from using
netbsd-8 on my i386 systems.
For the record, my "mplayer" is built with the following options:
PKG_DEFAULT_OPTIONS+=pam ssl oss -cups -pulseaudio -alsa -dbus -gvfs
PKG_DEFAULT_OPTIONS+=-jack -arts
PKG_OPTIONS.mplayer+=aalib caca dts ggi mplayer-ssse3 mplayer-win32 debug
>How-To-Repeat:
See above. Also affects i386-current.
>Fix:
Home |
Main Index |
Thread Index |
Old Index