GNU bug report logs -
#14035
Bug Report: scm_with_guile inside pthread segfault
Previous Next
Reported by: johnanthony <at> lavabit.com
Date: Fri, 22 Mar 2013 22:38:02 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.org>
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 14035 in the body.
You can then email your comments to 14035 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#14035
; Package
guile
.
(Fri, 22 Mar 2013 22:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
johnanthony <at> lavabit.com
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Fri, 22 Mar 2013 22:38:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hey, there. I was asked to provide this information to you by the
guilefriends in Freenode #guile. This code segfaults and I've been having
trouble figuring out why.
I'm running Ubuntu 12.10 i686 and I'm happy to help any way I can if you
need any more information. Please forgive me if I'm doing a terrible job
of this as I've never submitted a bug report before.
Version Information:
guile 2.0.5-deb+1-3
libgc 1:7.1-9
Example program:
```
#include <libguile.h>
static void*
register_functions(void* data){
int argc = 1;
char *argv[] = {"guile", "--listen=54491"};
scm_shell(argc, argv);
return NULL;
}
static void*
thread_scheme(void* data) {
scm_with_guile(®ister_functions, NULL);
return NULL;
}
int main(void) {
pthread_t *threads;
pthread_attr_t pthread_custom_attr;
threads = malloc(sizeof(pthread_t));
pthread_attr_init(&pthread_custom_attr);
pthread_create(&threads[0], &pthread_custom_attr, thread_scheme, NULL);
pthread_join(threads[0], NULL);
return 0;
}
```
Built with gcc (version 4.7.2) like so:
gcc test-program.c -ggdb -o test `pkg-config guile-2.0 --cflags` \
`pkg-config guile-2.0 --libs`
And here's the bt:
```
Reading symbols from /home/john/test...done.
(gdb) r
Starting program: /home/john/test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb7a24b40 (LWP 15154)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7a24b40 (LWP 15154)]
0xb7c654ef in GC_push_all_eager () from /usr/lib/libgc.so.1
(gdb) thread apply all bt
Thread 2 (Thread 0xb7a24b40 (LWP 15154)):
#0 0xb7c654ef in GC_push_all_eager () from /usr/lib/libgc.so.1
#1 0xb7c65543 in GC_push_all_stack () from /usr/lib/libgc.so.1
#2 0xb7c6dc4b in GC_push_all_stacks () from /usr/lib/libgc.so.1
#3 0xb7c68724 in GC_default_push_other_roots () from /usr/lib/libgc.so.1
#4 0xb7c66be5 in GC_push_roots () from /usr/lib/libgc.so.1
#5 0xb7c66056 in GC_mark_some () from /usr/lib/libgc.so.1
#6 0xb7c5cf15 in GC_stopped_mark () from /usr/lib/libgc.so.1
#7 0xb7c5d61a in GC_try_to_collect_inner () from /usr/lib/libgc.so.1
#8 0xb7c67e90 in GC_init_inner () from /usr/lib/libgc.so.1
#9 0xb7c67fe4 in GC_init () from /usr/lib/libgc.so.1
#10 0xb7eb9d90 in ?? () from /usr/lib/libguile-2.0.so.22
#11 0xb7ecb5d7 in ?? () from /usr/lib/libguile-2.0.so.22
#12 0xb7f29100 in ?? () from /usr/lib/libguile-2.0.so.22
#13 0xb7f2913e in ?? () from /usr/lib/libguile-2.0.so.22
#14 0xb7c67a6e in GC_call_with_stack_base () from /usr/lib/libgc.so.1
#15 0xb7f2949f in scm_with_guile () from /usr/lib/libguile-2.0.so.22
#16 0x0804879a in thread_scheme (data=0x0) at guile-pthread-test.c:14
#17 0xb7e49d4c in start_thread (arg=0xb7a24b40) at pthread_create.c:308
#18 0xb7d86d3e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Thread 1 (Thread 0xb7a26b00 (LWP 15149)):
#0 0xb7fdd424 in __kernel_vsyscall ()
#1 0xb7e4ae1c in pthread_join (threadid=3080866624, thread_return=0x0) at
pthread_join.c:89
#2 0x0804880c in main () at guile-pthread-test.c:26
(gdb) q
```
Information forwarded
to
bug-guile <at> gnu.org
:
bug#14035
; Package
guile
.
(Sat, 23 Mar 2013 14:00:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 14035 <at> debbugs.gnu.org (full text, mbox):
I grabbed 2.0.7 to see if it was fixed here and it appears to be.
Apologies if I was re-reporting an existing bug that was both known about
and fixed.
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Sun, 24 Mar 2013 01:51:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
johnanthony <at> lavabit.com
:
bug acknowledged by developer.
(Sun, 24 Mar 2013 01:51:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 14035-done <at> debbugs.gnu.org (full text, mbox):
Hi John,
johnanthony <at> lavabit.com writes:
> I grabbed 2.0.7 to see if it was fixed here and it appears to be.
Excellent, thanks for letting us know!
> Apologies if I was re-reporting an existing bug that was both known about
> and fixed.
No need to apologize. Thanks for taking the time to file this report,
and for following up :)
Regards,
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 21 Apr 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 65 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.