Messages in this thread Patch in this message | | | Date | Wed, 17 Sep 1997 23:16:03 -0400 | From | Bradley Ward Allen <> | Subject | 2.0 (pre-31#9): "N_TXTOFF < BLOCK_SIZE. Please convert binary." |
| |
-----BEGIN PGP SIGNED MESSAGE-----
I'm getting lots of these ever since around when I switched to a glibc mixed system (still has libc.5 and libc.4 on it with A.OUT and ELF support):
Sep 3 20:20:09 Q facility=kern(0) priority=notice(5) kernel: N_TXTOFF < BLOCK_SIZE. Please convert binary.
ulmo@Q:~/src/memwatch-1.2$ egrep -c "N_TXTOFF < BLOCK_SIZE" /var/log/messages 1202 ulmo@Q:~/src/memwatch-1.2$ head -1 !$ head -1 /var/log/messages Sep 3 10:54:19 Q facility=syslog(50) priority=info(6) syslogd 1.3-3: restart (remote reception). ulmo@Q:~/src/memwatch-1.2$
I tried to trace them down many times, cumulitive for hours. Now I'm looking at the kernel source:
ulmo@Q:/usr/src/linux$ egrep -e 'N_TXTOFF < BLOCK_SIZE' `find -type f ! -name '*~'` ./fs/binfmt_aout.c: printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n"); ./fs/binfmt_aout.c: printk("N_TXTOFF < BLOCK_SIZE. Please convert library\n"); ./fs/binfmt_aout.o:<5>N_TXTOFF < BLOCK_SIZE. Please convert binary. ./fs/binfmt_aout.o:N_TXTOFF < BLOCK_SIZE. Please convert library ./fs/fs.o:<5>N_TXTOFF < BLOCK_SIZE. Please convert binary. ./fs/fs.o:N_TXTOFF < BLOCK_SIZE. Please convert library ./vmlinux:<5>N_TXTOFF < BLOCK_SIZE. Please convert binary. ./vmlinux:N_TXTOFF < BLOCK_SIZE. Please convert library ulmo@Q:/usr/src/linux$ cd fs ulmo@Q:/usr/src/linux/fs$ emacs binfmt_aout.c
Now I find out that there are lines close by where they know what the inode # is! This is appaling! An error with no indication as to why! I could not believe I wasted my time because of such a poor error reporting, I assumed they could not say any clue.
Here's a patch to fix that, probably more important now, untested but it compiles and looks right; I'm sure this better documentation should be considered as a general case for Linux error reporting, but this specific case might help a few people; if I find the problem, I'll followup, and if it seems pertinent, I'll email to Linus to have him add this into 2.0.31pre#9 so that all the glibc converters will know what's going on:
=============== - --- linux-2.0/fs/binfmt_aout.c.~1~ Sat Aug 17 14:19:28 1996 +++ linux-2.0/fs/binfmt_aout.c Wed Sep 17 23:11:50 1997 @@ -277,13 +277,13 @@ #ifdef __i386__ if (N_MAGIC(ex) == ZMAGIC && fd_offset != BLOCK_SIZE) { - - printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h.\n"); + printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h. inode %lu\n", bprm->inode->i_ino); return -ENOEXEC; } if (N_MAGIC(ex) == ZMAGIC && ex.a_text && (fd_offset < bprm->inode->i_sb->s_blocksize)) { - - printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n"); + printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary. inode %lu\n", bprm->inode->i_ino); return -ENOEXEC; } #endif @@ -329,7 +329,7 @@ #endif } else { if (ex.a_text & 0xfff || ex.a_data & 0xfff) - - printk(KERN_NOTICE "executable not page aligned\n"); + printk(KERN_NOTICE "executable not page aligned; inode %lu\n", bprm->inode->i_ino); fd = open_inode(bprm->inode, O_RDONLY); @@ -443,7 +443,7 @@ } if (N_MAGIC(ex) == ZMAGIC && N_TXTOFF(ex) && (N_TXTOFF(ex) < inode->i_sb->s_blocksize)) { - - printk("N_TXTOFF < BLOCK_SIZE. Please convert library\n"); + printk("N_TXTOFF < BLOCK_SIZE. Please convert library; inode %lu\n", inode->i_ino); return -ENOEXEC; } ============= end of patch
-----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQEVAwUBNCCc55xWhFYc6x9VAQEZ1Af/b+AEbc7Cem9ZNYgLUcKC03bnxTQnjtpn f33JLrxlQ50UOHbFtMZrerZOiRHRyBWp/Lfp5ZUNA1BFOA/19psSpS7gK6fdyCSv QTGVbh6junM9xZpZlBdIFHGbiGJPdyW9JygPaUdlF8xm0iO33Gosn8Gubj2hvkKh R1Mhvb0OrEROPykV5CcxNQCqQP147QGlaiGdyP9cz0u3tFiYUdDhwwTztoiT9hJ3 9nX0rHdCykDumRc27IvCyh220sCYJdUj3Ysmc5o9jIxNCx2P8gbLkFn54adY7KbH sCba3zfcBiYxp9DgZufD8ZLkUn03SHLfldZUBYnzTXEGC1SMnKjEqw== =5psB -----END PGP SIGNATURE-----
| |