Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


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

[Discuss] Seeking information on binaries called "entities" and "fixup"



On 7/29/2014 6:06 PM, Tom Metro wrote:
> Bill Horne wrote:
>> moder8 at telecom:~/bin$ ls -lh /home/moder8/bin/entities
>> -rwxrwxr-x 1 moder8 telecom 8.8K Jan 27  2012 /home/moder8/bin/entities
>>
>> moder8 at telecom:~$ strace /home/moder8/bin/entities /var/www/html/archives/back.issues/recent.single.issues/I125
>> execve("/home/moder8/bin/entities", ["/home/moder8/bin/entities", "/var/www/html/archives/back.issu"...], [/* 21 vars */]) = -1 ENOENT (No such file or directory)
>> write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
>> ) = 40
> Have you examined /home/moder8/bin/entities with 'file', strings, and less?
>
> I would guess that it is a shell script with a missing interpreter, but
> the error message is not right for that.
>
> Actually, that might be it:
>
> % touch foo
> % chmod u+x foo
> % echo #\!/bin/bogus>  foo
> fringe:/tmp% strace ./foo
> execve("./foo", ["./foo"], [/* 54 vars */]) = -1 ENOENT (No such file or
> directory)
> [...]
> write(3, "strace: exec: No such file or di"..., 40strace: exec: No such
> file or directory
> ) = 40
>
> It's a misleading error message. The "No such file" is not referring to
> ./foo, but to the specified interpreter, /bin/bogus, but because the
> bang-path magic is embedded in execve(), and it only returns an error
> code (it doesn't generate the error message to STDERR), you're left with
> a generic error and no object being identified.
>
>
> I assume the above was on the new server. What happens when you strace
> it on the old server?
>
>   -Tom
>

Tom,

I ran the "entities" binary on the "old" machine, and I've pasted the 
output here: "I125" is a standard MBOX-format email file, with a single 
issue of The Telecom Digest in it. It works as expected.

moder8 at old-massis:/tmp$ strace -o/tmp/strace_out2.txt 
/home/moder8/bin/entities <I125

execve("/home/moder8/bin/entities", ["/home/moder8/bin/entities"], [/* 
20 vars */]) = 0
brk(0)                                  = 0x8749000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb77df000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=23117, ...}) = 0
mmap2(NULL, 23117, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb77d9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
directory)
open("/lib/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, 
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0n\1\0004\0\0\0"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1327556, ...}) = 0
mmap2(NULL, 1337704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0xb7692000
mprotect(0xb77d2000, 4096, PROT_NONE)   = 0
mmap2(0xb77d3000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x140) = 0xb77d3000
mmap2(0xb77d6000, 10600, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb77d6000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb7691000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb76916c0, 
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, 
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb77d3000, 8192, PROT_READ)   = 0
mprotect(0xb77fd000, 4096, PROT_READ)   = 0
munmap(0xb77d9000, 23117)               = 0
fstat64(0, {st_mode=S_IFREG|0666, st_size=3174, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb77de000
read(0, "From telecom-owner+DV033N00125=b"..., 4096) = 3174
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb77dd000
write(1, "From telecom-owner+DV033N00125=b"..., 108) = 108
write(1, "Return-path: &lt;telecom-owner+D"..., 99) = 99
write(1, "Envelope-to: backups-digest at tele"..., 46) = 46
write(1, "Delivery-date: Sun, 27 Jul 2014 "..., 47) = 47
write(1, "Received: from listmail.iecc.com"..., 50) = 50
write(1, "\tby telecom.xen.prgmr.com with e"..., 49) = 49
write(1, "\t(envelope-from &lt;telecom-owne"..., 103) = 103
write(1, "\tid 1XBIko-0000XY-Dp\n", 21) = 21
write(1, "\tfor backups-digest at telecomdiges"..., 71) = 71
write(1, "Received: (qmail 62112 invoked b"..., 72) = 72
write(1, "DKIM-Signature: v=1; a=rsa-sha25"..., 599) = 599
write(1, "Content-Type: text/plain\n", 25) = 25
write(1, "Content-Disposition: inline\n", 28) = 28
write(1, "Content-Transfer-Encoding: 8bit\n", 32) = 32
write(1, "MIME-Version: 1.0\n", 18)     = 18
write(1, "X-Mailer: MIME-tools 5.505 (Enti"..., 42) = 42
write(1, "Subject: The Telecom Digest (1 m"..., 41) = 41
write(1, "From: telecom-owner at telecom-dige"..., 39) = 39
write(1, "To: telecom at telecom-digest.org\n", 31) = 31
write(1, "Date: Sun, 27 Jul 2014 03:20:03 "..., 38) = 38
write(1, "Reply-To: telecomdigestsubmissio"..., 54) = 54
write(1, "List-Help: &lt;mailto:telecom-re";..., 94) = 94
write(1, " Instructions)\n", 15)        = 15
write(1, "List-Unsubscribe: (Use this comm"..., 57) = 57
write(1, "+&lt;mailto: telecom-request at tel"..., 79) = 79
write(1, "List-Subscribe: (Use this comman"..., 52) = 52
write(1, "+&lt;mailto: telecom-request at tel"..., 77) = 77
write(1, "List-Post: &lt;mailto:telecomdig";..., 70) = 70
write(1, "List-Owner: &lt;mailto:owner-tel";..., 80) = 80
write(1, " Help)\n", 7)                 = 7
write(1, "List-ID: &lt;telecom.telecom-dig"..., 44) = 44
write(1, "X-Loop: majordomo\n", 18)     = 18
write(1, "Precedence: bulk\n", 17)      = 17
write(1, "Sender: telecom-owner at telecom-di"..., 41) = 41
write(1, "Errors-To: telecom-owner at telecom"..., 44) = 44
write(1, "Reply-To: telecomdigestmoderator"..., 52) = 52
write(1, "Status: RO\n", 11)            = 11
write(1, "Content-Length: 823\n", 20)   = 20
write(1, "Lines: 32\n", 10)             = 10
write(1, "\n", 1)                       = 1
write(1, "The Telecom Digest \n", 20)   = 20
write(1, "Volume 33 : Issue 125 : &quot;te"..., 48) = 48
write(1, "\n", 1)                       = 1
write(1, "Messages in this Issue:\n", 24) = 24
write(1, "  Bill Horne has returned [nfp] "..., 77) = 77
write(1, "\n", 1)                       = 1
write(1, "--------------------------------"..., 71) = 71
write(1, "\n", 1)                       = 1
write(1, "Date: Fri, 25 Jul 2014 14:29:16 "..., 38) = 38
write(1, "From: Telecom Digest Moderator &"..., 93) = 93
write(1, "To: telecomdigestmoderator at telec"..., 47) = 47
write(1, "Subject: Bill Horne has returned"..., 39) = 39
write(1, "Message-ID: &lt;20140725182916.G"..., 69) = 69
write(1, "\n", 1)                       = 1
write(1, "\n", 1)                       = 1
write(1, "I&#39;ve decided to resume my du"..., 51) = 51
write(1, "\n", 1)                       = 1
write(1, "Fred Goldstein has done a great "..., 74) = 74
write(1, "me in thanking him for his selfl"..., 63) = 63
write(1, "difficult time.\n", 16)       = 16
write(1, "\n", 1)                       = 1
write(1, "Bill\n", 5)                   = 5
write(1, "\n", 1)                       = 1
write(1, "-- \n", 4)                    = 4
write(1, "Bill Horne \n", 12)           = 12
write(1, "Moderator\n", 10)             = 10
write(1, "\n", 1)                       = 1
write(1, "\n", 1)                       = 1
write(1, "------------------------------\n", 31) = 31
write(1, "\n", 1)                       = 1
write(1, "End of The Telecom Digest (1 mes"..., 39) = 39
write(1, "**********\n", 11)            = 11
write(1, "\n", 1)                       = 1
read(0, "", 4096)                       = 0
exit_group(0)                           = ?

-- 
E. William Horne
William Warren Consulting
339-364-8487




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org