From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 30 14:31:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8E0A16A403; Sat, 30 Dec 2006 14:31:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC6313C45D; Sat, 30 Dec 2006 14:31:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.227] (helo=fw.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1H0fEp-000F0R-JR; Sat, 30 Dec 2006 16:31:16 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id kBUEV3Ji045423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id kBUEV3kq094169; Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id kBUEV3LU094168; Sat, 30 Dec 2006 16:31:03 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Dec 2006 16:31:03 +0200 From: Kostik Belousov To: Alejandro Pulver Message-ID: <20061230143103.GP21325@deviant.kiev.zoral.com.ua> References: <20061230024718.22131bff@phobos.mars.bsd> <20061230122149.GM21325@deviant.kiev.zoral.com.ua> <20061230111559.760a497b@phobos.mars.bsd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NEAjDeynQrrxd8+d" Content-Disposition: inline In-Reply-To: <20061230111559.760a497b@phobos.mars.bsd> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.7, clamav-milter version 0.88.7 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=ALL_TRUSTED,SPF_NEUTRAL autolearn=failed version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on fw.zoral.com.ua X-Scanner-Signature: e97279b2caa82cd912acb3683499d123 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 661 [Dec 30 2006] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Program not being executed at all X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Dec 2006 14:31:17 -0000 --NEAjDeynQrrxd8+d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 30, 2006 at 11:15:59AM -0300, Alejandro Pulver wrote: > On Sat, 30 Dec 2006 14:21:50 +0200 > Kostik Belousov wrote: >=20 > > On Sat, Dec 30, 2006 at 02:47:18AM -0300, Alejandro Pulver wrote: > > > Hello. > > >=20 > > > I tried to update the port I maintain "games/quake2max", a Quake II > > > engine, but when I try to run the compiled executables, except for > > > the dedicated server (quake2max-ded) they output "Abort" and quit. > > >=20 > > > The output of 'ktrace' is the following (it just stops before running > > > it): > > >=20 > > > 82753 ktrace RET ktrace 0 > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/bin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/bin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/games/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/local/sbin/quake2max" > > > 82753 ktrace RET execve -1 errno 2 No such file or directory > > > 82753 ktrace CALL execve(0xbfbfe320,0xbfbfe844,0xbfbfe84c) > > > 82753 ktrace NAMI "/usr/local/bin/quake2max" > > >=20 > > > Interestingly 'ldd' also crashes when examining it, outputting the > > > following (however 'ktrace' has more information): > > >=20 > > > /usr/local/bin/quake2max: > > > /usr/local/bin/quake2max: signal 6 > > >=20 > > > My first thought was that it was a GCC bug, so I tried compiling it > > > with 4.1 (my system is a FreeBSD 6.1-RELEASE-p1 with GCC 3.4.4 > > > 20050518) but it made no difference. > > >=20 > > > Interestingly the actual "games/quake2max" port works just fine > > > (version 0.44), and I couldn't see something suspicious with a quick > > > look to the 'diff' output. I have attached a patch to update the port > > > in the tree to the 0.45 version. > > >=20 > > > Could someone investigate this please? > > >=20 > > > Thanks and Best Regards, > > > Ale > > >=20 > > > P.S.: please CC me since I am not subscribed to the list. > >=20 > > Please, show the output of the commands > > file /usr/local/bin/quake2max > > readelf -ld /usr/local/bin/quake2max > >=20 > >=20 >=20 > Hello. >=20 > Thank you for your reply. >=20 > Here is the output: >=20 > % file /usr/local/bin/quake2max > /usr/local/bin/quake2max: ELF 32-bit LSB executable, Intel 80386, version= 1 (FreeBSD), for FreeBSD 6.1, dynamically linked (uses shared libs), strip= ped >=20 > % readelf -ld /usr/local/bin/quake2max > Elf file type is EXEC (Executable file) > Entry point 0x80497d0 > There are 6 program headers, starting at offset 52 >=20 > Program Headers: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > PHDR 0x000034 0x08048034 0x08048034 0x000c0 0x000c0 R E 0x4 > INTERP 0x0000f4 0x080480f4 0x080480f4 0x00015 0x00015 R 0x1 > [Requesting program interpreter: /libexec/ld-elf.so.1] > LOAD 0x000000 0x08048000 0x08048000 0x72875 0x72875 R E 0x1000 > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW 0x= 1000 > DYNAMIC 0x075a70 0x080bda70 0x080bda70 0x000c0 0x000c0 RW 0x4 > NOTE 0x00010c 0x0804810c 0x0804810c 0x00018 0x00018 R 0x4 >=20 > Section to Segment mapping: > Segment Sections... > 00 =20 > 01 .interp=20 > 02 .interp .note.ABI-tag .hash .dynsym .dynstr .rel.dyn .rel.plt .= init .plt .text .fini .rodata=20 > 03 .data .eh_frame .dynamic .ctors .dtors .jcr .got .bss=20 > 04 .dynamic=20 > 05 .note.ABI-tag=20 >=20 > Dynamic segment at offset 0x75a70 contains 19 entries: > Tag Type Name/Value > 0x00000001 (NEEDED) Shared library: [libm.so.4] > 0x00000001 (NEEDED) Shared library: [libz.so.3] > 0x00000001 (NEEDED) Shared library: [libc.so.6] > 0x0000000c (INIT) 0x80491dc > 0x0000000d (FINI) 0x80b1748 > 0x00000004 (HASH) 0x8048124 > 0x00000005 (STRTAB) 0x8048b5c > 0x00000006 (SYMTAB) 0x804846c > 0x0000000a (STRSZ) 878 (bytes) > 0x0000000b (SYMENT) 16 (bytes) > 0x00000015 (DEBUG) 0x0 > 0x00000003 (PLTGOT) 0x80bdb44 > 0x00000002 (PLTRELSZ) 744 (bytes) > 0x00000014 (PLTREL) REL > 0x00000017 (JMPREL) 0x8048ef4 > 0x00000011 (REL) 0x8048ecc > 0x00000012 (RELSZ) 40 (bytes) > 0x00000013 (RELENT) 8 (bytes) > 0x00000000 (NULL) 0x0 >=20 > Best Regards, > Ale Signal 6 is sent by elf image activator upon exec() when old address space is destroyed, but new image cannot be loaded. In your case, I guess that extra large bss section size (where uninitialized global/static variables are placed) causes loader to fail: > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align > LOAD 0x073000 0x080bb000 0x080bb000 0x02cc4 0x28a20e34 RW 0x= 1000 Look at MemSiz column. VirtAddr + MemSiz >=3D 0x30000000, and elf interpret= er (/libexec/ld-elf.so.1) is usually mmapped at 0x28000000. Look at the source for huge global arrays/objects. --NEAjDeynQrrxd8+d Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFlngmC3+MBN1Mb4gRAlfWAJ4sIghSMDU5MPd30qvCstXswbsmhQCdEd6W sVDF1zvww/ga8MkWi1MkSdQ= =yaz7 -----END PGP SIGNATURE----- --NEAjDeynQrrxd8+d--