GNU bug report logs -
#29275
dynamic-link hangs on error
Previous Next
Reported by: noxdafox <noxdafox <at> gmail.com>
Date: Sun, 12 Nov 2017 18:23:02 UTC
Severity: normal
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29275 in the body.
You can then email your comments to 29275 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#29275
; Package
guile
.
(Sun, 12 Nov 2017 18:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
noxdafox <noxdafox <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sun, 12 Nov 2017 18:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Reply sent
to
ludo <at> gnu.org (Ludovic Courtès)
:
You have taken responsibility.
(Wed, 22 Nov 2017 15:48:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
noxdafox <noxdafox <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 22 Nov 2017 15:48:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 29275-done <at> debbugs.gnu.org (full text, mbox):
Hello,
noxdafox <noxdafox <at> gmail.com> 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’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 21 Dec 2017 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.