[squeak-dev] All mczs have disappeared from source.squeak.org

David T. Lewis lewis at mail.msen.com
Sat Oct 8 18:33:18 UTC 2022


On Sat, Oct 08, 2022 at 07:51:33PM +0200, Tobias Pape wrote:
> Hi
> 
> > On 8. Oct 2022, at 19:31, David T. Lewis <lewis at mail.msen.com> wrote:
> > 
> > On Sat, Oct 08, 2022 at 05:17:09PM +0200, Tobias Pape wrote:
> >> 
> [???]
> >> Also why not simply reading the file? Like with filestream???
> >> 
> >> Best regards
> >> 	-Tobias
> >> 
> > 
> > Good question. It does not seem to work as expected, apparently
> > because primitiveFileSize answers 0 for this kind of file.
> > 
> > But here is a workaround that seems to get the job done:
> > 
> > | fs |
> > [[fs := FileStream readOnlyFileNamed: '/proc/meminfo'.
> > fs next: 100000]
> > 	on: Error do: ['']]
> > 		ensure: [ fs ifNotNil: [fs close]].
> > 
> 
> Hm i wonder what cat is doing differntly???

I don't know, but the problem is in our own FileStream code, which
assumes traditional disk-resident files and does not work when
streaming over any kind of thing for which the end-of-file is not
knowable, such as a pipe or a pseuo-file in the /proc file system.

> but this way above, we're not leaking FDs???
>

Correct.

This assumes that the original problem was related to pipe handles
not being closed in the OSProcess/CommandShell calls, as opposed to
socket handle leaks from elsewhere in SqueakSource. That is probably
what was happening when source.squeak.org got locked up, although
there is no way to know for sure without looking at the /proc/<pid>/fd
entries the next time it happens.

Dave
 


More information about the Squeak-dev mailing list