Discussion:
[R-SIG-Mac] *** caught bus error *** address 0x114382544, cause 'non-existent physical address'
Richard R. Liu
2009-11-18 19:39:26 UTC
Permalink
I am experiencing a curious error running R64 (2009-11-18 r50482) on a
MacBook Pro 17" Unibody early 2009 with 8GB RAM. In the console
excerpt below sentences.1000.clustered is a dataframe consisting of
two vectors, sent and cluster. sent is a vector of 1000 sentences
chosen at random from over 3 million, and cluster is a vector of
integers denoting to which of 5 clusters the sentence belongs. For
each cluster I want to display the sentences that belong to it as
follows:


R version 2.10.0 Patched (2009-11-18 r50482)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]

[Workspace restored from /Users/richard/.RData]
library(filehash)
filehash: Simple key-value database (2.0-1 2008-12-19)
db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/
DB_TXT", type = "RDS")
dbLoad(db)
sent.clust <- sentences.1000.clustered
i.clust.2 <- which(sent.clust$cluster == 2)
attributes(sent.clust)
$names
[1] "sent" "cluster"

$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29
...
[987] 987 988 989 990 991 992 993 994 995 996 997 998
999 1000

$class
[1] "data.frame"
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
[1] 232 419 787 1010 1926 357 2865 657 560 213
2175 2363 1300 359 331 965 581 732 398 245 1650
25893 1289 510
[25] 1714 524 747 2378 465 651 2253 215 460 253
2475 554 1130 529 261 1413 418 2168 1569 1538 301
2506 1163 3036
[49] 1445 199 1231 370 1307 371 379 232 1297 500
409 481 2187 314 730 1634 971 860 362 506 1606
394 145 480
[73] 1582 1471 1269 308 1113 444 990 298 1644 445
357 1204 322 638 2182 805 1545 368 1461 1347 649 399
1094 1624
[97] 14605 1637 269 503 502 2145 1398 481 122 2248
sent.clust$sent[i.clust.2]
[1] "(patient continuing ...)
______________________________________________________________________________________________________________________________________
Investigator text for Adverse Events encoded using MedDRA version
11.0. "
[2]
*** caught bus error ***
address 0x114382544, cause 'non-existent physical address'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:

The point of
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
is to try to isolate the problem. Indeed, the more compact sent.clust
$sent[which(sent.clust$cluster == 2)] work when I start R in 32-bit
mode. In 64-bit mode, attempting to display the sentences in cluster
5 also fails, whereas for clusters 1, 3, 4 it succeeds. In 32-bit
mode, I have experienced no such problem.

Does anybody have any ideas about what is wrong?

Regards,
Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20091118/840d6930/attachment.bin>
Simon Urbanek
2009-11-18 20:07:56 UTC
Permalink
Richard,

in order to track this down, please start R64, type

Sys.getpid()

and note down the number. Then in a separate window open Terminal and
type

gdb

Then on the gdb console (it will just say "(gdb)") type

attach n

where n is the number from above. It will do something for a while and
when it comes back in the console, type

c

Then do your work in R until you get a crash. Once you do, you will
see something happening in the gdb console. Then type

bt

and copy/paste everything that gdb printed since you typed "c" and
send it to me.

Thanks,
Simon

-----
Sys.getpid()
[1] 19381

in Terminal:

