[Bioc-devel] Help for Error "Maximal Number of DLLs reached..."

Martin Morgan martin.morgan at roswellpark.org
Wed Mar 21 15:32:13 CET 2018



On 03/21/2018 10:14 AM, Henrik Bengtsson wrote:
> A few quick comments:
> 
> * I don't think the limit was hardened in R 3.4.0; maybe you started to
> experience it sound then because more dependent packages started to rely on
> more DLLs?
> 
> * The limit is OS/platform specific so it's not that R core is unwilling to
> fix this - I think they havejust tried to find a safe limit that work
> everywhere. Having said this...
> 
> * It'll be less restrictive by default in R 3.5.0: from it's NEWS "The
> maximum number of DLLs that can be loaded into R e.g. via dyn.load() has
> been increased up to 614 when the OS limit on the number of open files
> allows"
> 
> * R.utils::gcDLLs() will attempt to unregister possibly stray DLLs
> remaining after unloading packages. So unloading packages and gcDLLs() may
> provide you with a workaround until R 3.5.0 is in place (possibly also even
> after).
> 
> See https://github.com/HenrikBengtsson/Wishlist-for-R/issues/29 for
> "random" notes and references to this problem.
> 
> 
> On Wed, Mar 21, 2018, 04:10 Yuan Tian <tianyuan1991hit at gmail.com> wrote:
> 
>> Hello Guys:
>>
>> I encountered an error like "maximal number of dlls reached...". I am
>> maintaining ChAMP package now, which integrated many other packages in my
>> research field. I have not updated this package in past 2 months but
>> suddenly this error happens.
>>
>> Currently, I think I know the reason is since R 3.4.X, numbers of DLLs in
>> default R session was set 100. I have tested that using a newly started R
>> 3.4.4 to install and load ChAMP package, *it works smoothly*, after
>> loading, I checked DLL loaded with function getLoadedDLLs(), then I see
>> ChAMP used 95 Dlls. I know it's a lot, but some of them are loaded by
>> ChAMP's relying packages but itself. *However, ChAMP cannot pass
>> Bioconductor check, thus I suspect Bioconductor checking system does NOT
>> start a new R session for each package right? Which means it's not 100 DLLs
>> allocated for each package?*

ChAMP is passing BiocCheck in release, where R is 3.4.x ?

http://bioconductor.org/checkResults/release/bioc-LATEST/ChAMP/malbec1-checksrc.html

Each package is built and tested in a separate process. Vignettes are 
actually built in a single process (by R, not Bioconductor) so multiple 
vignettes could load a higher number of DLLs.

>>
>> Currently, I have told my users to modify R environment to allow their R
>> session with more DLLs. It works but only on users computer, not
>> Bioconductor checking system. Thus I think I have to reduce dlls used by
>> current package right? Like removing some relying packages or function. *My
>> another question is how many DLLs is allowed by Bioconductor check? I think
>> it's less than 100. But I don't know I should cut it into 80 or 60 or even
>> 50 dlls used.*
>>
>> It's really disappointing that I need to modify quite a lot of code, and
>> even could hurt some key functionality of the package. Thus here I am
>> seeking your help and suggestions here.

Frankly, I think a package with so many dependencies cannot be 
maintained -- a change in any one of those packages could break your 
package (e.g., by changing their own dependencies to include additional 
DLLs!), and it must be virtually impossible to get sufficient test 
coverage to be confident that these problems will be detected before the 
package is made available to the user. It is time to consider a more 
modular design focusing on essential features.

Martin

>>
>> Best
>> Yuan Tian
>>
>>          [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
> 


This email message may contain legally privileged and/or...{{dropped:2}}



More information about the Bioc-devel mailing list