Re: Thank you for trying out SWISH - here are the bugs

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 07/21/2013 12:25 PM, Torbjörn Lager wrote:
> Hi Jan,
> 
> It turned out that I ran version 6.2.* on the server where I'm
> hosting. I have now upgraded to 6.3.19 in the hope that this will fix
> the bug. If it doesn't, I will compile for debugging and enable core
> dumps.

Ok.  You probably also want to load_files(File, [sandboxed(true)])
and the library(sandbox).  Be aware that the interface for safe_goal/1
has changed.   Simply using catch(safe_goal(Goal), _, fail) should do.

	Cheers --- Jan

> 
> Best,
> Torbjörn
> 
> 
> On Sat, Jul 20, 2013 at 9:42 AM, Jan Wielemaker <[email protected]> wrote:
>> Hi Torbjörn,
>>
>> Good to see it attracts attention!
>>
>> Destroying message queues is supposed to be safe at all times.  This
>> is a bug.  Only, I need something to reproduce it, or at least a core
>> dump in which I can poke around to examine the state of the system.
>>
>> (to do that, compile for debugging as indicated in build, enable core
>> dumps using "ulimit -c unlimited" and provide me with a login).
>>
>>         --- Jan
>>
>> On 07/20/2013 09:36 AM, Torbjörn Lager wrote:
>>> Hi All,
>>>
>>> Thanks to all of you who played with SWISH. The test release went well
>>> I think, since only two bugs unknown to me has surfaced so far.
>>> Norbert Fuchs found that when saving a program containing "\+" the
>>> +-sign disappeared. Likely an encoding issue. Will fix it tomorrow or
>>> on Monday.
>>>
>>> A more serios bug is related to the ending of sessions. Three times
>>> last night the server crashed with the following message:
>>>
>>> [Thread 19] pl-thread.c:2899: destroy_message_queue: Assertion failed:
>>> !queue->waiting && !queue->wait_for_drain
>>> Stack trace labeled "crash":
>>>   [0] swipl() [0x80eea93]
>>>   [1] swipl() [0x80bcf0a]
>>>   [2] swipl() [0x80bf0df]
>>>   [3] swipl() [0x80c0b57]
>>>   [4] swipl() [0x80c1d4b]
>>>   [5] /lib/i686/cmov/libpthread.so.0(+0x5955) [0xb763b955]
>>>   [6] /lib/i686/cmov/libc.so.6(clone+0x5e) [0xb75bbe7e]
>>> Aborted
>>>
>>> I *think* that this occured when a session timed out (after ten
>>> minutes of inactivity) and was supposed to clean up a few resources.
>>> The relevant code is here:
>>>
>>> %   When a client session ends, the currently running goal (if any)
>>> %   is aborted, the output queue is destroyed, and the client module
>>> %   is emptied.
>>>
>>> :- listen(http_session(end(SessionId, _Peer)), end_session(SessionId)).
>>>
>>> end_session(SessionId) :-
>>>     catch(thread_signal(SessionId, abort), _, true),
>>>     atom_concat(SessionId, '.out', Output),
>>>     message_queue_destroy(Output),
>>>     forall(current_predicate(SessionId:PI),
>>>         (   memberchk(PI, [read/1, write/1, writeln/1, nl/0])
>>>         ->  true
>>>         ;   abolish(SessionId:PI)
>>>         )
>>>     ).
>>>
>>> The message queue is created when the session begins and as far as I
>>> can see it should be possible to destroy it in this way. Maybe you can
>>> spot the problem?
>>>
>>> I will have to return to this on Monday. I will leave the server
>>> running, but I guess it is likely to crash again and then I won't be
>>> here to restart it.
>>>
>>> Best,
>>> Torbjörn
>>>
>>> --
>>> Torbjörn Lager
>>> Professor of General and Computational Linguistics
>>> Department of Philosophy, Linguistics and Theory of Science
>>> University of Gothenburg
>>> Box 200, SE-405 30 Gothenburg, Sweden
>>> Phone: +46317864962
>>> _______________________________________________
>>> SWI-Prolog mailing list
>>> [email protected]
>>> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>>>
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.