emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#29275: closed (dynamic-link hangs on error)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#29275: closed (dynamic-link hangs on error)
Date: Wed, 22 Nov 2017 15:48:03 +0000

Your message dated Wed, 22 Nov 2017 16:47:57 +0100
with message-id <address@hidden>
and subject line Re: bug#29275: dynamic-link hangs on error
has caused the debbugs.gnu.org bug report #29275,
regarding dynamic-link hangs on error
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
29275: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29275
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: dynamic-link hangs on error Date: Sun, 12 Nov 2017 20:16:35 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
Greetings,

I am trying to call some C function which seems not to be included in Guile library (fnmatch).

If dynamic-link is given wrong library objects, it will hang forcing the user to kill the VM as it becomes unresponsive.

I could find at least 2 ways to reproduce it:

1. Calling dynamic-link on a wrong object

2. Calling dynamic-link subsequently on 2 non existing objects

Here's an example:

GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (use-modules (system foreign))
scheme@(guile-user)> (define libc-obj (dynamic-link "nonexisting"))
ERROR: In procedure dynamic-link:
ERROR: In procedure dynamic-link: file: "nonexisting", message: "file not found"

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> (define libc-obj (dynamic-link "nonexisting"))

^^^ here the VM becomes unresponsive.





--- End Message ---
--- Begin Message --- Subject: Re: bug#29275: dynamic-link hangs on error Date: Wed, 22 Nov 2017 16:47:57 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
Hello,

noxdafox <address@hidden> skribis:

> GNU Guile 2.2.2
> Copyright (C) 1995-2017 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (system foreign))
> scheme@(guile-user)> (define libc-obj (dynamic-link "nonexisting"))
> ERROR: In procedure dynamic-link:
> ERROR: In procedure dynamic-link: file: "nonexisting", message: "file
> not found"
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> (define libc-obj (dynamic-link "nonexisting"))
>
> ^^^ here the VM becomes unresponsive.

This is because libguile synchronizes uses of ‘dynamic-link’ with a
non-recursive mutex.  Here, the “inner” ‘dynamic-link’ call occurs while
the mutex is already held by the calling thread, which is why it just
hangs.

Fixed in commit 48d42553ef5a9c2240bc2296d1b38dbfd5fca1ac, which will be
in the next 2.2 release.

Thanks,
Ludo’.


--- End Message ---

reply via email to

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