* [Bug #2110] bug in threading implementation using guile-1.6.1
@ 2003-01-10 13:38 nobody
2003-01-10 14:13 ` Mikael Djurfeldt
0 siblings, 1 reply; 8+ messages in thread
From: nobody @ 2003-01-10 13:38 UTC (permalink / raw)
=================== BUG #2110: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
Changes by: Stan Pinte <stan.pinte@wanadoo.be>
Date: 2003-Jan-10 13:38 (GMT)
------------------ Additional Follow-up Comments ----------------------------
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.
=================== BUG #2110: FULL BUG SNAPSHOT ===================
Submitted by: stan_pinte Project: Guile
Submitted on: 2003-Jan-02 13:12
Category: None Severity: 5 - Major
Bug Group: None Resolution: None
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: 2003-Jan-10 13:38 By: 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.
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug #2110] bug in threading implementation using guile-1.6.1
2003-01-10 13:38 [Bug #2110] bug in threading implementation using guile-1.6.1 nobody
@ 2003-01-10 14:13 ` Mikael Djurfeldt
2003-01-10 14:23 ` Stan Pinte
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Djurfeldt @ 2003-01-10 14:13 UTC (permalink / raw)
Cc: djurfeldt
nobody@savannah.gnu.org writes:
> =================== BUG #2110: LATEST MODIFICATIONS ==================
> http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
>
> Changes by: Stan Pinte <stan.pinte@wanadoo.be>
> Date: 2003-Jan-10 13:38 (GMT)
>
> ------------------ Additional Follow-up Comments ----------------------------
> 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.
Well, this is not a correct usage pattern. (gtk-ensure-handler)
spawns a gtk handler which handles all events of the application.
That is, it is an *alternative* to (gtk-main).
If your intention with calling gtk-main is to wait for the application
to quit, I suggest that you wait on a condition variable instead.
Then make sure that it is signalled when the application quits.
(But maybe someone else more versed in guile-gtk have a better
suggestion.)
If I do what you describe in an interactive guile session, I get a lot
of glib warning messages which are properly informative:
g_main_iterate(): main loop already active in another thread
It would of course be nicer not to get stuck in a loop but just get
*one* error message...
Best regards,
Mikael Djurfeldt
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Bug #2110] bug in threading implementation using guile-1.6.1
2003-01-10 14:13 ` Mikael Djurfeldt
@ 2003-01-10 14:23 ` Stan Pinte
0 siblings, 0 replies; 8+ messages in thread
From: Stan Pinte @ 2003-01-10 14:23 UTC (permalink / raw)
On Fri, 10 Jan 2003 15:13:35 +0100, Mikael Djurfeldt <djurfeldt@nada.kth.se>
wrote:
> nobody@savannah.gnu.org writes:
>
>> =================== BUG #2110: LATEST MODIFICATIONS ==================
>> http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
>>
>> Changes by: Stan Pinte <stan.pinte@wanadoo.be>
>> Date: 2003-Jan-10 13:38 (GMT)
>>
>> ------------------ Additional Follow-up Comments ------------------------
>>
>>
>> ----
>> 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.
>
> Well, this is not a correct usage pattern. (gtk-ensure-handler)
> spawns a gtk handler which handles all events of the application.
> That is, it is an *alternative* to (gtk-main).
>
> If your intention with calling gtk-main is to wait for the application
> to quit, I suggest that you wait on a condition variable instead.
> Then make sure that it is signalled when the application quits.
> (But maybe someone else more versed in guile-gtk have a better
> suggestion.)
>
> If I do what you describe in an interactive guile session, I get a lot
> of glib warning messages which are properly informative:
>
> g_main_iterate(): main loop already active in another thread
>
> It would of course be nicer not to get stuck in a loop but just get
> *one* error message...
that is exactly the same as I get. thanks for helping.
>
> Best regards,
> Mikael Djurfeldt
>
>
--
Stan Pinte
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug #2110] bug in threading implementation using guile-1.6.1
@ 2008-07-09 7:04 anonymous
2008-08-25 8:32 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: anonymous @ 2008-07-09 7:04 UTC (permalink / raw)
To: bug-guile
Additional Item Attachment, bug #2110 (project guile):
File name: get_apache_80x15_2.png Size:3 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?2110>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug #2110] bug in threading implementation using guile-1.6.1
@ 2003-01-02 13:12 nobody
0 siblings, 0 replies; 8+ messages in thread
From: nobody @ 2003-01-02 13:12 UTC (permalink / raw)
=================== BUG #2110: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
Submitted by: stan_pinte Project: Guile
Submitted on: 2003-Jan-02 13:12
Category: None Severity: 5 - Major
Bug Group: None Resolution: None
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
No Followups Have Been Posted
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2110&group_id=39
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-08-17 12:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 13:38 [Bug #2110] bug in threading implementation using guile-1.6.1 nobody
2003-01-10 14:13 ` Mikael Djurfeldt
2003-01-10 14:23 ` Stan Pinte
-- strict thread matches above, loose matches on Subject: below --
2008-07-09 7:04 [bug " anonymous
2008-08-25 8:32 ` Ludovic Courtès
2009-07-20 21:38 ` Ludovic Courtès
2009-08-17 12:38 ` Ludovic Courtès
2003-01-02 13:12 [Bug " nobody
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).