Gajim - 2015-11-06


  1. johnny i upgraded to fedora 23 and now gajim seems to be using up a lot more CPU constantly. i did an strace and it seems to be looping on recvmsg
  2. johnny oh, yeah I'm using gajim from hg
  3. johnny i wonder if one of the dependencies I may or may not have installed is causing that
  4. Link Mauve johnny, can you find out which socket it does recvmsg from?
  5. johnny i only have file descriptor
  6. johnny 4
  7. johnny which is not helpful
  8. johnny i wonder . is gajim easy to use with pdb.. i wonder how long it'd take to get to the problem
  9. Link Mauve Probably is, it’s pure Python after all.
  10. johnny sure, but programs that do forking or threading are always harder to debug
  11. johnny and i can't say i have any experience with gui programs and debugging them
  12. johnny unless they break with a backtrace of course :)
  13. Link Mauve You can look at /proc/$(pidof gajim)/fd/4 to know what it is.
  14. Link Mauve But probably some socket, for which I have no idea how to find out what it is. :/
  15. Link Mauve Gajim doesn’t do threading itself, GTK+ might.
  16. Link Mauve It does call quite a few external commands though.
  17. johnny oh.. duh.. thanks Link Mauve that's definitely closer
  18. johnny forgot about /proc
  19. johnny now i have a socket:number
  20. johnny Link Mauve, so.. i see that
  21. johnny but then?
  22. johnny /proc/20863/fd/4 -> socket:[166691]
  23. Link Mauve No idea, sorry.
  24. johnny ah.. i see it in netstat
  25. Link Mauve Oh actually, ss -p does give you that information.
  26. johnny ugg.. thanks for reminding me of ss.. i'm still stuck in the old ways of netstat/ifconfig :(
  27. johnny that didn't help still :( can't tell what's actually using it
  28. johnny except gajim itself obviously
  29. Link Mauve johnny, ss -p | grep gajim | grep 'fd=4)'
  30. Link Mauve ss segfaults here. oO
  31. Link Mauve Only with the -p option.
  32. Link Mauve *** Error in `/usr/bin/ss': free(): invalid pointer: 0x0000000000623000 ***
  33. johnny hah
  34. johnny yeah i did grep fd=4
  35. johnny with -C 3
  36. johnny i wonder what this g is about
  37. johnny u_str ESTAB 0 0 * 166691 * 168546 users:(("g",pid=20863,fd=4))
  38. johnny but 16546 is the Xorg socket
  39. johnny err 168546
  40. johnny so that's still very unhelpful :(
  41. Link Mauve Do you see such a CPU increase in other GTK+ programs?
  42. Link Mauve gtk3, I mean.
  43. johnny nope
  44. johnny i use gtk3 firefox, and gtk3 evoluton, gtk3 terminal
  45. johnny gtk3 music player
  46. johnny nautilus too
  47. johnny aka gnome 3
  48. Link Mauve ^^
  49. johnny what about it?
  50. Link Mauve Hmm, could the CPU issue be something unrelated? strace some of those programs to see if the recvmsg stream is similar.
  51. johnny i suppose it could be.
  52. johnny quodlibet is similiar, just way slower
  53. johnny it's like a message ever 30 seconds
  54. johnny err every 10 seconsd
  55. johnny instead of > 50 per second
  56. Link Mauve I have no idea how to debug X11 programs. :/
  57. Link Mauve On Wayland I’d use WAYLAND_DEBUG=1 to see the protocol, but I don’t think I’ve ever seen something similar on X11.
  58. johnny are you full wayland?
  59. Link Mauve Yes, except for Firefox.
  60. johnny nice
  61. johnny are you using the gtk3 firefox?
  62. Link Mauve Of course. :)
  63. Link Mauve But it still doesn’t run on Wayland without hacks.
  64. johnny yeah, i noticed
  65. johnny i just didn't know how many people were using gtk3 firefox
  66. johnny being that it's not official
  67. johnny fedora has shipped gtk3 releases of firefox for a whole release cycle, plus the new one that just started a few days ago
  68. Link Mauve I don’t even have gtk2 installed anymore.
  69. johnny i still do
  70. johnny i did finally removing flash though
  71. Link Mauve Mozilla also switched to gtk3 for their nightly builds a few months ago.
  72. Link Mauve Flash… remove that seven years ago, never looked back. ^^
  73. Link Mauve Flash… removed that seven years ago, never looked back. ^^
  74. johnny i still needed flash for youtube until recently
  75. johnny sure.. nightlies, but I can't use the nightlies, because they still build against gstreamer 0.10!
  76. johnny by default
  77. johnny gstreamre 0.10 is totally removed from my system
  78. Link Mauve Ah, I still haven’t succeeded in that. :p
  79. Link Mauve Oh actually I have.
  80. Link Mauve Weird.
  81. Link Mauve Does Firefox run without it?
  82. johnny if you build it against gstreamer 1.0 it works
  83. johnny fedora's packages have been doing it for 3-4 releases now
  84. johnny 3-4 fedora releases*
  85. johnny you still sadly have to enable ffmpeg for html5 video though!
  86. johnny that was the case for gstreamer 0.10
  87. johnny mozilla doesn't care about gstreamer for some reason
  88. Link Mauve I mostly don’t watch videos in a browser, so I don’t really care.
  89. johnny i only watch videos in browser.. or with some UI on a tvlike device
  90. johnny like the roku with a upnp player
  91. Link Mauve I love mpv too much to be able to use anything else anymore. ^^'
  92. Link Mauve Although I’ve heard Mozilla is interested in reusing mpv’s scalers.
  93. Link Mauve Which would bring its rendering quality when upscaling or downscaling, but still not its usability.
  94. johnny i'm not interested in anything that doesn't use gstreamer
  95. Link Mauve Heh, why that? :)
  96. johnny because it's the closest thing that we have to a common audio/video api
  97. Link Mauve People at work are like that as well, especially those who work on it.
  98. johnny like directshow/directplay on windows
  99. johnny and directsound
  100. johnny or whatever they call it nowadays
  101. Link Mauve You mean an abstraction over everything else?
  102. Link Mauve You can also use Gstreamer on Windows.
  103. johnny yeah.. over the various inputs/outputs sinks and sources
  104. johnny i know
  105. johnny but i can't use direct* whatever on linux .. :)
  106. Link Mauve Sure you can, install Wine. :p
  107. johnny not what i meant..
  108. johnny that doesn't even count
  109. Link Mauve Why wouldn’t it? :p
  110. johnny because its' not native to linux
  111. johnny and you can't even use it (easily) on other architectures
  112. Link Mauve You can use winelib to build an elf file instead of a pe file.
  113. johnny like arm
  114. Link Mauve Sure you can. :p
  115. johnny it really doesn't count because it's a second class citizen
  116. johnny it always comes last
  117. johnny reimplement apis that someone else made that you don't have access to the code for
  118. johnny that you always have to do after the fact
  119. johnny Link Mauve, so you're saying I can run starcraft 2 on an arm processor?
  120. Link Mauve Well, it’s a toolkit like most other ones, sure something like GTK+ or Qt will get more money than other less known toolkits, so they will be more supported.
  121. johnny not without qemu afaik
  122. Link Mauve No, we were talking about using DirectX on Linux.
  123. Link Mauve Which works fine with winelib.
  124. johnny no.. we were talking about using wine on linux
  125. johnny and wine is pointless if you can't use apps
  126. johnny sure.. wine itself might run on arm.. but with no apps.. what's the point
  127. Link Mauve Not really, if you have some source code using Windows APIs, compiling it on Linux with winelib is very easy, while rewriting everything could take a lot more time.
  128. johnny sure.. having some source code..
  129. Link Mauve Your issue is mostly with programs being proprietary.
  130. johnny i mean about using proprietary programs :)
  131. johnny not with the code being proprietary
  132. Link Mauve Just to remind you, that part of the conversation started with “22:23:27 johnny> but i can't use direct* whatever on linux .. :)”
  133. johnny anyways.. i concede the point that one can use a not fully implemented version of directWHATEVER on linux
  134. johnny a secone class version
  135. johnny second*
  136. johnny maybe even 3rd class
  137. johnny to me that doesn't count as actually using it.. since i never would in a million years
  138. johnny because it's second class ..
  139. johnny but you're technically right
  140. Link Mauve The kind of right that matters. :p
  141. Link Mauve I disagree with your opinion, Wine APIs aren’t second, third or first class of anything, every toolkit is pretty much equal in what they can use, of course not in what they expose or their support.
  142. johnny they are second class because they are always reimplemented .. instead of written
  143. johnny if MS wrote directX for linux while writing for windows.. it wouldn't be second class
  144. johnny even if it was closed source
  145. johnny if something has be to reimplemented fact the fact, it's never first class
  146. Link Mauve Huh, there are many other cases where you want compatibility with something else that existed before you, I don’t see any shame in that.
  147. johnny after the fact*
  148. johnny it's not about shame
  149. johnny sometimes you gotta do what you gotta do
  150. Link Mauve Take Mesa for example, it’s a perfectly fine OpenGL implementation, despite OpenGL being written by some other people.
  151. johnny that's fine because everybody started from the same base
  152. johnny opengl is just a spec
  153. johnny there is directx spec
  154. johnny no direct* spec
  155. johnny thus it must always be reimplemented.. (vs implemented)
  156. johnny that was the what i was trying to make clear before
  157. Link Mauve Well, some Wine people do write the spec, some other implement it.
  158. johnny huh?
  159. Link Mauve In which way is that different from OpenGL?
  160. johnny no.. they don't write the spec.. there is no spec.. because the actual authors didn't release one
  161. Link Mauve Where you have various companies implementing proprietary extensions, which then make it into the standard after a vote.
  162. johnny microsoft writes directx.. and then wine does their best to map it
  163. johnny totally different
  164. johnny you're telling me you can't see the difference between the khronos group writing the specifications for opengl and then everybody implementing the spec and microsoft creating directx with no specs.. and wine trying their best to understand how it works internally and reimplementing it
  165. Link Mauve If you want people to use your API, you have to document it.
  166. Link Mauve Both the members of Khronos and the partners of Microsoft want that.
  167. johnny documenting it is different than writing a spec
  168. Link Mauve Well, yes.
  169. johnny users of directx don't have the kind of information about how it works internally that people who implement opengl have
  170. Link Mauve Haha.
  171. johnny thus no implementation of directx can be provably complete..
  172. johnny except that a ton of programs tend to work on it
  173. Link Mauve There is absolutely no information in the OpenGL specification about how it works internally, since it’s always an implementation detail.
  174. Link Mauve The specification describes how the interface work, how the application should communicate with the driver to achieve what it wants.
  175. johnny there's more than simply .. here's th functions you can use.. and here's the output.
  176. Link Mauve But the internals can’t be specified that way.
  177. johnny not.. here's what you must implemetn.. and here's what it returns
  178. johnny those aren't the same
  179. Link Mauve OpenGL is terribly underspecified in many area, which is why it’s so much pain when you have something working on one driver and failing on another.
  180. johnny yeah opengl isn't the paragon .. it was jsut the most related
  181. johnny vulcan sounds better
  182. Link Mauve Vulkan improves things mostly by having a reduced interface between the application and the driver, while still letting both of them extend it in a standard way.
  183. Link Mauve I have never worked with Direct3D so I can’t compare it to both of those, but I doubt it is much worse.
  184. Link Mauve AFAIK, the main difference for a driver developer is that Microsoft provides a middleware to build your d3d driver upon, which does all of the work common to every driver, pretty much exactly like Gallium.
  185. Link Mauve Although, I expect it to be much more sane than Gallium. :p
  186. johnny hah