bugGuile - Bugs: bug #2110, bug in threading implementation...

 
 

bug #2110: bug in threading implementation using guile-1.6.1

Submitted by:  Stan Pinte <stan_pinte>
Submitted on:  Thu 02 Jan 2003 01:12:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 20 Jul 2009 09:38:16 PM UTC, comment #3:

I think it's reasonable to say that 1.6 is no longer maintained, so closing this bug.

Ludo'.

Ludovic Courtès <civodul>
Project Administrator
Sun 05 Dec 2004 11:09:55 PM UTC, comment #2:

I'm pretty sure you're only meant to run one gtk-main (at any one time). It'd be nice if guile or guile-gtk could protect against any ill effects of running two, but I'm not sure where the actual problem lies.

Kevin Ryde <kryde>
Project Member
Fri 10 Jan 2003 01:38:41 PM UTC, comment #1:

This only seems to happen when I make two calls two (gtk-main), indirectly.

-> one via the (gtk-ensure-handler) call
-> one afterwards, via the (gtk-main) call.

Stan Pinte <stan_pinte>
Thu 02 Jan 2003 01:12:35 PM UTC, original submission:

hello,

I am using multiple threads within a guile-gtk application.

a call to (gtk-threads-ensure-handler) ensures that a first thread gets started, and
allows the rest of my program to execute. At the end of that program, I call (gtk-main), to
wait in the Gtk event thread.

If I run my program without starting a second thread, it is ok, but as soon as I invoke
(gtk-threads-ensure-handler), my CPU is used at 100%

NOTES:

1: I configured guile-1.6.1 using the "--with-threads" flag.
2: if I strace my process, I see this:

ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 454970}, NULL) = 0
gettimeofday({1041338430, 455055}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 455767}, NULL) = 0
gettimeofday({1041338430, 455852}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 456429}, NULL) = 0
gettimeofday({1041338430, 456511}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 457084}, NULL) = 0
gettimeofday({1041338430, 457166}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 459008}, NULL) = 0
gettimeofday({1041338430, 459097}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})
gettimeofday({1041338430, 459688}, NULL) = 0
gettimeofday({1041338430, 459771}, NULL) = 0
ioctl(7, FIONREAD, [0]) = 0
select(32, [6 7], [], [], {0, 0}) = 1 (in [6], left {0, 0})

and so on....

--> I suspect a bug in the implementation of

coop_wait_for_runnable_thread () in libguile/isselect.c

if (QFIRST (coop_global_sleepq)->timeoutp)
gettimeofday (&now, NULL);

return coop_wait_for_runnable_thread_now (&now);

...

thanks a lot,

Stan

Stan Pinte <stan_pinte>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by civodul (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 17 Aug 2009 12:38:50 PM UTCcivodulOpen/ClosedOpen=>Closed
    Mon 25 Aug 2008 08:32:10 AM UTCcivodulStatusNone=>Invalid
    Wed 09 Jul 2008 07:04:45 AM UTCNoneAttached File-=>Added get_apache_80x15_2.png, #16044

    Back to the top


    Powered by Savane 3.1-cleanup1