Re: [polyml] Segmentation fault on get_stream

2018-12-31 Thread David Matthews
In the current code if open returns with error EMFILE the RTS does a full GC in the hope that this will close some unreferenced files. It then retries the call. In the current rewrite that code has been removed so it looks like you'll have to look at this! Happy new year to you and everyone

Re: [polyml] Segmentation fault on get_stream

2018-12-31 Thread Michael.Norrish
I wondered about this, and it's clear to me that HOL4's Holmake tool has been implicitly relying on garbage collection of unreachable fds. In particular, when I compile and run Holmake with mlton I can get excessive fd OS exceptions that I don't see with Poly/ML. I guessed I had a bug to fix,

Re: [polyml] Segmentation fault on get_stream

2018-12-26 Thread Kostirya
Hello, David. Patch on MultiThreadIO branch was help for me. Thank you very much! P.S. I close only explicitly all sockets. ср, 26 дек. 2018 г. в 14:45, David Matthews : > > I've had a look at this and I think I know what is going wrong. There > is a global table that holds information about ope

Re: [polyml] Segmentation fault on get_stream

2018-12-26 Thread Makarius
On 26/12/2018 13:45, David Matthews wrote: > > However, the table itself is really a relic of some very old code and > the whole thing needs to be replaced.  The table does two things.  One > is to ensure that streams are not persistent [...] The other use of the table > is to > enable streams to

Re: [polyml] Segmentation fault on get_stream

2018-12-26 Thread David Matthews
I've had a look at this and I think I know what is going wrong. There is a global table that holds information about open streams. There is an interlock to prevent two threads both growing the table at the same time but it turns out there is no interlock to prevent one thread growing it while

Re: [polyml] Segmentation fault on get_stream

2018-12-25 Thread Kostirya
I built Poly with debug. Segmentation fault is on PolyWord::operator!= Program terminated with signal 11, Segmentation fault. #0 0x7fddb9069bc6 in PolyWord::operator!= (this=0x7fddb93faa60, b=...) at globals.h:171 171 bool operator != (PolyWord b) const { return contents.unsignedInt

[polyml] Segmentation fault on get_stream

2018-12-24 Thread Kostirya
Hello. I got sometimes Segmentation fault. The GDB backtrace of core file is bellow. It is multi thread server. I call Socket.bind and Socket.listen in main thread and then I create worker threads. If server have one worker thread then error is not occur. OS is CentOS, Poly/ML 5.7.2 Testing (Git