/srv/irclogs.ubuntu.com/2013/10/13/#xubuntu-devel.txt

NoskcajShould we add arm64 to the xubuntu-meta package before saucy releases? Or should i make a fix ready for merging as soon as t-series branches appear?07:51
Unit193Adding another arch at the last second, with zero testing the entire cycle, and I'd guess nobody to take a quick run over at the last second anyway.07:53
elfyPersonally I'd wait to see what the consensus is on the first question before working at all on the second07:54
elfyand +1 Unit193 07:54
Noskcajmakes sense. 08:04
brainwashit's possible to hibernate system during live mode via menu, but not after the actual installation of (x)ubuntu11:29
brainwasha bit confusing11:29
elfya bit pointless as well :)12:00
skellatNoskcaj: The only thing in the wild with an arm64 chip is the iPhone 5S so, no, I don't think it would be especially worthwhile for us to put that on our release manifest at the moment for 13.10.13:43
elfyskellat: he's not here ;)13:44
skellatelfy: That's what I get for reading buffered backlog via ZNC several hours later13:44
elfy:)13:45
skellatStill, the point remains that the only arm64 chip in the wild touching consumer hands is in the iPhone 5S right this second so adding support in isn't worth it for 13.1013:45
elfyI don't see much need to do it all tbh13:46
skellatConventional armhf got thrown under the bus as it was13:46
elfyyep13:46
skellatNow is supposed to be the chill-out period...test, look for hyper-critical issues that need last-minute fixes, test, and chill-out13:47
jjfrv8Has anyone else seen this message on the users' list? https://lists.ubuntu.com/archives/xubuntu-users/2013-October/006065.html14:18
jjfrv8I get slightly different symptoms but I can confirm the problem on two different host machines.14:19
jjfrv8And it seems to happen with Saucy and not Raring.14:19
brainwashjjfrv8: maybe worth filing a lp report14:56
jjfrv8brainwash, I was prepared to do that but I was afraid it would get shot down as a vbox issue. Doesn't seem like that to me, tho.14:59
brainwashI'll try to reproduce this one later, but some sort of bug report would be still needed15:03
jjfrv8Sure. I'd be glad to do it.15:05
slickymasterafternoon all15:31
thadslickymaster: the users-admin segfault, the xfce4-terminal encoding menu one, and many others are all caused by glib 2.37 and newer17:28
slickymasterthad, do you mean, also https://bugs.launchpad.net/ubuntu/+source/xfce4-terminal/+bug/1206739 and  https://bugs.launchpad.net/ubuntu/+source/xfce4-indicator-plugin/+bug/118113417:31
ubottuUbuntu bug 1206739 in xfce4-terminal (Ubuntu) "xfce4-terminal crashed with SIGSEGV in magazine_chain_pop_head()" [Medium,Confirmed]17:31
ubottuUbuntu bug 1181134 in xfce4-indicator-plugin (Ubuntu) "xfce4-indicator-plugin crashed with SIGSEGV in g_type_check_instance_cast()" [High,Triaged]17:31
thadyea, there's something wrong with the memory chunk allocator17:33
thadthe applications did not change, but glib got pushed to 2.38 in saucy17:33
slickymasterthad, ^^^ you're right about that17:34
thadmaybe I can find a way to resolve this, well at least explain it somehow :)17:36
slickymasterthad, that would be great17:37
ali1234thad: so do you know a version that worked?18:54
ali1234attempting to build 2.36...18:59
ali1234the build got all the way to the end, ran the tests, and then crashed out20:12
ali1234after successfully completing every test20:13
thadali1234: what a bummer :/20:23
ali1234i am trying to debug it now but it is difficult20:23
ali1234when gdb suspends it the menu is still open which makes it impossible to click on any other windows20:23
ali1234or do anything at all, including kill gdb20:24
thadwhat about valgrind?20:25
ali1234i could run it in xnest20:26
thadwell, sadly I'm not a real expert20:28
ali1234got it20:29
ali1234it crashes in a different place now though20:29
thadcan you share any details?20:30
ali1234http://paste.ubuntu.com/6233113/20:31
thadyea20:31
ali1234number 4 is a big wtf20:31
thadhttps://launchpadlibrarian.net/151908575/Stacktrace.txt20:33
ali1234oh, i see, that's the problem20:33
ali1234it's calling a callback and the pointer is totally nonsense20:33
thadso, what can we blame for this madness?20:35
ali1234don't know :/20:36
ali1234the trace continues: http://paste.ubuntu.com/6233140/20:37
thadmaybe test the first 2.37 release and then do a bisect?20:39
ali1234i don't know where to get that from20:40
ali1234terminal_encoding_action_menu_shown looks like where it is crashing20:40
thadyes20:40
ali1234so i will just add printfs until i find it20:40
thadg_slist_prepend20:41
ali1234it's probably already corrupted by that point20:42
thadwhich point?20:43
thadso we have the for loop to fill the menu with the different encoding entries (GSList groups)20:45
ali1234have you tested this bug without gtk the patched libxfce4ui installed?21:02
ali1234for gtk3 indicators21:02
thadwhat do you mean?21:07
ali1234well, xfce4-terminal has a dependency on libxfce4ui which we rebuild for gtk3 indicators21:07
thadthe daily iso is affected, even the fedora 20 alpha21:07
ali1234ok, just checking21:08
ali1234the crash happens inside that loop btw, but not on the first loop through21:08
thadmost likely everything what switched to glib 2.37+ I assume21:08
thadyes, not on the first loop run21:08
ali1234item = gtk_menu_item_new_with_label (_(terminal_encodings_names[n])); <- crashes here21:12
ali1234when n == 221:13
ali1234which is "Baltic" in the build in string table21:13
ali1234so, bad translation?21:13
ali1234no, it still crashes if i remove the _()21:15
thadsometimes it does crash on the 3rd run21:16
ali1234always :/21:20
ali1234hmm21:21
ali1234in fact it crashes before that line ^21:21
ali1234oh wait21:22
ali1234now it is crashing without looping at all21:25
ali1234so then, race condition21:27
ali1234this makes no seeeeeense21:30
ali1234i think i need to flush stdout or something21:30
thadcomment out this line:  groups = g_slist_prepend (groups, item);21:31
ali1234hmm21:33
ali1234it crashes before that though21:35
ali1234this really makes no sense21:36
thadyea, still no clue, what's going wrong21:37
ali1234hmmmmmmmmm21:37
ali1234so21:37
ali1234what s happening here is it adds the radio item and says "the items are in groups"21:38
ali1234at that point groups is empty21:38
ali1234then it puts the items into groups21:38
ali1234wait, no21:39
ali1234even the code doesn't make sense here21:39
ali1234  item = gtk_radio_menu_item_new_with_label (groups, default_label);21:39
ali1234  groups = g_slist_prepend (groups, item);21:39
ali1234groups = g_slist_prepend (groups, item); <- this line apears in a lot of places, but the very first one makes no sense and appears to create a recursive menu definition21:40
ali1234but i need to check the api docs21:40
thadright, reading the api should help21:40
ali1234so when you said comment the line, which one?21:41
thadthe one in the outer loop21:43
ali1234yeah, that's the only one that makes a difference. i still don't understand why though, or what groups is even supposed to be21:43
knomethad == brainwash?21:44
brainwashyes, that's me21:44
knomeoki21:44
ali1234it still crashes eventually21:44
brainwashdifferent PCs21:44
ali1234*** Error in `terminal/xfce4-terminal': double free or corruption (out): 0x00007fe5434d0340 ***21:45
ali1234*** Error in `terminal/xfce4-terminal': corrupted double-linked list: 0x00007fe5434d0310 ***21:45
thadrandomly?21:45
ali1234seems like it21:45
ali1234oh i get it21:45
thaddidn't crash for me, well, I don't even know what removing this line actually does :)21:46
ali1234groups is the group of radio buttons21:46
thadyes21:46
ali1234it's the set of mutually exclusive options that the radio group belongs to21:46
ali1234so it makes no sense to add anything other than radio buttons to it21:46
ali1234so commenting that line is in fact the correct fix21:46
thadso there is a problem with the list, right?21:46
thadmmh, still weird21:47
ali1234because it is trying to turn off a item whch is not a radio item21:47
ali1234presumably this used to work but now causes a crash21:47
thaddidn't cause any trouble in raring21:47
ali1234well, one way to find out is to make a simple test21:47
ali1234which i will now try to do21:48
ali1234also try to see if i can get it to crash with just that line commented21:48
ali1234bet i can't though21:48
thadyou should add all these findings to the upstream report21:48
ali1234can't seem to crash it21:49
thadnice21:50
thadwell, I can't either :)21:50
ali1234ok, added the info to the bug22:04
thadmmh, do we have to free some memory?22:04
thadjust curious22:05
ali1234what do you mean?22:05
ali1234i'm still a little bit dubious of this code22:06
ali1234but i don't know gtk enough to say if it is right or wrong22:06
ali1234i would have expected creating a radio item and specifying the group would automatically add the item to the group22:06
ali1234thus it should not be necessary to manually append things22:07
thadwe create these items, don't we have to free the memory afterwards?22:07
ali1234otoh the empty group is a null pointer, so i don't understand how it keeps that stuff sorted out22:07
ali1234no, if we do that the menu will disappear22:07
thadso it's garbage collection?22:08
thadwell, valgrind can tell :D22:08
ali1234eh, not really22:08
ali1234this function is building the menu22:08
ali1234some other functions tears it down22:09
thadyea, but if we comment out the line, the item won't get added and can't be free afterwards, because it's not in the list... or?22:10
thadfreed22:10
ali1234it doesn't get freed through the group22:10
thadah ok22:10
ali1234the group is only used when you click on a radio item - it turns off all the other radio items in the group22:11
ali1234all the menu items are in the menu and submenus, they get freed through that22:11
ali1234that's why it crashes, because it calls turn_off_radio_item() on something that isn't a radio item22:11
ali1234at least that is my working assumption22:11
ali1234anyway the groups isn't saved either22:12
ali1234it's only stuffed into the radio items themselves22:12
ali1234the only reference to any of this stuff, once the function finishes, is via the gtk window -> gtk menu bar -> ... pointers22:12
thadI need to learn more about C and GTK, it's a bit confusing without the right amount of knowledge 22:15
ali1234Gtk is incredibly confusing :(22:16
ali1234castes everywhere22:16
ali1234that's why stuff like this happens: you often can't tell what type of pointer you get - you have to just know and caste it appropriately22:16
thadinvalid one :D22:16
thadones22:16
ali1234if you guessed wrong, it crashes22:16
ali1234https://developer.gnome.org/gtk2/stable/GtkRadioMenuItem.html22:17
thadare you going to debug the users-admin segfault too?22:17
ali1234maybe22:18
ali1234looking at the example code there ^ it does seem like the items are added automatically to the group. i think this code smells funny22:18
ali1234link to users-admin bug?22:19
thadwobug 118539622:20
thadbu 118539622:20
thadI give up22:20
thadthis keyboard is so weird, not used to it22:20
ali1234hmm this groups code must be okay - when you make a new item and pass in the group, it must update the group pointer in all the items in the group to point to the new group22:37
ali1234because there's no other way it could work22:38
ali1234and that is almost certainly what crashes22:38
ali1234because the non-radio item doesn't have a pointer to the group list, so when it tries to set it... bang22:38
ali1234that's why it crashes during setup, not when you actually click something22:39
thadso we wait until the fix gets approved upstream?22:39
thadbecause it makes sense now22:41
thadwe could go ahead and include it before22:41
ali1234hmm otoh it could be broken still :/22:42
ali1234or rather, it might only work by accident22:42
ali1234this all boils down to a simple thing: GSList is a simple linked list22:42
ali1234empty list is NULL22:42
ali1234if you add an item to the empty list you get [item, NULL]22:43
ali1234if you do it again, you get [item, NULL] again, but it is a different list22:43
ali1234there is no way to store a reference to a GSList that updates all the copies of it22:44
ali1234BUT this is only true when prepending22:44
thadwhy not append?22:44
ali1234because you can't append to NULL22:44
thadmmh, ok22:45
ali1234so i think what happens here is that every radio item has a different copy of the same list22:45
ali1234in fact it probably ends up looking like a tree22:46
ali1234i should just read the source and find out i guess22:46
ali1234but at the moment... i still think this code is fishy22:46
thadstill not sure, why g_slist_append() shouldn't work22:47
thadmaybe I'm way too confused at this point22:47
rowboatn1ckwhat does "different copy of the same list" mean?22:49
ali1234rowboatn1ck: linked list is a structure like { int: value; pointer: next; }22:49
rowboatn1ckwithout looking too hard, it looks like every radiobutton gets a pointer to the current element22:50
ali1234not quite22:50
ali1234we store a reference to the linked list as just a point. so to start with it is NULL22:50
rowboatn1ckyes22:51
ali1234we prepend one item and we get pointer to: [{0xF00, NULL}]22:51
rowboatn1ckyes22:51
ali1234let a = this pointer22:51
rowboatn1cki dont think that happens22:52
rowboatn1cki think its initally NULL, it gets passed, gets assigned an address to newly allocated memory22:52
rowboatn1ckthe next iteration you pass that, it allocates a new again and assign 22:52
ali1234now prepend to a and we get pointer to: [{0xF01, a} -> {0xF00, NULL}]22:52
ali1234prepend to a again and you get [{0xF02, a} -> {0xF00, NULL}]22:53
rowboatn1ckyes, but 0xF02's prev would be 0xF0122:54
ali1234no, it wouldn't22:54
ali1234a doesn't change22:54
ali1234you get a new pointer back22:54
ali1234but the old pointer still points to the same thing as before22:55
rowboatn1ckin lack of a better term, the "old pointer"'s 'next' still points to NULL?22:55
ali1234yes22:56
rowboatn1ckthat is very, very odd22:56
ali1234it's how linked lists have worked since forever :)22:56
ali1234i'm going to have to code to up to see what really happens22:56
rowboatn1ckno, what would happen is, you pass NULL, it creates a node, set next to NULL22:57
ali1234because basically however it works, this code is wrong imo22:57
ali1234yes22:57
ali1234then returns the node22:57
rowboatn1ckbut if you do it again, the SAME node as *this*, should NOT be NULL22:57
ali1234if you pass in NULL again you get a new node22:57
rowboatn1ckI would imagine, in this example, it worked like this: pass NULL, get address to current node, next iteration, pass that address, get address to new node, and again and again23:00
ali1234yes23:03
ali1234but that is not what xfce4-terminal does23:03
ali1234http://paste.ubuntu.com/6233700/ <- is the prepend function23:04
ali1234when you prepend some data, it makes a new node and makes it point to whatever list you passed in23:04
ali1234so if you prepend the same data to the same list twice, you get two lists that share all but the first item23:05
ali1234this is what xfce terminal is doing23:05
ali1234when you make a new radio item it prepends itself to the list you pass in23:08
ali1234then if the original list passed in was not null, it updates all the other radio items with the new list23:09
ali1234xfce4-terminal then prepends the new item to the old list again, creating a new, different list23:09
ali1234this is then passed in to the next item created, and so on23:09
ali1234so each time you open that menu, it leaks a g_slist_node for each encoding type... which is bad23:10
rowboatn1cki see23:13
brainwashso I wasn't wrong about the allocated memory not being freed?23:16
rowboatn1ckit shouldnt have to be free'd to do this23:17
ali1234brainwash: no, you were wrong. it doesn't have to be manually freed. the function is actually allocating things twice and only one of them will be freed, the other is lost (there is no longer any reference to it)23:18
brainwashah ok23:18
brainwashstill bad23:18
ali1234luckily the solution is very simple: just do it the way the example shows23:19
ali1234brainwash: i added a patch: http://bug-attachment.xfce.org/attachment.cgi?id=518623:45
brainwashali1234: reading your comment currently, impressive job, it explains everything :)23:46
brainwashpatch looks ok, I'll test it later too23:48
micahgis anyone interested in helping to maintain blueman?/23:49
brainwashmicahg: just curious, what work needs to be done?23:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!