ginaz:~$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40
UTC 2008)
[...]
This GDB was configured as "i386-apple-darwin".
(gdb) attach 19381
Attaching to process 19381.
Reading symbols for shared libraries . done
[...]
0x9428a6fa in select$DARWIN_EXTSN ()
(gdb) c
Continuing.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000003
0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../R-2.10-
branch/src/main/memory.c:2809
2809 void (SET_SYMVALUE)(SEXP x, SEXP v) { CHECK_OLD_TO_NEW(x, v);
SYMVALUE(x) = v; }
(gdb) bt
#0 0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
#1 0x0041068e in Rf_ReplIteration (rho=0x1023c38, savestack=0,
browselevel=0, state=0xbfffe53c) at ../../../../R-2.10-branch/src/main/
main.c:263
#2 0x00410a40 in R_ReplConsole (rho=0x1023c38, savestack=0,
browselevel=0) at ../../../../R-2.10-branch/src/main/main.c:311
#3 0x0041129b in run_Rmainloop () at ../../../../R-2.10-branch/src/
main/main.c:964
#4 0x00001ff0 in main (ac=1, av=0xbffff5c8) at ../../../../R-2.10-
branch/src/main/Rmain.c:33
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from process 19381 thread 0x613.
I am experiencing a curious error running R64 (2009-11-18 r50482) on
a MacBook Pro 17" Unibody early 2009 with 8GB RAM. In the console
excerpt below sentences.1000.clustered is a dataframe consisting of
two vectors, sent and cluster. sent is a vector of 1000 sentences
chosen at random from over 3 million, and cluster is a vector of
integers denoting to which of 5 clusters the sentence belongs. For
each cluster I want to display the sentences that belong to it as
R version 2.10.0 Patched (2009-11-18 r50482)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]
[Workspace restored from /Users/richard/.RData]
library(filehash)
filehash: Simple key-value database (2.0-1 2008-12-19)
db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/
DB_TXT", type = "RDS")
dbLoad(db)
sent.clust <- sentences.1000.clustered
i.clust.2 <- which(sent.clust$cluster == 2)
attributes(sent.clust)
$names
[1] "sent" "cluster"
$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25
26 27 28 29
...
[987] 987 988 989 990 991 992 993 994 995 996 997 998
999 1000
$class
[1] "data.frame"
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
[1] 232 419 787 1010 1926 357 2865 657 560 213
2175 2363 1300 359 331 965 581 732 398 245 1650
25893 1289 510
[25] 1714 524 747 2378 465 651 2253 215 460 253
2475 554 1130 529 261 1413 418 2168 1569 1538 301
2506 1163 3036
[49] 1445 199 1231 370 1307 371 379 232 1297 500
409 481 2187 314 730 1634 971 860 362 506 1606
394 145 480
[73] 1582 1471 1269 308 1113 444 990 298 1644 445
357 1204 322 638 2182 805 1545 368 1461 1347 649
399 1094 1624
[97] 14605 1637 269 503 502 2145 1398 481 122 2248
sent.clust$sent[i.clust.2]
[1] "(patient continuing ...)
______________________________________________________________________________________________________________________________________
Investigator text for Adverse Events encoded using MedDRA version
11.0. "
[2]
*** caught bus error ***
address 0x114382544, cause 'non-existent physical address'
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
The point of
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
is to try to isolate the problem. Indeed, the more compact
sent.clust$sent[which(sent.clust$cluster == 2)] work when I start R
in 32-bit mode. In 64-bit mode, attempting to display the sentences
in cluster 5 also fails, whereas for clusters 1, 3, 4 it succeeds.
In 32-bit mode, I have experienced no such problem.
Does anybody have any ideas about what is wrong?
Regards,
Richard
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Richard R. Liu
2009-11-30 16:01:44 UTC
Permalink
This problem disappeared in patched releases soon after I replied to
Simon that I was unable to obtain the information that he required
from the debugger. After checking a few releases I quite monitoring
the problem. I assumed that it had been fixed with comment. However,
today, the patched release dated 2009-11-29 has the problem once
again. I have tried going back to the patched releases of 2009-11-27
and 2009-11-22, the only ones for which I have kept installers here at
work. Both have the problem. In neither can I obtain the debugging
information that Simon requested when the problem initially arose.
Can somebody tell me the current status of the problem, and when it
might be fixed (again)? It occurs at an extremely inconvenient time
in my project.

Thanks,

Richard R. Liu
Dittingerstr. 33
CH-4053 Basel
Switzerland

