guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'stop-server-and-clients!' can cause crash (was PATCH - Add cooperat


From: Mark H Weaver
Subject: Re: 'stop-server-and-clients!' can cause crash (was PATCH - Add cooperative REPL server module)
Date: Tue, 21 Jan 2014 23:20:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

David Thompson <address@hidden> writes:

> Mark H Weaver <address@hidden> writes:
>
>> Interesting.  Does it happen with unmodified stable-2.0?  If so, I think
>> we can treat this as an independent bug.
>
> Yes, exact same problem on stable-2.0.
>
>> Can you reproduce the segfault while running meta/gdb-uninstalled-guile
>> and get a backtrace?  Alternatively, if you provide enough detail to
>> reproduce the segfault, I can track it down.
>
> Here's the output from gdb:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7ffff4ea2700 (LWP 13122)]
> get_codepoint (address@hidden, address@hidden, address@hidden "(%`", 
>     address@hidden) at ports.c:1460
> 1460        update_port_lf (*codepoint, port);

Ah yes, this makes sense.  Ports in stable-2.0 are not thread-safe even
for normal operations, and in this case 'stop-server-and-clients!' is
_closing_ a port that's currently in use by another thread.

In other words, 'stop-server-and-clients!' is fundamentally unsafe in
the way it works, and probably has been since it was introduced.

Thanks for the debugging.  I'll think about how best to fix this.

     Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]