Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 599842 Details for
Bug 842403
modules command in python help is hanging
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
IRC log of the discussion
irc_log.txt (text/plain), 7.90 KB, created by
kushaldas@gmail.com
on 2012-07-23 19:07:30 UTC
(
hide
)
Description:
IRC log of the discussion
Filename:
MIME Type:
Creator:
kushaldas@gmail.com
Created:
2012-07-23 19:07:30 UTC
Size:
7.90 KB
patch
obsolete
>* ngalvin has quit (Quitting) ><mclasen> more like some python program runs into a deadlock ? ><dmalcolm> mclasen: apparently it's hanging ><dmalcolm> (we were discussing it on #fedora-python, hopefully kushal can give more info) > #fedora-releng #fedora-python #fedora-mktg #fedora-kde #fedora-india #fedora-fudcon #fedora-docs #fedora-devel #fedora-cloud #fedora-art #fedora-arm #fedora-apps #fedora-admin #fedora-desktop ><kushal> mclasen, from #fedora-python , <Zart> f15, «DISPLAY= python -c 'import gtk'» throws runtimeerror: could not open display ><kushal> mcepl, though I used wrong words, sorry for that ><mclasen> not exactly surprising, if you unset DISPLAY... ><halfline> import gtk connects to your display, if you have display set to an empty string it won't have anything to connect to ><kushal> halfline, mclasen ok, completely forgot about that ><mclasen> its a quirk of the gtk bindings that importing them opens a display connection >* mclasen was never a python person, so no opinion on the merits of that approach ><kushal> mclasen, yes, anyway to identify the cause ? ><mclasen> the cause of what ? ><kushal> this strange python import ? ><dmalcolm> kushal: iirc the issue you ran into was that "import gtk" was hanging >* ngalvin (~ngalvin@67-60-231-141.cpe.cableone.net) has joined #fedora-desktop ><kushal> dmalcolm, the bt is from modules command ><kushal> dmalcolm, I never saw this, the new python/Fedora students tried out python tutorial and started crying over this ><dmalcolm> kushal: I know, but you're in a new channel and need to give more context when you ask a question ><kushal> dmalcolm, sorry :( >* behdad has quit (Ping timeout: 600 seconds) ><kushal> pasting full details ><kushal> mclasen, http://fpaste.org/kIpD/ this is when it hangs ><kushal> mclasen, http://fpaste.org/soiO/ is the corresponding bt ><dmalcolm> it's doing an "import gtk" ><dmalcolm> oh, is there a chance that it might have tried to init gtk twice in the same process? >* dmalcolm wonders if that would cause problems ><dmalcolm> (the "modules" command tries to import every module on the system, so tends to run into issues with buggy modules) ><aspektor> ping Company ><halfline> dmalcolm: that's why i was thinking ><halfline> *what ><halfline> basically the module is getting loaded and then unloaded ><halfline> you can't do that for statically registered types ><halfline> s/module/gtk library/ ><halfline> only explanation i can come up with anyway ><halfline> easy way to verify would be to LD_PRELOAD libgtk-2 ><halfline> and see if the problem vanishes ><dmalcolm> that gdk_window_get_type() hang: did GObject types gain a mutex a while back? ><dmalcolm> looks like it's stuck waiting on a mutex that it'll never get ><mclasen> gtype has always had locks >* jjmarin (~jjmarin@84.125.150.246.dyn.user.ono.com) has left #fedora-desktop ><dmalcolm> ah ><mclasen> you can't reenter type initialization, which is why calling random functions from a type init() is a bad idea ><halfline> this works: LD_PRELOAD=/usr/lib64/libgtk-x11-2.0.so python >* behdad (~behdad@74.125.59.33) has joined #fedora-desktop ><halfline> so my guess is ><mclasen> or are you loading gtk2 and gtk3 bindings in the same process ? ><halfline> no no no ><halfline> that's not the problem ><danw> iirc, you can reenter type initialization within a single thread, you just can't initialize types in two threads at once ><halfline> the problem is a plugin is getting loaded that links against libgtk ><mclasen> in which case the same type names between gtk2 and gtk3 would kill you ><halfline> and then that plugin is getting unloaded ><halfline> so gtk is getting dlopened() and closed ><halfline> and then the next plugin comes along ><halfline> and gtk gets opened again ><halfline> then all those static variables will have bogus data in them ><halfline> from the last time it was opened ><kushal> halfline, the preload magic http://fpaste.org/j2fh/ ><mclasen> halfline: well, the static variables go away if the module is really unloaded ><mclasen> the problem is that the static type registration is not getting undone, right ? >* ssp_ (~ssp@12.181.217.2) has joined #fedora-desktop ><halfline> i don't believe the static variables go away when the module is unloaded, but i could be wrong ><mclasen> either way, the problem stems from not respecting that libraries are not in general unloadable ><halfline> at any rate, g_type_info_register_static very specifically doesn't allow this sort of thing ><halfline> looks like ld has a nodelete option ><kushal> so anyway to fix or avoid this issue ? ><mclasen> kushal,dmalcolm: not sure if this discussion helped you... >* dmalcolm is not sure either ><halfline> there are two potential solutions i can think of ><halfline> 1) run LD_DEBUG=all python ><halfline> to find out which module is dlopening libgtk ><halfline> and then change it to dlopen with NODELETE as a flag ><halfline> 2) investigate -z nodelete linker option and see if it can be used when creating the shared object file to make gtk be opened NODELETE automatically ><halfline> then rebuild gtk with said option ><dmalcolm> kushal: this ought to be in bz too ><halfline> gah it's clutter ><mclasen> halfline: I'd rather not have hacks in gtk to make things work 'somewhat' ><kalev> why isn't this an issue when loading/unloading browser plugins that link with gtk, e.g. flash? ><Company> aspektor: pong ><mclasen> kalev: because the browsers generally link against gtk ><Company> plugins have their own process these days, too ><halfline> infact flash doesn't work in epiphany right now because epiphany is gtk3 and flash is gtk2 ><aspektor> Company: âhey, I am still stuck with this Tracker widget, for some reason events I try to trigger (on button press in my case) just does not work, could you please take a look here: http://fpaste.org/K3dz/ maybe you could see what's wrong ? ><kushal> dmalcolm, ok, filing now, should I put it against gtk ? ><halfline> mclasen: oh you're right also actually ><mclasen> I didn't see anything here that would compel me to 'fix' gtk ><halfline> looking at the LD_DEBUG output ><halfline> it's loading gtk2 and gtk3 ><Company> aspektor: you need to subscribe to the events I guess - see http://developer.gnome.org/gtk/2.24/GtkWidget.html#gtk-widget-add-events ><dmalcolm> kushal: pygtk2 I think ><halfline> so yea, i don't see how this command can work ><kushal> dmalcolm, ok, doing it ><aspektor> Company I have add events on line 43 ><halfline> http://fpaste.org/XLuZ/ >* claudio has quit (Read error: 148 (No route to host)) ><halfline> look at line 36 15603: file=/lib64/libgdk-3.so.0 [0]; needed by /lib64/libgtk-x11-2.0.so.0 [0] (relocation dependency) >* dtardon has quit (This parrot is dead.) ><Company> aspektor: you don't seem to gtk_widget_show() the widget? ><Company> or rather, you show the widget when it gets clicked - but invisible windows can't be clicked... ><aspektor> Company: What I want to achieve is that window to appear only when mouse is pressed and disappear on release ><halfline> dmalcolm, kushal: hmm a quick-and-dirty solution might be for the modules command to load each module in a subprocess ><dmalcolm> halfline: interesting idea ><aspektor> Company: do you think it is better to just rewrite release event so it destroy/hide the widget ? (me tried it but it does not seem to work too) ><Company> aspektor: i'd leave the old event handling code in place ><Company> aspektor: and use this new widget only for displaying >* Catalyzt (~Catalyzt@ks397585.kimsufi.com) has joined #fedora-desktop >* Catalyzt has quit (Killed (Proxy or TOR node (tor-irc.dnsbl.oftc.net))) ><kushal> dmalcolm, but that means patching python, correct ? ><aspektor> Company: but when I do gtk_widget_show it shows widget right away correctly ? Than how can I make it to show widget only on Button Press ? ><aspektor> P.S even if I put gtk_widget_show it still does not trigger gtk_button_press_event ... ><dmalcolm> kushal: yes, but that command often causes problems; I'd be up for trying that (once I've finished working on 3.3, that is) ><Company> aspektor: by creating the widget only when a button is pressed
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 842403
:
599840
| 599842 |
599847
|
599852
|
600062