unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* Re: [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5)
@ 2008-10-15 18:43 dsmich
  0 siblings, 0 replies; 9+ messages in thread
From: dsmich @ 2008-10-15 18:43 UTC (permalink / raw)
  To: Neil Jerram; +Cc: bug-guile, Kannan Vijayan, Kannan Vijayan

---- Neil Jerram <neiljerram@googlemail.com> wrote: 
> 2008/10/14  <dsmich@roadrunner.com>:
> >
> > I would imagine that --with-threads will not be turned back on until a 1.10.x (or 2.0.0 ?) release of Guile.
> >
> > My limited understanding of the situation (possibly incorrect):  Using --without-threads changes the sizes of some data structures (I'm guessing they are smaller, with some pthreads stuff #ifdef'ed out), so that code compiled for one way will segfault when linked with code compiled for the other way.
> >
> > As far as just releasing new packages --with-threads, It's just not possible to go back an recompile all the currently existing packages on already existing systems.
> 
> Really?  Isn't that what happens normally in "transitions"?  There are
> only 28 packages depending (directly) on guile-1.8-libs.
> 
> Or is the issue about non-Debian applications that people have built
> themselves?  Does Debian policy require a package's ABI always to stay
> back-compatible?

It's not about non-debian applications.  It's about preserving ABI compatability.  Here is more information: http://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html#sonameapiabi

In any case, Rob Browning is the one who knows what can (and can't) be done.

> (Another option would be creating new packages with --with-threads
> support.  The current guile 1.8 packages are named guile-1.8 and
> guile-1.8-libs, and it must be the case that everything currently in
> Debian that depends on these does _not_ require support for multiple
> threads.  It should be possible to create packages with new names,
> e.g. guile-1.8-mt and guile-1.8-mt-libs, that were built
> --with-threads, and these would initially have no packages depending
> on them.
> 
> The problem with that, though, is that the existing and -mt packages
> could not coexist, so a Debian user would have to choose between the
> existing packages (+ the option of everything that depends on them)
> and the -mt packages.)

Yes.  It's gets complicated quickly.

-Dale





^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5)
@ 2008-10-14 16:50 dsmich
  2008-10-14 21:48 ` Neil Jerram
  0 siblings, 1 reply; 9+ messages in thread
From: dsmich @ 2008-10-14 16:50 UTC (permalink / raw)
  To: Kannan Vijayan; +Cc: bug-guile, Kannan Vijayan


---- Kannan Vijayan <INVALID.NOREPLY@gnu.org> wrote: 
> 
> Follow-up Comment #2, bug #24554 (project guile):
> 
> I have confirmed that the bug is not really a bug.  The debian changelog
> indicates that the --with-threads option was turned off with one of the 1.8.0
> releases of guile due to a bug.  It doesn't seem to have been turned back on
> since then.

I would imagine that --with-threads will not be turned back on until a 1.10.x (or 2.0.0 ?) release of Guile.

My limited understanding of the situation (possibly incorrect):  Using --without-threads changes the sizes of some data structures (I'm guessing they are smaller, with some pthreads stuff #ifdef'ed out), so that code compiled for one way will segfault when linked with code compiled for the other way.

As far as just releasing new packages --with-threads, It's just not possible to go back an recompile all the currently existing packages on already existing systems.

-Dale






^ permalink raw reply	[flat|nested] 9+ messages in thread
* [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5)
@ 2008-10-14  1:39 Kannan Vijayan
  2008-10-14  3:05 ` Kannan Vijayan
  0 siblings, 1 reply; 9+ messages in thread
From: Kannan Vijayan @ 2008-10-14  1:39 UTC (permalink / raw)
  To: Kannan Vijayan, bug-guile


URL:
  <http://savannah.gnu.org/bugs/?24554>

                 Summary: Pthreads and Stack overflow in guile (reopen bug
20814?)  (guile 1.8.5)
                 Project: Guile
            Submitted by: kvijayan
            Submitted on: Tue 14 Oct 2008 01:39:58 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


I've scoured the web for anything I could be missing with regards to this
bug, including a previous bug report on Savannah dealing with what seems to be
the same issue:

https://savannah.gnu.org/bugs/?func=detailitem&item_id=20814

I have tried to follow these directions, but nothing really seems to work.  I
still get stack overflow errors from guile when doing anything in a new
thread.

The following code is a test case that demonstrates the issue:

/* test.c */
#include <libguile.h>
#include <pthread.h>

static void *thread_1_scm(void *ignore) {
    scm_c_eval_string ("(display (+ 2 33)) (newline)");
    return NULL;
}

static void *thread_1(void *ignore) {
    return scm_with_guile(thread_1_scm, NULL);
}

static void *main_scm(void *ignore)
{
    scm_c_eval_string("(display (+ 1 55)) (newline)");
    pthread_t thr;
    pthread_create(&thr, NULL, thread_1, NULL);
    pthread_join(thr, NULL);
    return NULL;
}

int main(int argc, char **argv) {
    scm_with_guile(main_scm, NULL);
    return 0;
}


I'm compiling as follows:

gcc -o test test.c -lguile -lpthread


The output of this code is:

56
ERROR: Stack overflow


I really don't know what I'm doing wrong here, if anything.  Would appreciate
any help.

Cheers.
-kannan




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?24554>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-07-20 21:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 18:43 [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5) dsmich
  -- strict thread matches above, loose matches on Subject: below --
2008-10-14 16:50 dsmich
2008-10-14 21:48 ` Neil Jerram
2008-10-14  1:39 Kannan Vijayan
2008-10-14  3:05 ` Kannan Vijayan
2008-10-14  8:53   ` Neil Jerram
2008-10-14 15:07   ` Kannan Vijayan
2008-11-30 18:42     ` Ludovic Courtès
2009-07-20 21:51       ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).