Tel.: +41 61 331 10 47
Mobil: +41 79 708 67 66
Email: richard.liu at pueo-owl.ch
Post by Simon Urbanek
Richard,
in order to track this down, please start R64, type
Sys.getpid()
and note down the number. Then in a separate window open Terminal
and type
gdb
Then on the gdb console (it will just say "(gdb)") type
attach n
where n is the number from above. It will do something for a while
and when it comes back in the console, type
c
Then do your work in R until you get a crash. Once you do, you will
see something happening in the gdb console. Then type
bt
and copy/paste everything that gdb printed since you typed "c" and
send it to me.
Thanks,
Simon
-----
Post by Simon Urbanek
Sys.getpid()
[1] 19381
ginaz:~$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40
UTC 2008)
[...]
This GDB was configured as "i386-apple-darwin".
(gdb) attach 19381
Attaching to process 19381.
Reading symbols for shared libraries . done
[...]
0x9428a6fa in select$DARWIN_EXTSN ()
(gdb) c
Continuing.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000003
0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
2809 void (SET_SYMVALUE)(SEXP x, SEXP v) { CHECK_OLD_TO_NEW(x, v);
SYMVALUE(x) = v; }
(gdb) bt
#0 0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
#1 0x0041068e in Rf_ReplIteration (rho=0x1023c38, savestack=0,
browselevel=0, state=0xbfffe53c) at ../../../../R-2.10-branch/src/
main/main.c:263
#2 0x00410a40 in R_ReplConsole (rho=0x1023c38, savestack=0,
browselevel=0) at ../../../../R-2.10-branch/src/main/main.c:311
#3 0x0041129b in run_Rmainloop () at ../../../../R-2.10-branch/src/
main/main.c:964
#4 0x00001ff0 in main (ac=1, av=0xbffff5c8) at ../../../../R-2.10-
branch/src/main/Rmain.c:33
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from process 19381 thread 0x613.
Post by Simon Urbanek
I am experiencing a curious error running R64 (2009-11-18 r50482)
on a MacBook Pro 17" Unibody early 2009 with 8GB RAM. In the
console excerpt below sentences.1000.clustered is a dataframe
consisting of two vectors, sent and cluster. sent is a vector of
1000 sentences chosen at random from over 3 million, and cluster is
a vector of integers denoting to which of 5 clusters the sentence
belongs. For each cluster I want to display the sentences that
R version 2.10.0 Patched (2009-11-18 r50482)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]
[Workspace restored from /Users/richard/.RData]
library(filehash)
filehash: Simple key-value database (2.0-1 2008-12-19)
db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/
DB_TXT", type = "RDS")
dbLoad(db)
sent.clust <- sentences.1000.clustered
i.clust.2 <- which(sent.clust$cluster == 2)
attributes(sent.clust)
$names
[1] "sent" "cluster"
$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25
26 27 28 29
...
[987] 987 988 989 990 991 992 993 994 995 996 997 998
999 1000
$class
[1] "data.frame"
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
[1] 232 419 787 1010 1926 357 2865 657 560 213
2175 2363 1300 359 331 965 581 732 398 245 1650
25893 1289 510
[25] 1714 524 747 2378 465 651 2253 215 460 253
2475 554 1130 529 261 1413 418 2168 1569 1538 301
2506 1163 3036
[49] 1445 199 1231 370 1307 371 379 232 1297 500
409 481 2187 314 730 1634 971 860 362 506 1606
394 145 480
[73] 1582 1471 1269 308 1113 444 990 298 1644 445
357 1204 322 638 2182 805 1545 368 1461 1347 649
399 1094 1624
[97] 14605 1637 269 503 502 2145 1398 481 122 2248
sent.clust$sent[i.clust.2]
[1] "(patient continuing ...)
______________________________________________________________________________________________________________________________________
Investigator text for Adverse Events encoded using MedDRA version
11.0. "
[2]
*** caught bus error ***
address 0x114382544, cause 'non-existent physical address'
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
The point of
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
is to try to isolate the problem. Indeed, the more compact
sent.clust$sent[which(sent.clust$cluster == 2)] work when I start R
in 32-bit mode. In 64-bit mode, attempting to display the
sentences in cluster 5 also fails, whereas for clusters 1, 3, 4 it
succeeds. In 32-bit mode, I have experienced no such problem.
Does anybody have any ideas about what is wrong?
Regards,
Richard
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20091130/f259611b/attachment.bin>
Simon Urbanek
2009-11-30 16:18:03 UTC
Permalink
Richard,

