-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dirk Eddelbuettel wrote: > I still have the feeling that I am not quite sure why and where this would be > a bug in R. As Doug demonstrated, it works merrily on amd64 with the same > toolchain. > > So the ball is back in your court as we're not quite sure where this is a bug > in R. Can you strip down the program you are trying to run? What happens, > say, if you use valgrind on 'r' from the littler package (which initializes R > to the minimal extent) ?
I am not sure where the bug is either :) . For littler, I get a similar error as with regular R 2.5.1 . I just compiled R-devel from the vanilla source to compare with Doug (just ./configure CC=gcc-4.2 - --with-valgrind-instrumentation=2; make). I got a crash, but with R-devel, it does not have the analogue to the line - --27909-- Reading syms from /usr/bin/r (0x400000) - --27909-- object doesn't have a symbol table - --27909-- Reading syms from /lib/ld-2.6.1.so (0x4000000) that littler and R 2.5.1 produce. With R-devel, it appears not to have a problem until a couple of lines later: - --28520-- Reading syms from /tmp/R-devel/bin/exec/R (0x400000) - --28520-- Reading syms from /lib/ld-2.6.1.so (0x4000000) - --28520-- Reading debug info from /lib/ld-2.6.1.so... - --28520-- ... CRC mismatch (computed 635CD41D wanted 1F3B7BF3) I paste the full output from both tests below. Thanks, Ben [EMAIL PROTECTED]:/tmp$ valgrind --verbose r < crash.R ==27909== Memcheck, a memory error detector. ==27909== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==27909== Using LibVEX rev 1732, a library for dynamic binary translation. ==27909== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==27909== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework. ==27909== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==27909== - --27909-- Command line - --27909-- r - --27909-- Startup, with flags: - --27909-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp - --27909-- --verbose - --27909-- Contents of /proc/version: - --27909-- Linux version 2.6.22.2-slh64-smp-1 ([EMAIL PROTECTED]) (gcc version 4.1.3 20070718 (prerelease) (Debian 4.1.2-14)) #1 SMP PREEMPT Fri Aug 10 17:19:56 CEST 2007 - --27909-- Arch and hwcaps: AMD64, amd64-sse2 - --27909-- Page sizes: currently 4096, max supported 4096 - --27909-- Valgrind library directory: /usr/lib/valgrind - --27909-- Reading syms from /usr/bin/r (0x400000) - --27909-- object doesn't have a symbol table - --27909-- Reading syms from /lib/ld-2.6.1.so (0x4000000) - --27909-- Reading debug info from /lib/ld-2.6.1.so... - --27909-- ... CRC mismatch (computed 635CD41D wanted 1F3B7BF3) - --27909-- Reading debug info from /usr/lib/debug/lib/ld-2.6.1.so... - --27909-- Reading syms from /usr/lib/valgrind/amd64-linux/memcheck (0x38000000) - --27909-- object doesn't have a dynamic symbol table - --27909-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp - --27909-- Reading suppressions file: /usr/lib/valgrind/default.supp vex amd64->IR: unhandled instruction bytes: 0x66 0x66 0x66 0x66 ==27909== valgrind: Unrecognised instruction at address 0x4016321. ==27909== Your program just tried to execute an instruction that Valgrind ==27909== did not recognise. There are two possible reasons for this. ==27909== 1. Your program has a bug and erroneously jumped to a non-code ==27909== location. If you are running Memcheck and you just saw a ==27909== warning about a bad jump, it's probably your program's fault. ==27909== 2. The instruction is legitimate but Valgrind doesn't handle it, ==27909== i.e. it's Valgrind's fault. If you think this is the case or ==27909== you are not sure, please let us know and we'll try to fix it. ==27909== Either way, Valgrind will now raise a SIGILL signal which will ==27909== probably kill your program. ==27909== ==27909== Process terminating with default action of signal 4 (SIGILL): dumping core ==27909== Illegal opcode at address 0x4016321 ==27909== at 0x4016321: memcpy (in /lib/ld-2.6.1.so) ==27909== by 0x400466E: dl_main (in /lib/ld-2.6.1.so) ==27909== by 0x4014457: _dl_sysdep_start (in /lib/ld-2.6.1.so) ==27909== by 0x400230A: _dl_start (in /lib/ld-2.6.1.so) ==27909== by 0x4000A67: (within /lib/ld-2.6.1.so) ==27909== ==27909== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 1 from 1) - --27909-- - --27909-- supp: 1 strlen-not-intercepted-early-enough-HACK-5 ==27909== malloc/free: in use at exit: 0 bytes in 0 blocks. ==27909== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==27909== ==27909== All heap blocks were freed -- no leaks are possible. - --27909-- memcheck: sanity checks: 0 cheap, 1 expensive - --27909-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use - --27909-- memcheck: auxmaps: 0 searches, 0 comparisons - --27909-- memcheck: SMs: n_issued = 7 (112k, 0M) - --27909-- memcheck: SMs: n_deissued = 0 (0k, 0M) - --27909-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M) - --27909-- memcheck: SMs: max_undefined = 0 (0k, 0M) - --27909-- memcheck: SMs: max_defined = 1 (16k, 0M) - --27909-- memcheck: SMs: max_non_DSM = 7 (112k, 0M) - --27909-- memcheck: max sec V bit nodes: 0 (0k, 0M) - --27909-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) - --27909-- memcheck: max shadow mem size: 4256k, 4M - --27909-- translate: fast SP updates identified: 182 ( 89.2%) - --27909-- translate: generic_known SP updates identified: 13 ( 6.3%) - --27909-- translate: generic_unknown SP updates identified: 9 ( 4.4%) - --27909-- tt/tc: 822 tt lookups requiring 821 probes - --27909-- tt/tc: 822 fast-cache updates, 2 flushes - --27909-- transtab: new 411 (9,008 -> 156,156; ratio 173:10) [0 scs] - --27909-- transtab: dumped 0 (0 -> ??) - --27909-- transtab: discarded 0 (0 -> ??) - --27909-- scheduler: 1,243 jumps (bb entries). - --27909-- scheduler: 0/417 major/minor sched events. - --27909-- sanity: 1 cheap, 1 expensive checks. - --27909-- exectx: 30,011 lists, 1 contexts (avg 0 per list) - --27909-- exectx: 1 searches, 0 full compares (0 per 1000) - --27909-- exectx: 0 cmp2, 0 cmp4, 0 cmpAll Illegal instruction [EMAIL PROTECTED]:/tmp/R-devel/bin$ ./R -d "valgrind --verbose - --db-attach=yes" --vanilla < crash.R ==28520== Memcheck, a memory error detector. ==28520== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==28520== Using LibVEX rev 1732, a library for dynamic binary translation. ==28520== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==28520== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework. ==28520== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==28520== - --28520-- Command line - --28520-- /tmp/R-devel/bin/exec/R - --28520-- --vanilla - --28520-- Startup, with flags: - --28520-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp - --28520-- --verbose - --28520-- --db-attach=yes - --28520-- Contents of /proc/version: - --28520-- Linux version 2.6.22.2-slh64-smp-1 ([EMAIL PROTECTED]) (gcc version 4.1.3 20070718 (prerelease) (Debian 4.1.2-14)) #1 SMP PREEMPT Fri Aug 10 17:19:56 CEST 2007 - --28520-- Arch and hwcaps: AMD64, amd64-sse2 - --28520-- Page sizes: currently 4096, max supported 4096 - --28520-- Valgrind library directory: /usr/lib/valgrind - --28520-- Reading syms from /tmp/R-devel/bin/exec/R (0x400000) - --28520-- Reading syms from /lib/ld-2.6.1.so (0x4000000) - --28520-- Reading debug info from /lib/ld-2.6.1.so... - --28520-- ... CRC mismatch (computed 635CD41D wanted 1F3B7BF3) - --28520-- Reading debug info from /usr/lib/debug/lib/ld-2.6.1.so... - --28520-- Reading syms from /usr/lib/valgrind/amd64-linux/memcheck (0x38000000) - --28520-- object doesn't have a dynamic symbol table - --28520-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp - --28520-- Reading suppressions file: /usr/lib/valgrind/default.supp vex amd64->IR: unhandled instruction bytes: 0x66 0x66 0x66 0x66 ==28520== valgrind: Unrecognised instruction at address 0x4016321. ==28520== Your program just tried to execute an instruction that Valgrind ==28520== did not recognise. There are two possible reasons for this. ==28520== 1. Your program has a bug and erroneously jumped to a non-code ==28520== location. If you are running Memcheck and you just saw a ==28520== warning about a bad jump, it's probably your program's fault. ==28520== 2. The instruction is legitimate but Valgrind doesn't handle it, ==28520== i.e. it's Valgrind's fault. If you think this is the case or ==28520== you are not sure, please let us know and we'll try to fix it. ==28520== Either way, Valgrind will now raise a SIGILL signal which will ==28520== probably kill your program. ==28520== ==28520== Process terminating with default action of signal 4 (SIGILL): dumping core ==28520== Illegal opcode at address 0x4016321 ==28520== at 0x4016321: memcpy (in /lib/ld-2.6.1.so) ==28520== by 0x4007CC2: _dl_init_paths (in /lib/ld-2.6.1.so) ==28520== by 0x4003329: dl_main (in /lib/ld-2.6.1.so) ==28520== by 0x4014457: _dl_sysdep_start (in /lib/ld-2.6.1.so) ==28520== by 0x400230A: _dl_start (in /lib/ld-2.6.1.so) ==28520== by 0x4000A67: (within /lib/ld-2.6.1.so) ==28520== ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- ==28520== ==28520== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==28520== malloc/free: in use at exit: 0 bytes in 0 blocks. ==28520== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==28520== ==28520== All heap blocks were freed -- no leaks are possible. - --28520-- memcheck: sanity checks: 0 cheap, 1 expensive - --28520-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use - --28520-- memcheck: auxmaps: 0 searches, 0 comparisons - --28520-- memcheck: SMs: n_issued = 9 (144k, 0M) - --28520-- memcheck: SMs: n_deissued = 0 (0k, 0M) - --28520-- memcheck: SMs: max_noaccess = 524287 (8388592k, 8191M) - --28520-- memcheck: SMs: max_undefined = 0 (0k, 0M) - --28520-- memcheck: SMs: max_defined = 46 (736k, 0M) - --28520-- memcheck: SMs: max_non_DSM = 9 (144k, 0M) - --28520-- memcheck: max sec V bit nodes: 0 (0k, 0M) - --28520-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0) - --28520-- memcheck: max shadow mem size: 4288k, 4M - --28520-- translate: fast SP updates identified: 111 ( 88.8%) - --28520-- translate: generic_known SP updates identified: 8 ( 6.4%) - --28520-- translate: generic_unknown SP updates identified: 6 ( 4.8%) - --28520-- tt/tc: 642 tt lookups requiring 641 probes - --28520-- tt/tc: 642 fast-cache updates, 2 flushes - --28520-- transtab: new 321 (6,884 -> 116,615; ratio 169:10) [0 scs] - --28520-- transtab: dumped 0 (0 -> ??) - --28520-- transtab: discarded 0 (0 -> ??) - --28520-- scheduler: 736 jumps (bb entries). - --28520-- scheduler: 0/327 major/minor sched events. - --28520-- sanity: 1 cheap, 1 expensive checks. - --28520-- exectx: 30,011 lists, 0 contexts (avg 0 per list) - --28520-- exectx: 0 searches, 0 full compares (0 per 1000) - --28520-- exectx: 0 cmp2, 0 cmp4, 0 cmpAll Illegal instruction -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGywYGzQDSXIcN85kRApFpAJ4srb/fCvvTWTyzOVeHLm2NPt5HNACgh/+b 2ukEgvUz2p4+X5yg0UulKXQ= =rQI+ -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]