[Bioc-devel] EXTERNAL: "invalid connection" when building vignette - Windows only

Ramos Perez, Marcel M@rce|@R@mo@Perez @end|ng |rom Ro@we||P@rk@org
Mon Mar 18 16:28:02 CET 2024


Hi Matteo,

You can get the traceback by running

     rmarkdown::render("vignettes/Moonlight2R.Rmd")


Best regards,

Marcel


On 3/18/24 4:54 AM, Matteo Tiberti wrote:
> Hi Ramos,
> 
> Thank you very much – this is really informative. Can I ask you how you 
> got the tracback? I’m not really used at debugging this sort of issues.
> 
> I can see that the EpiMix::EpiMix function we use does use foreach 
> (foreach::makeCluster and %dopar%). I have no experience with foreach, 
> but I had a dig, and I can see that this function cleans up the parallel 
> environment with stopCluster only before just one of the several returns 
> it has. So it is possible that the environment isn’t cleaned up between 
> consequent function calls. We will investigate.
> 
> Of course if anyone with more foreach experience wants to pinch in, they 
> are very welcome
> 
> Thank you again
> 
> 
> Matteo Tiberti
> 
> *Danish Cancer Institute*
> Strandboulevarden 49
> DK-2100 Copenhagen
> *Telephone*: +45 35 25 73 07
> /– a part of the Danish Cancer Society/
> 
> An image showing the Danish Cancer Society's name and logo called the 
> bow in red font. Displayed in red 
> <https://secure-web.cisco.com/1mfiInM_8FuRpvEm0gDajEfBVId-1gb0jBC54adABQhxJwn4DC16w_saorhZ0op1x9Gu4k4GPR9IQTf9p26MG2Wd92tdHQqJtfezA9CY9oPCaz2dO1QErJfGGkn_0mjb5QRcUq-L9Edu05cqMzcSW-ZQCJ9ukAoVGJTJ8sl8VkgwsrJ3HDh7eI3w8kE-hDdL5sfwTjJ_Go7Z2hAdO8EgqeHmXmhta6PpE9eMC4RQQt6iclvvfCT8YfY2ck8S0qEkz77oeWn2lkQ1hjPXYVfMVcKIAbcHjWtrR4I7i7OcApr6NbCAb_CV7DWa7t8lBEGcU/https%3A%2F%2Fwww.cancer.dk%2F%3Futm_source%3Demail%26utm_medium%3Dmedarbejderemail%26utm_campaign%3Dmedarbejderemail%26utm_content%3Dcancerdk>
> 
> www.cancer.dk 
> <https://secure-web.cisco.com/1ZblM0-_XMdr11XRFAXhP2hHwgRiOb90R0k_Ar4snJUfZ7kfYtk0Knh-cuIDFqD8E8fZuAfCg0Foou8GQUnFRLIBri7rsSlaxFzDMc8DWIvoxqj2wwkDqIpl6ECK6JNFqJn0DPiO3pdbP5GGor4MZnSwwmAtEbzHsbP_v7BNk7Gq0wc0BTo6ocdnSvHNPdnPNhNHScxoLxSu9DXm80amt5CLu-dNc-VVo9QtCQamGLgLqjlXKsavt417TmftahPca3F6iwwB648siRt1z2N4ZnQm9ddda4zecXEw8YRGHyOE1Tjp07wnhhpXUahhMh_p8/https%3A%2F%2Fwww.cancer.dk%2Finternational%2F> | Our privacy policy <https://secure-web.cisco.com/1sueUdsK2Nz46WceAI1X6J67uFFM4_-u2jsnjTzB4mkwMvdEsSqAd2dQ2-C_PTyi1dXgO7I1PdRSWM1TSOkP8ieQ2xCOa036oa-ucQTY65o6nSR__aVhVG5mI0HkLQOX7ihiKsmVFswSw_ghYaSi8hBnVRfafVS6G7TxPRtg4knMhWV7DDnO7bNGhPjPXxAqMVoJJkH0URd9lH2NIGtfNC8LmoeJ1htzSq3Tn_z2gmPSV1UtK_2fAe3Z_ixAeq1eYzWU7nfZ-5_l23cQyeOpSY0B9R6DH_eKA2v8ziUsBhVIrBLPYvODWunlR3ZXqIcvN/https%3A%2F%2Fwww.cancer.dk%2Fom-os%2Fprivatlivspolitik%2F>
> 
> *From: *Ramos Perez, Marcel <Marcel.RamosPerez using RoswellPark.org>
> *Date: *Friday, 15 March 2024 at 22.44
> *To: *bioc-devel using r-project.org <bioc-devel using r-project.org>
> *Cc: *Matteo Tiberti <tiberti using cancer.dk>
> *Subject: *Re: EXTERNAL: [Bioc-devel] "invalid connection" when building 
> vignette - Windows only
> 
> Hi Matteo,
> 
> I was also able to reproduce on Bioc 3.18 on Windows with a traceback 
> (see below).
> 
> It may be that there are symbol clashes between parallel runs in the
> `foreach:::.foreachGlobals` environment as described in
> https://stackoverflow.com/a/67497500 
> <https://secure-web.cisco.com/1YD8SZqXAX191pf8cgoBfpAmG1_h-Hr7uAOYm9GgC6_JozBpssa_-QrhbhIRLxi2NhF5HBbCJbg4ySbVEqr8NUsdQ9psLWqnIJY0Fdux6_jooJSOSDFG2BlOoovrtKD8g6ep2RQUlWTETFAaZjH1usKFjEmxGDLJ6M87WHofw9OsELBCRJNPfg1Jt2B8S2K6uBgkbsutqEfffAA19EaJn2MruFxo8rCnddjHiyJuF73_nKKEIxPdTqffRtjYIfr2SJ-FtT_C_mvPVdOTnggJbZGhvPjau9r8RIYBja69qiiBoXBK1AyC_i40zCDVUfqqW/https%3A%2F%2Fstackoverflow.com%2Fa%2F67497500>
> 
> Clearing the symbols in that environment alleviates the problem temporarily
> until running the chunk in line 1124 where the same error occurs.
> 
> Someone with more experience using `foreach` and socket clusters may be 
> able to help.
> 
> Note that the code should be running on either one or two cores by default.
> 
> Best regards,
> 
> Marcel
> 
> ```
> 
> processing file: Moonlight2R.Rmd
>    |.......................                            |  45% 
> [unnamed-chunk-20]
> Quitting from lines 727-746 [unnamed-chunk-20] (Moonlight2R.Rmd)
> 
> Error in `summary.connection()`:
> ! invalid connection
> Backtrace:
>    1. Moonlight2R::GMA(...)
>    2. EpiMix::EpiMix(...)
>         at Moonlight2R/R/GMA.R:117:3
>    3. EpiMix:::MethylMix_MixtureModel(...)
>    4. ... %dopar% ...
>       ...
>    7. parallel:::sendCall(cl[[i]], fun, list(...))
>    8. parallel:::postNode(...)
>   10. parallel:::sendData.SOCKnode(...)
>   11. base::serialize(data, node$con)
>   13. base::summary.connection(connection)
> Execution halted
> 
> ```
> 
> On 3/15/24 6:05 AM, Matteo Tiberti via Bioc-devel wrote:
> 
>     Dear developers,
> 
>     we've been getting a build fail for our Moonlight2R package on
>     Windows only, during vignette build in CHECK, which just prints out
>     an "invalid connection" error:
> 
>     Quitting from lines 727-746 [unnamed-chunk-20] (Moonlight2R.Rmd)
>     Error: processing vignette 'Moonlight2R.Rmd' failed with diagnostics:
>     invalid connection
>     --- failed re-building 'Moonlight2R.Rmd'
> 
>     The following snippet is the code chunk that causes the fail:
> 
>     data("dataMethyl")
>     data("dataFilt")
>     data("dataPRA")
>     data("DEGsmatrix")
>     data("LUAD_sample_anno")
>     data("NCG")
>     data("EncodePromoters")
>     data("MetEvidenceDriver")
> 
>     # Subset column names (sample names) in expression data to patient
>     level
>     pattern <- "^(.{4}-.{2}-.{4}-.{2}).*"
>     colnames(dataFilt) <- sub(pattern, "\\1", colnames(dataFilt))
> 
>     dataGMA <- GMA(dataMET = dataMethyl, dataEXP = dataFilt,
>                    dataPRA = dataPRA, dataDEGs = DEGsmatrix,
>                    sample_info = LUAD_sample_anno, met_platform = "HM450",
>                    prevalence_filter = NULL,
>                    output_dir = "./GMAresults", cores = 1,
>     roadmap.epigenome.ids = "E096",
>                    roadmap.epigenome.groups = NULL)
> 
>     I could reproduce this fail on my local Windows machine (on release
>     rather than devel at the moment), so it's probably not an issue with
>     the builders. It builds and runs successfully on Linux, both on
>     devel and release. I have also tried running the same code by hand
>     on the R prompt, and that completes successfully.
> 
>     The error I get when trying to build the vignette manually is
>     possibly more informative:
> 
> 
> 
>         devtools::build_vignettes('../Downloads/Moonlight2R-devel/Moonlight2R-devel/')
> 
> 
>     ℹ Installing Moonlight2R in temporary library
>     ℹ Building vignettes for Moonlight2R
>     --- re-building 'Moonlight2R.Rmd' using rmarkdown
> 
>     processing file: Moonlight2R.Rmd
>       |.......................                            |  45%
>     [unnamed-chunk-20]trying URL
>     'https://bioconductor.org/packages/3.18/data/experiment/src/contrib/sesameData_1.20.0.tar.gz <https://secure-web.cisco.com/1By4iDLoonNq9oCuWZXPosebkSm_dNmB68WHlRYlsuY0mLDWGPavDCZHWMJvKAbZM1cUy7qzqWl81dRjtWNgIW6xGgBozsyO_0Zg2WfSH1JLZHfgm870r7PHbNG8qdpj0FH23FskTEZgBycY8KTUcSW0UWZmBSoP1eeDox_wBKsvlsUk_XhhBOu76pmj26qrc6WokVrZnHWSQ9rQX6aGhI2ubdN5gZOHE_iL3JU0cnM_0i3SK4SWrkiIsVBCghdawutrILEEHaZRLsyLaaVIgJNMb1xLd2NUrl006Q4Yn-2Mlu0HPhjLiUqayMhx7s9MQ/https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.18%2Fdata%2Fexperiment%2Fsrc%2Fcontrib%2FsesameData_1.20.0.tar.gz>'
> 
> 
> 
>     trying URL
>     'https://bioconductor.org/packages/3.18/data/experiment/src/contrib/sesameData_1.20.0.tar.gz <https://secure-web.cisco.com/1By4iDLoonNq9oCuWZXPosebkSm_dNmB68WHlRYlsuY0mLDWGPavDCZHWMJvKAbZM1cUy7qzqWl81dRjtWNgIW6xGgBozsyO_0Zg2WfSH1JLZHfgm870r7PHbNG8qdpj0FH23FskTEZgBycY8KTUcSW0UWZmBSoP1eeDox_wBKsvlsUk_XhhBOu76pmj26qrc6WokVrZnHWSQ9rQX6aGhI2ubdN5gZOHE_iL3JU0cnM_0i3SK4SWrkiIsVBCghdawutrILEEHaZRLsyLaaVIgJNMb1xLd2NUrl006Q4Yn-2Mlu0HPhjLiUqayMhx7s9MQ/https%3A%2F%2Fbioconductor.org%2Fpackages%2F3.18%2Fdata%2Fexperiment%2Fsrc%2Fcontrib%2FsesameData_1.20.0.tar.gz>'
>     Content type 'application/x-gzip' length 1975798 bytes (1.9 MB)
>     ==================================================
>     downloaded 1.9 MB
> 
>     * installing *source* package 'sesameData' ...
>     ** using staged installation
>     ** R
>     ** inst
>     ** byte-compile and prepare package for lazy loading
> 
>     ** help
>     *** installing help indices
>     ** building package indices
>     ** installing vignettes
>     ** testing if installed package can be loaded from temporary location
> 
> 
>     ** testing if installed package can be loaded from final location
> 
> 
> 
>     ** testing if installed package keeps a record of temporary
>     installation path
>     * DONE (sesameData)
> 
>     The downloaded source packages are in
>            
>     'C:\Users\Work\AppData\Local\Temp\RtmpmsVLSL\downloaded_packages'
> 
>     Quitting from lines 727-746 [unnamed-chunk-20] (Moonlight2R.Rmd)
> 
>     Error: processing vignette 'Moonlight2R.Rmd' failed with diagnostics:
>     invalid connection
>     --- failed re-building 'Moonlight2R.Rmd'
> 
>     SUMMARY: processing the following file failed:
>       'Moonlight2R.Rmd'
> 
> 
>     so it installs the sesameData package (because of
>     ExperimentHub::ExperimentHub()[['EH3675']]) , and then fails like that.
> 
>     We have very little experience in development under Windows and are
>     a bit stumped on what might be the problem; do you know whether this
>     error message comes from anything in particular or do you have any
>     further idea on how to troubleshoot this?
> 
>     I assume the error message does not refer to connecting to some
>     server on the internet, since all works fine on Linux and I can
>     reproduce the problem from different machines/connections. But happy
>     to hear your thoughts
> 
>     Thank you and kind regards,
> 
>     Matteo Tiberti
> 
>     Danish Cancer Institute
>     Strandboulevarden 49
>     DK-2100 Copenhagen
>     Telephone: +45 35 25 73 07
>     – a part of the Danish Cancer Society
> 
>     [An image showing the Danish Cancer Society's name and logo called
>     the bow in red font. Displayed in
>     red]<https://www.cancer.dk/?utm_source=email&utm_medium=medarbejderemail&utm_campaign=medarbejderemail&utm_content=cancerdk> <https://secure-web.cisco.com/1mfiInM_8FuRpvEm0gDajEfBVId-1gb0jBC54adABQhxJwn4DC16w_saorhZ0op1x9Gu4k4GPR9IQTf9p26MG2Wd92tdHQqJtfezA9CY9oPCaz2dO1QErJfGGkn_0mjb5QRcUq-L9Edu05cqMzcSW-ZQCJ9ukAoVGJTJ8sl8VkgwsrJ3HDh7eI3w8kE-hDdL5sfwTjJ_Go7Z2hAdO8EgqeHmXmhta6PpE9eMC4RQQt6iclvvfCT8YfY2ck8S0qEkz77oeWn2lkQ1hjPXYVfMVcKIAbcHjWtrR4I7i7OcApr6NbCAb_CV7DWa7t8lBEGcU/https%3A%2F%2Fwww.cancer.dk%2F%3Futm_source%3Demail%26utm_medium%3Dmedarbejderemail%26utm_campaign%3Dmedarbejderemail%26utm_content%3Dcancerdk>
> 
>     www.cancer.dk
>     <http://secure-web.cisco.com/1RVLV2ovMaUTeq6VEu5QvybxFk6zW00-egZU-gERM1951skSSc4Kwe-9pfRuGtGZbrH1ZO_j7J9ISMKJDeUo7nIWURnKtZAIayjORHXtLGFfNM6ql28jkVbF7skfaDBID-xtxXYm3pjhOAnLbiSCUUdJsmJhC8UQTlHbjg-n6YMtQsoyBZcmBBOho2zcRNlJexp-XGn5bb-dozYJpo7q4sn_Cy_N-QwQrwtvc01Tc7GMQCxs2vdoLR_l47_Rt67wOtmWqRwKHF1Kp6UtvmdBHuaojCqHncJ9bESCoI4h4MMVkzzufn3gkN-7sRFDlj2va/http%3A%2F%2Fwww.cancer.dk><https://www.cancer.dk/international/> <https://secure-web.cisco.com/1ZblM0-_XMdr11XRFAXhP2hHwgRiOb90R0k_Ar4snJUfZ7kfYtk0Knh-cuIDFqD8E8fZuAfCg0Foou8GQUnFRLIBri7rsSlaxFzDMc8DWIvoxqj2wwkDqIpl6ECK6JNFqJn0DPiO3pdbP5GGor4MZnSwwmAtEbzHsbP_v7BNk7Gq0wc0BTo6ocdnSvHNPdnPNhNHScxoLxSu9DXm80amt5CLu-dNc-VVo9QtCQamGLgLqjlXKsavt417TmftahPca3F6iwwB648siRt1z2N4ZnQm9ddda4zecXEw8YRGHyOE1Tjp07wnhhpXUahhMh_p8/https%3A%2F%2Fwww.cancer.dk%2Finternational%2F> | <https://www.cancer.dk/om-os/privatlivspolitik/> <https://secure-web.cisco.com/1sueUdsK2Nz46WceAI1X6J67uFFM4_-u2jsnjTzB4mkwMvdEsSqAd2dQ2-C_PTyi1dXgO7I1PdRSWM1TSOkP8ieQ2xCOa036oa-ucQTY65o6nSR__aVhVG5mI0HkLQOX7ihiKsmVFswSw_ghYaSi8hBnVRfafVS6G7TxPRtg4knMhWV7DDnO7bNGhPjPXxAqMVoJJkH0URd9lH2NIGtfNC8LmoeJ1htzSq3Tn_z2gmPSV1UtK_2fAe3Z_ixAeq1eYzWU7nfZ-5_l23cQyeOpSY0B9R6DH_eKA2v8ziUsBhVIrBLPYvODWunlR3ZXqIcvN/https%3A%2F%2Fwww.cancer.dk%2Fom-os%2Fprivatlivspolitik%2F> Our privacy policy<https://www.cancer.dk/om-os/privatlivspolitik/> <https://secure-web.cisco.com/1sueUdsK2Nz46WceAI1X6J67uFFM4_-u2jsnjTzB4mkwMvdEsSqAd2dQ2-C_PTyi1dXgO7I1PdRSWM1TSOkP8ieQ2xCOa036oa-ucQTY65o6nSR__aVhVG5mI0HkLQOX7ihiKsmVFswSw_ghYaSi8hBnVRfafVS6G7TxPRtg4knMhWV7DDnO7bNGhPjPXxAqMVoJJkH0URd9lH2NIGtfNC8LmoeJ1htzSq3Tn_z2gmPSV1UtK_2fAe3Z_ixAeq1eYzWU7nfZ-5_l23cQyeOpSY0B9R6DH_eKA2v8ziUsBhVIrBLPYvODWunlR3ZXqIcvN/https%3A%2F%2Fwww.cancer.dk%2Fom-os%2Fprivatlivspolitik%2F>
> 
>     _______________________________________________
>     Bioc-devel using r-project.org <mailto:Bioc-devel using r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/bioc-devel
>     <https://secure-web.cisco.com/1oW5k18DscLAKPp2QqDiIVdfCZjjhrAJmoZtCtE_d5RW-kZCKhwA-NROEXaWoc4kWxBqX-l_5UDD_AwXQLWRrZ8ddMehPExTrNJyQNDN6H-kaDHeFrbHB0JoLkhLVFR0ysFnlq5KFt5dDrXK0S9XrTsIDPaThgmonlu4p7az-9SCmgdKK_4mbMvNGV7b3UHvrQDqgQBkTlh5GetUHsM2ynLY7gdfGLvy1Kn2mS6xoupwXB5GJOtMJQxk7j-_NhzjZBCJ2k_OG8jhDnmYR3GcUIE_hyCegz8ABMKM4s6bhn-VOJv8ReAwm3nfWptHbc5yi/https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fbioc-devel>
> 
> ---
> 
> Marcel Ramos
> 
> Bioconductor Core Team
> 
> Roswell Park Comprehensive Cancer Center
> 
> Dept. of Biostatistics & Bioinformatics
> 
> Elm St. & Carlton St.
> 
> Buffalo, New York 14263
> 
> 
> This email message may contain legally privileged and/or confidential 
> information. If you are not the intended recipient(s), or the employee 
> or agent responsible for the delivery of this message to the intended 
> recipient(s), you are hereby notified that any disclosure, copying, 
> distribution, or use of this email message is prohibited. If you have 
> received this message in error, please notify the sender immediately by 
> e-mail and delete this email message from your computer. Thank you.
> 

-- 
Marcel Ramos Pérez
Roswell Park Comprehensive Cancer Center
Dept. of Biostatistics and Bioinformatics
Elm & Carlton Streets
Buffalo, New York, 14263


This email message may contain legally privileged and/or confidential information.  If you are not the intended recipient(s), or the employee or agent responsible for the delivery of this message to the intended recipient(s), you are hereby notified that any disclosure, copying, distribution, or use of this email message is prohibited.  If you have received this message in error, please notify the sender immediately by e-mail and delete this email message from your computer. Thank you.


More information about the Bioc-devel mailing list