I didn't touch anything, but then you didn't supply a reproducible
example so we can't do much about it (the trace is unfortunately
bogus). My next step woul dbe to try it in valgrind if I could
reproduce it ...

Cheers,
Simon
Post by Richard R. Liu
This problem disappeared in patched releases soon after I replied to
Simon that I was unable to obtain the information that he required
from the debugger. After checking a few releases I quite monitoring
the problem. I assumed that it had been fixed with comment.
However, today, the patched release dated 2009-11-29 has the problem
once again. I have tried going back to the patched releases of
2009-11-27 and 2009-11-22, the only ones for which I have kept
installers here at work. Both have the problem. In neither can I
obtain the debugging information that Simon requested when the
problem initially arose. Can somebody tell me the current status of
the problem, and when it might be fixed (again)? It occurs at an
extremely inconvenient time in my project.
Thanks,
Richard R. Liu
Dittingerstr. 33
CH-4053 Basel
Switzerland
Tel.: +41 61 331 10 47
Mobil: +41 79 708 67 66
Email: richard.liu at pueo-owl.ch
Post by Simon Urbanek
Richard,
in order to track this down, please start R64, type
Sys.getpid()
and note down the number. Then in a separate window open Terminal
and type
gdb
Then on the gdb console (it will just say "(gdb)") type
attach n
where n is the number from above. It will do something for a while
and when it comes back in the console, type
c
Then do your work in R until you get a crash. Once you do, you will
see something happening in the gdb console. Then type
bt
and copy/paste everything that gdb printed since you typed "c" and
send it to me.
Thanks,
Simon
-----
Post by Simon Urbanek
Sys.getpid()
[1] 19381
ginaz:~$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26
08:14:40 UTC 2008)
[...]
This GDB was configured as "i386-apple-darwin".
(gdb) attach 19381
Attaching to process 19381.
Reading symbols for shared libraries . done
[...]
0x9428a6fa in select$DARWIN_EXTSN ()
(gdb) c
Continuing.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000003
0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
2809 void (SET_SYMVALUE)(SEXP x, SEXP v) { CHECK_OLD_TO_NEW(x, v);
SYMVALUE(x) = v; }
(gdb) bt
#0 0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
#1 0x0041068e in Rf_ReplIteration (rho=0x1023c38, savestack=0,
browselevel=0, state=0xbfffe53c) at ../../../../R-2.10-branch/src/
main/main.c:263
#2 0x00410a40 in R_ReplConsole (rho=0x1023c38, savestack=0,
browselevel=0) at ../../../../R-2.10-branch/src/main/main.c:311
#3 0x0041129b in run_Rmainloop () at ../../../../R-2.10-branch/src/
main/main.c:964
#4 0x00001ff0 in main (ac=1, av=0xbffff5c8) at ../../../../R-2.10-
branch/src/main/Rmain.c:33
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from process 19381 thread 0x613.
Post by Simon Urbanek
I am experiencing a curious error running R64 (2009-11-18 r50482)
on a MacBook Pro 17" Unibody early 2009 with 8GB RAM. In the
console excerpt below sentences.1000.clustered is a dataframe
consisting of two vectors, sent and cluster. sent is a vector of
1000 sentences chosen at random from over 3 million, and cluster
is a vector of integers denoting to which of 5 clusters the
sentence belongs. For each cluster I want to display the
R version 2.10.0 Patched (2009-11-18 r50482)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]
[Workspace restored from /Users/richard/.RData]
library(filehash)
filehash: Simple key-value database (2.0-1 2008-12-19)
db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/
DB_TXT", type = "RDS")
dbLoad(db)
sent.clust <- sentences.1000.clustered
i.clust.2 <- which(sent.clust$cluster == 2)
attributes(sent.clust)
$names
[1] "sent" "cluster"
$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25
26 27 28 29
...
[987] 987 988 989 990 991 992 993 994 995 996 997 998
999 1000
$class
[1] "data.frame"
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
[1] 232 419 787 1010 1926 357 2865 657 560 213
2175 2363 1300 359 331 965 581 732 398 245 1650
25893 1289 510
[25] 1714 524 747 2378 465 651 2253 215 460 253
2475 554 1130 529 261 1413 418 2168 1569 1538 301
2506 1163 3036
[49] 1445 199 1231 370 1307 371 379 232 1297 500
409 481 2187 314 730 1634 971 860 362 506 1606
394 145 480
[73] 1582 1471 1269 308 1113 444 990 298 1644 445
357 1204 322 638 2182 805 1545 368 1461 1347 649
399 1094 1624
[97] 14605 1637 269 503 502 2145 1398 481 122 2248
sent.clust$sent[i.clust.2]
[1] "(patient continuing ...)
______________________________________________________________________________________________________________________________________
Investigator text for Adverse Events encoded using MedDRA version
11.0. "
[2]
*** caught bus error ***
address 0x114382544, cause 'non-existent physical address'
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
The point of
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
is to try to isolate the problem. Indeed, the more compact
sent.clust$sent[which(sent.clust$cluster == 2)] work when I start
R in 32-bit mode. In 64-bit mode, attempting to display the
sentences in cluster 5 also fails, whereas for clusters 1, 3, 4 it
succeeds. In 32-bit mode, I have experienced no such problem.
Does anybody have any ideas about what is wrong?
Regards,
Richard
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Richard R. Liu
2009-11-30 20:33:25 UTC
Permalink
Hi Simon,

