bug-guile
[Top][All Lists]
Advanced

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

[bugs #2110] bug in threading implementation using guile-1.6.1


From: Kevin Ryde
Subject: [bugs #2110] bug in threading implementation using guile-1.6.1
Date: Sun, 05 Dec 2004 18:34:22 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9

This mail is an automated notification from the bugs tracker
 of the project: Guile.

/**************************************************************************/
[bugs #2110] Latest Modifications:

Changes by: 
                Kevin Ryde <address@hidden>
'Date: 
                Sun 12/05/04 at 23:09 (Australia/NSW)

------------------ Additional Follow-up Comments ----------------------------
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.






/**************************************************************************/
[bugs #2110] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=2110>
Project: Guile
Submitted by: Stan Pinte
On: Thu 01/02/03 at 13:12

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  None
Privacy:  Public
Assigned to:  None
Status:  Open


Summary:  bug in threading implementation using guile-1.6.1

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


Follow-up Comments
------------------


-------------------------------------------------------
Date: Sun 12/05/04 at 23:09         By: Kevin Ryde <kryde>
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.

-------------------------------------------------------
Date: Fri 01/10/03 at 13:38         By: Stan Pinte <stan_pinte>
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.












For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=2110>

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







reply via email to

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