From marius.hofert at uwaterloo.ca  Thu May  5 03:00:29 2016
From: marius.hofert at uwaterloo.ca (Marius Hofert)
Date: Wed, 4 May 2016 21:00:29 -0400
Subject: [Rd] R process killed when allocating too large matrix (Mac OS
	X)
In-Reply-To: <9b3da5c7758b455baad7209384abe7a7@CONNHUB4.connect.uwaterloo.ca>
References: <CAM3-KjYqc5CvDt4yKkOEPw--1Fq-c8O8x6UfFir5x==-UwFYvw@mail.gmail.com>
	<0e0160ec793649dda463b43d7e7d5c37@CONNHUB1.connect.uwaterloo.ca>
	<CAM3-Kja40deG=04U+PDNjLD=sHzQRiz_umia+wBEP77YyW5qQA@mail.gmail.com>
	<9b3da5c7758b455baad7209384abe7a7@CONNHUB4.connect.uwaterloo.ca>
Message-ID: <CAM3-KjZ13TOz7x6DC+F1=9WsJFHbz4Ay0gf-fhQOv84oSRiE=w@mail.gmail.com>

Hi Simon,

thanks for your quick reply.

1) ... so you can reproduce this?
2) Do you know a way how this can be 'foreseen'? We allocate larger
matrices in the copula package depending on the user's input
dimension. It would be good to tell her/him "Your dimension is quite
large. Be aware of killers in your neighborhood"... before the killer
attacks.

Thanks & cheers,
Marius


On Wed, May 4, 2016 at 8:54 PM, Simon Urbanek
<simon.urbanek at r-project.org> wrote:
>
> On May 4, 2016, at 6:14 PM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote:
>
>>> Can you elaborate on "leads to R being killed"? You should tell to the killer not to do it again :).
>>
>> Hi Simon!
>>
>> Sure, but who do you tell it if you don't know the killer?
>> This is all the killer left me with, the 'crime scene' if you like :-)
>>
>>> m <- matrix(0, 90000, 100000)
>> Killed: 9
>>
>> My colleague Wayne Oldford also tried it on his Mac machine and
>> apparently the killer went further down the hallway to his office
>> now... so scary. Here is Wayne's sessionInfo():
>>
>
> Yes, indeed, scary - since it means someone is killing R which means there is not much R itself can do about it. In fact from the syslog I see
>
> May  4 20:48:11 ginaz kernel[0]: low swap: killing pid 56256 (R)
>
> so it's the kernel's own defense mechanism. The bad thing is that R cannot do anything about it - the kernel just decides to snipe processes it thinks are dangerous to the health of the system, and it does so without a warning.
>
> Cheers,
> Simon
>



[Rd] R process killed when allocating too large matrix (Mac OS X)
Marius Hofert