I think I've found the problem: filehash needs to be rebuilt.

The data that I've been using the problematic expressions on resides
in a filehash database. Having reduced the problem to one particular
data frame of two columns and 1000 rows, I just copied it to its own
database, zipped it, and attached it to an email containing
instructions on how to reproduce the problem, when I decided I should
test whether you could indeed reproduce the problem by following my
instructions. And, of course, everything worked just as I had not
expected, i.e., there was no bus error.

So I copied the data frame from the small database that I was going to
send to you to the original, and there the problem occurred. I could
not reproduce the problem, however, if I copied the original data
frame to my workspace and forced R to actually instantiate the copy
before running the problematic script. So the problem seemed to have
something to do with filehash and the size of the database. I also
recalled that I had no problem with the script if I ran R in 32-bit
mode. I therefore tried reinstalling the filehash binary, but that
did not solve the problem. Then, I installed it from the source.
That evidently is what was required.

So I guess it only needs a rebuild so that other folks do not
experience the same problem.

Regards,
Richard

Richard R. Liu
Dittingerstr. 33
CH-4053 Basel
Switzerland

Tel.: +41 61 331 10 47
Mobil: +41 79 708 67 66
Email: richard.liu at pueo-owl.ch
Post by Simon Urbanek
Richard,
I didn't touch anything, but then you didn't supply a reproducible
example so we can't do much about it (the trace is unfortunately
bogus). My next step woul dbe to try it in valgrind if I could
reproduce it ...
Cheers,
Simon
Post by Richard R. Liu
This problem disappeared in patched releases soon after I replied
to Simon that I was unable to obtain the information that he
required from the debugger. After checking a few releases I quite
monitoring the problem. I assumed that it had been fixed with
comment. However, today, the patched release dated 2009-11-29 has
the problem once again. I have tried going back to the patched
releases of 2009-11-27 and 2009-11-22, the only ones for which I
have kept installers here at work. Both have the problem. In
neither can I obtain the debugging information that Simon requested
when the problem initially arose. Can somebody tell me the current
status of the problem, and when it might be fixed (again)? It
occurs at an extremely inconvenient time in my project.
Thanks,
Richard R. Liu
Dittingerstr. 33
CH-4053 Basel
Switzerland
Tel.: +41 61 331 10 47
Mobil: +41 79 708 67 66
Email: richard.liu at pueo-owl.ch
Post by Simon Urbanek
Richard,
in order to track this down, please start R64, type
Sys.getpid()
and note down the number. Then in a separate window open Terminal
and type
gdb
Then on the gdb console (it will just say "(gdb)") type
attach n
where n is the number from above. It will do something for a while
and when it comes back in the console, type
c
Then do your work in R until you get a crash. Once you do, you
will see something happening in the gdb console. Then type
bt
and copy/paste everything that gdb printed since you typed "c" and
send it to me.
Thanks,
Simon
-----
Post by Simon Urbanek
Sys.getpid()
[1] 19381
ginaz:~$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26
08:14:40 UTC 2008)
[...]
This GDB was configured as "i386-apple-darwin".
(gdb) attach 19381
Attaching to process 19381.
Reading symbols for shared libraries . done
[...]
0x9428a6fa in select$DARWIN_EXTSN ()
(gdb) c
Continuing.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000003
0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
2809 void (SET_SYMVALUE)(SEXP x, SEXP v) { CHECK_OLD_TO_NEW(x, v);
SYMVALUE(x) = v; }
(gdb) bt
#0 0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../
R-2.10-branch/src/main/memory.c:2809
#1 0x0041068e in Rf_ReplIteration (rho=0x1023c38, savestack=0,
browselevel=0, state=0xbfffe53c) at ../../../../R-2.10-branch/src/
main/main.c:263
#2 0x00410a40 in R_ReplConsole (rho=0x1023c38, savestack=0,
browselevel=0) at ../../../../R-2.10-branch/src/main/main.c:311
#3 0x0041129b in run_Rmainloop () at ../../../../R-2.10-branch/
src/main/main.c:964
#4 0x00001ff0 in main (ac=1, av=0xbffff5c8) at ../../../../R-2.10-
branch/src/main/Rmain.c:33
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from process 19381 thread 0x613.
Post by Simon Urbanek
I am experiencing a curious error running R64 (2009-11-18 r50482)
on a MacBook Pro 17" Unibody early 2009 with 8GB RAM. In the
console excerpt below sentences.1000.clustered is a dataframe
consisting of two vectors, sent and cluster. sent is a vector of
1000 sentences chosen at random from over 3 million, and cluster
is a vector of integers denoting to which of 5 clusters the
sentence belongs. For each cluster I want to display the
R version 2.10.0 Patched (2009-11-18 r50482)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]
[Workspace restored from /Users/richard/.RData]
library(filehash)
filehash: Simple key-value database (2.0-1 2008-12-19)
db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/
DB_TXT", type = "RDS")
dbLoad(db)
sent.clust <- sentences.1000.clustered
i.clust.2 <- which(sent.clust$cluster == 2)
attributes(sent.clust)
$names
[1] "sent" "cluster"
$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24 25
26 27 28 29
...
[987] 987 988 989 990 991 992 993 994 995 996 997
998 999 1000
$class
[1] "data.frame"
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
[1] 232 419 787 1010 1926 357 2865 657 560 213
2175 2363 1300 359 331 965 581 732 398 245 1650
25893 1289 510
[25] 1714 524 747 2378 465 651 2253 215 460 253
2475 554 1130 529 261 1413 418 2168 1569 1538 301
2506 1163 3036
[49] 1445 199 1231 370 1307 371 379 232 1297
500 409 481 2187 314 730 1634 971 860 362 506
1606 394 145 480
[73] 1582 1471 1269 308 1113 444 990 298 1644
445 357 1204 322 638 2182 805 1545 368 1461 1347
649 399 1094 1624
[97] 14605 1637 269 503 502 2145 1398 481 122 2248
sent.clust$sent[i.clust.2]
[1] "(patient continuing ...)
______________________________________________________________________________________________________________________________________
Investigator text for Adverse Events encoded using MedDRA
version 11.0. "
[2]
*** caught bus error ***
address 0x114382544, cause 'non-existent physical address'
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
The point of
i.clust.2 <- which(sent.clust$cluster == 2)
nchar(sent.clust$sent[i.clust.2])
is to try to isolate the problem. Indeed, the more compact
sent.clust$sent[which(sent.clust$cluster == 2)] work when I start
R in 32-bit mode. In 64-bit mode, attempting to display the
sentences in cluster 5 also fails, whereas for clusters 1, 3, 4
it succeeds. In 32-bit mode, I have experienced no such problem.
Does anybody have any ideas about what is wrong?
Regards,
Richard
_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2429 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20091130/9b01647b/attachment-0001.bin>
Loading...